Repository navigation
Conversation
…ntexts - watch_device.py --rsd HOST PORT reaches the paired iPhone through a RemoteXPC tunnel (pymobiledevice3 remote start-tunnel -t wifi -p tcp) instead of USB. companion_proxy is not exposed over Wi-Fi lockdown, but its RSD shim works inside the tunnel, so no cable is needed once the iPhone has a RemotePairing record (lockdown remotepairing --pair, once over USB). - Forwarded Watch services are opened over TCP inside the tunnel. The Watch pair record keeps supplying its SystemBUID, so an existing Watch trust is reused. - create_service_connection accepts and forwards ssl_context/strip_ssl, which pymobiledevice3 11.4x passes when a service enables TLS; without it, StreamingZipConduitService fails with a TypeError. - Pin pymobiledevice3 11.45.1 (TCP tunnels need Python 3.13+, and 11.45.1 fixes RemotePairing with srptools 2.0).
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This builds on xtool-org#350 and adds a cable-free path to the Watch deployment helper, plus a compatibility fix for current pymobiledevice3. It targets your branch so it can land as part of xtool-org#350 if you want it.
What it does
watch_device.py --rsd HOST PORTreaches the paired iPhone through a RemoteXPC Wi-Fi tunnel (pymobiledevice3 remote start-tunnel -t wifi -p tcp) instead of USB usbmux. Without--rsdthe USB path is unchanged.SystemBUID, so a Watch that already trusts the host is reused as is.create_service_connectionaccepts and forwardsssl_context/strip_ssl. pymobiledevice3 11.4x passes the TLS context there when a service enables SSL; without it,StreamingZipConduitServicefails withTypeError: ... unexpected keyword argument 'ssl_context'.Why a tunnel
com.apple.companion_proxyis not usable over Wi-Fi lockdown (--mobdev2): the connection is dropped every time. Its RSD shim (com.apple.companion_proxy.shim.remote) does work inside a RemoteXPC tunnel, and the forwarded Watch lockdown port is reachable over TCP on the tunnel address.The iPhone needs a RemotePairing record first. On iOS 27.2 the device-initiated flow (
remote pair-host) never listed the Linux host under Settings > Developer, but creating the record over USB once works without any prompt:Testing
Hardware, from Ubuntu 24.04 (Python 3.13, pymobiledevice3 11.45.1), iPhone unplugged:
xtool dev sign-watch, and a developer install of a signed.app, verified in the Watch app registry. A full sign + install round trip takes about 20 s.Unit tests:
python -m unittest test_watch_devicepasses (6 tests), including two new ones: the RSD path opens forwarded ports over TCP and never touches usbmux, and the service TLS context reaches the forwarded connection.Known limits
start-tunnelreports "No tunnel services discovered".