github doronz88/pymobiledevice3 v11.20.0

one hour ago

Highlights

🐛 RSD connections no longer fight macOS remoted for the device

Since 11.15.5, on macOS, --rsd connections and the tunnels behind them failed intermittently from iOS 26.2 with ConnectionResetError (or ConnectionRefusedError on iOS 27.2). After a few rounds the host remoted could stop reconnecting to the device, leaving Xcode and devicectl unable to read it until remoted restarted (#1994). Thanks to @steveames for the version-by-version matrix in #1966 that tracked this down.

The device replaces a peer's RSD connection whenever another one arrives from the same host address. On iOS 27.2+ it also re-attaches (closing every advertised service port) when that peer's handshake UUID changes. So pymobiledevice3 now:

  • identifies with its own stable host ID on tunnels it creates, which nothing else on the host shares;
  • presents remoted's UUID only on the links remoted also uses: the USB NCM interface that remote start-tunnel and tunneld set tunnels up over, and --native.

✨ The userspace tunnel is now the default on macOS

--native rides remoted's own tunnel, where our connection and remoted's keep evicting each other whatever we send. It is now opt-in. Commands that need an iOS 17+ tunnel bring up the no-root userspace tunnel by default on every platform, as they already did off macOS. The native tunnel is still the automatic no-root fallback for iOS 17.0-17.3, and the library's PreferredRsdTunnel follows the same order.

pymobiledevice3 developer dvt ls /           # userspace tunnel, no root
pymobiledevice3 developer dvt ls / --native  # opt into remoted's tunnel
export PYMOBILEDEVICE3_DEFAULT_FALLBACK=native  # or prefer it for a shell

Without --native, remote start-tunnel builds the classic tunnel again. remote browse still asks remotepairingd on macOS. Over the userspace tunnel, is_remote_web_inspector_enabled() returns None (unknown); pass --native when you need a definitive answer.

📚 The device's RSD peer rules are documented

The rules above come from iOS 27.2's remoted. They're now described where the handshake UUID is chosen and in Understanding the network stacks.

What's Changed

Full Changelog: v11.19.4...v11.20.0

Don't miss a new pymobiledevice3 release

NewReleases is sending notifications on new releases.