Highlights
✨ Restore A16-or-later devices from DFU mode
In DFU mode, A16-or-later devices show up as a Debug USB ("KIS") device, which pymobiledevice3 couldn't talk to before. restore update now works from there:
- On macOS it goes through Apple's own
deviceinterfaced, the same path Apple's MobileDevice framework restores through, so it needs no root and no extra drivers. IOKit and libusb can't open this device even as root. - On Linux and Windows it speaks KIS over libusb, the same way libirecovery does.
(#2144)
pymobiledevice3 restore update -i iPhone.ipsw✨ Easier DFU entry: the host restarts the phone for you
The hard part of entering DFU mode by hand is the quick button presses that force a restart. On a booted iPhone 8 or later, restore enter-dfu (and restore update --dfu) now restarts the phone itself. You hold VOLUME DOWN, add SIDE once the screen goes black, then release SIDE. --manual keeps the full button sequence. (#2144)
pymobiledevice3 restore enter-dfu✨ Reboot over USB-C power delivery: restore restart --vdm
On macOS, restore restart --vdm reboots a device with Apple's USB-PD reboot message, sent by the Mac's own USB-C port controller. The device's USB-C controller handles it, so it needs no pairing and works in Recovery and DFU mode as well as booted. It needs root, and only reaches devices plugged directly into the Mac's USB-C ports; when several are connected, --ecid picks one. (#2141)
sudo pymobiledevice3 restore restart --vdm✨ macOS reaches Recovery/DFU devices through IOKit; pyusb is gone
On macOS, Recovery and DFU devices are now reached through IOKit, so libusb isn't needed there. restore --libusb (or PYMOBILEDEVICE3_USB_BACKEND=libusb) switches back to libusb. Elsewhere, a thin built-in libusb binding replaces the pyusb dependency. It makes the same device requests pyusb did (checked against a trace of pyusb's libusb calls). A missing libusb, or a failed libusb call, now comes with a hint for the platform: the package to install, a udev rule on Linux, or the WinUSB driver on Windows. (#2143, #2145, #2148, #2150)
🐛 Fixes
crash clearno longer fails because of an interrupted sysdiagnose. The device refuses to delete the leftover files of one, and never cleans them up itself, soclearnow removes everything else and names the leftover sysdiagnose in a warning. Any other file it can't remove is reported with the reason. (#2147)
What's Changed
- 755b7e5 usb: Read a device's string languages once over libusb (#2150) (@doronz88)
- 36ac432 ci: Load libusb on the Windows runners (#2149) (@doronz88)
- af1db9d tests: Check libusb's missing-library and error hints on every platform (#2148) (@doronz88)
- 34765f2 crash: Keep an interrupted sysdiagnose on clear instead of failing (#2147) (@doronz88)
- 69ae2b8 usb: Talk to libusb directly instead of through pyusb (#2145) (@doronz88)
- 80a8595 usb: Split control transfers into control_in and control_out (#2145) (@doronz88)
- 7977047 usb: Load IOKit for deviceinterfaced only on macOS (#2144) (@doronz88)
- 3bcce69 restore: Restart a booted iPhone into the DFU button sequence (#2144) (@doronz88)
- 5d74f4d irecv: Restore A16-or-later devices from DFU mode (Debug USB/KIS) (#2144) (@doronz88)
- e980fbd usb: Reach Recovery/DFU devices through IOKit on macOS (#2143) (@doronz88)
- 6b2c882 sysmon: Skip process task tests when DVT is unavailable (#2142) (@doronz88)
- e60cac6 restore: Restart over USB-C power delivery (restart --vdm) (#2141) (@doronz88)
Full Changelog: v11.47.0...v11.48.0