tweaselORG / appstraction

An abstraction layer for common instrumentation functions (e.g. installing and starting apps, setting preferences, etc.) on Android and iOS.
MIT License
6 stars 1 forks source link

Problems with libimobiledevice #50

Closed zner0L closed 1 year ago

zner0L commented 1 year ago

I ran into a similar problem with libimobiledevice both on macOS and on Linux. On Linux, I ran into:

ERROR: Could not connect to lockdownd: Missing HostID (-20)

This seemed to be related to https://github.com/libimobiledevice/libimobiledevice/issues/36, where the problem is wrong permissions on the /var/lib/lockdown folder. And sure enough, they were:

❯ stat /var/lib/lockdown
  File: /var/lib/lockdown
  Size: 0           Blocks: 0          IO Block: 4096   directory
Device: 0,33    Inode: 901451      Links: 1
Access: (2775/drwxrwsr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:var_lib_t:s0

I fixed it but giving the folder to usbmuxd:

❯ sudo chown usbmuxd:usbmuxd /var/lib/lockdown

On macOS the problem was similar, but slightly different. Here I ran into:

ERROR: Could not connect to lockdownd: Missing HostID (-21)

Note the different error number! This time, a different issue was relevant: https://github.com/libimobiledevice/libimobiledevice/issues/922 It mentioned repairing the device:

❯ idevicepair unpair && idevicepair pair

This fixed it as well.

I am not sure if we want to implement this in appstraction. Maybe the pairing procedure is a sensible thing to do in ensureDevice if encounter this error?

baltpeter commented 1 year ago

Is this still relevant with pymobiledevice3?

zner0L commented 1 year ago

No, I don’t think so.