Skip to content

11.2d: device sessions inside the Wi-Fi tunnel - #100

Merged
SirReaDy merged 3 commits into
mainfrom
feat/wifi-tunnel-session
Oct 26, 2026
Merged

SirReaDy merged 3 commits into
mainfrom
feat/wifi-tunnel-session

Conversation

@SirReaDy

@SirReaDy SirReaDy commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

A whole device session can now run inside the iOS 17+ tunnel over Wi-Fi (11.2c), so installs and every other device task work there too.

How it works

  1. Lockdown inside the tunnel: through com.apple.mobile.lockdown.remote.trusted, which the tunnel already trusts, so there's no StartSession.
  2. Services: each one through its shim (<service>.shim.remote), checked in.
  3. When it's used: on the new wifi-tunnel route, and as the fallback when lockdown over Wi-Fi can't be reached (disconnected, not found, timed out) and the device has a remote pairing.
  4. DeviceTunnel.openService(name): any service RSD lists, by its exact name.

Installs over Wi-Fi go through the tunnel

  • Tunnel first: a device found on Wi-Fi with a remote pairing now opens through the tunnel, and by lockdown over Wi-Fi only when the tunnel doesn't open. route: 'wifi' stays lockdown only. The reason: an iPhone on iOS 26.6.1, reached from Windows, answered lockdown over Wi-Fi but closed every service it started there, so installs failed. The same iPhone installs by lockdown over Wi-Fi from a Mac, and why it differs isn't known yet. The tunnel works in both cases and is faster (22.9 MiB/s against 16–18).
  • The remote pairing is made by cable: whenever a session opens over USB on iOS 17.4+ and none is saved. The device then works on Wi-Fi once the cable is out. A device that would ask the user first is left alone, and this never fails the session.
  • Wi-Fi debugging is read before it's written: on iOS 26 the write resets the tunnel, so a device that has it on already is left alone. For a device on Wi-Fi it's turned on by lockdown at its address, because the tunnel's lockdown doesn't return wireless lockdown values.
  • Tests: the tunnel is tried before any lockdown connection to the device's address; a device without a remote pairing, or on the wifi route, opens by lockdown only; the remote pairing is made by cable and never fails the session.

Fix: the Wi-Fi search on iOS 26.4+

A device signs its Wi-Fi advert once for each computer it's paired with: authTag, authTag#1, authTag#2… Only authTag was read, so a device paired with more than one computer wasn't found when this computer's tag wasn't the first. The search now reads all of them. The test now uses the shape a real iPhone sends, with this computer's tag second.

Probe

  • device-probe … --wifi-tunnel: any command through a session inside the Wi-Fi tunnel. The remote pairing is made or checked over USB first.
  • The probe now opens each usbmuxd device once before the Wi-Fi search, so it knows its MAC.

Checks

  • iPhone on iOS 26.6.1 (paired with two computers):
    • found on Wi-Fi only after the fix;
    • info and install straight over Wi-Fi;
    • the Wi-Fi tunnel in 3.4 s, 73 services, an AFC upload at 22.9 MiB/s;
    • info and a signed SideStore install inside the Wi-Fi tunnel;
    • an install through the USB tunnel.
  • iPhone on iOS 18.2:
    • found on Wi-Fi by its MAC;
    • info and the app list straight over Wi-Fi and inside the Wi-Fi tunnel.
  • Automated: pnpm verify (1366 tests), and the full suite twice under full CPU load.

Devices reachable only through the tunnel (Apple TV, Vision Pro) come with 11.3a.

A whole device session can now run inside the iOS 17+ tunnel over Wi-Fi:
lockdown through com.apple.mobile.lockdown.remote.trusted (no StartSession),
every service through its shim. The session opens this way on the
'wifi-tunnel' route, and as the fallback when lockdown over Wi-Fi can't be
reached and the device has a remote pairing.

DeviceTunnel.openService opens any service RSD lists by its exact name.

The Wi-Fi search now reads every authTag in a device's advert: iOS names
one per paired computer, authTag, authTag#1, authTag#2… Only the first was
read, so a device paired with more than one computer wasn't found.

The device probe takes --wifi-tunnel, and opens each usbmuxd device once
before searching so it knows its MAC.
On iOS 17 and later, lockdown straight over Wi-Fi still answers, but the
device closes every service it starts there (installation_proxy,
misagent, AFC; seen on an iPhone on iOS 26.6.1 from Windows). The
fallback to the tunnel only ran when lockdown itself didn't answer, so a
device on Wi-Fi without usbmuxd's own Wi-Fi link could never install.

- A device found on Wi-Fi with a remote pairing now opens through the
  Wi-Fi tunnel first, and by lockdown only if the tunnel doesn't open.
  route: 'wifi' stays lockdown only.
- Whenever a session opens by cable on iOS 17.4 or later and no remote
  pairing is saved, one is made (makeRemotePairing, on by default), so
  the device works on Wi-Fi once the cable is out. A device that would ask
  the user first is left alone; it never fails the session.
- Wi-Fi debugging for a device on Wi-Fi is turned on by lockdown at its
  address: the tunnel's lockdown doesn't return wireless lockdown values,
  and iOS 26 resets it on the write. It is read first everywhere, so a
  device that has it on is never written to.
Lockdown over Wi-Fi closing every service it starts was seen on one
iPhone on iOS 26.6.1 from Windows, while the same iPhone installs by
lockdown over Wi-Fi from a Mac. The comment and docs said it was true of
iOS 17 and later; they now say what was seen, and that the tunnel is
also the faster way.

The test of the tunnel going first now checks that it is tried before
any lockdown connection to the device's address. The roadmap lists what
11.2d does now.
@SirReaDy
SirReaDy merged commit b55e09d into main Oct 26, 2026
8 checks passed
@SirReaDy
SirReaDy deleted the feat/wifi-tunnel-session branch October 26, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant