Skip to content

Commit 7dda277

Browse files
Add information about pymobiledevice3
1 parent d167cb2 commit 7dda277

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

readme.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ There solutions won't work for me:
99

1010
Won't allow to automate the entire operating system.
1111
Meant to support development and testing of own apps.
12-
Requires interacting with X Code.
12+
Requires interacting with XCode.
1313

1414
- 3rd party testing tools
1515

@@ -46,6 +46,34 @@ Control potentially because AFAIK it renders an outline over the active element.
4646
The virtual pointer displayed when a mouse is connected could also help anchor
4747
the UI element recognition logic.
4848

49+
1. Install `libimobiledevice` with `brew install libimobiledevice`
50+
2. Connect the iPhone with a USB C cable
51+
3. Allow the iPhone accessory to connect via the macOS dialog that appears
52+
4. Allow the iPhone to trust the macOS computer via the iOS trust dialog
53+
5. Run `idevicepair pair` and ensure the success confirmation is printed
54+
55+
Turns out for modern iOS versions the "Developer Disk Image" thing (which is
56+
something that runs alongside iOS on the phone as long as it is connected to the
57+
macOS computer and provides the macOS<>iOS interaction services),
58+
`libimobiledevice` can't be used anymore?
59+
60+
1. Install `pymobiledevice3`: `pip3 install pymobiledevice3 --break-system-packages`
61+
2. Run `sudo pymobiledevice3 lockdown start-tunnel` and note the `--rsd` line
62+
3. Confirm the pairing request on the iPhone
63+
64+
Next up looks like what's needed is:
65+
66+
1. Enable developer mode: `pymobiledevice3 amfi enable-developer-mode`
67+
68+
Requires disabling the screen lock (presumably can be re-enabled after).
69+
This can also be done via Settings > Privacy & Security, but the option will
70+
only appear when connected to XCode.
71+
72+
2. Mount the developer disk image: `pymobiledevice3 mounter auto-mount`
73+
74+
This will install the developer tools including the `screenshot` service.
75+
Without this, this error shows up: `ERROR Failed to start service.`
76+
4977
## The "write" side
5078

5179
The only feasible solution seems to be to part a HID to the iPhone and have it

0 commit comments

Comments
 (0)