Skip to content

Installer: a named device works beside other devices - #167

Merged
henrikklee merged 5 commits into
OrchardLinux:mainfrom
brkosebay:submit/named-device
Dec 5, 2026
Merged

henrikklee merged 5 commits into
OrchardLinux:mainfrom
brkosebay:submit/named-device

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

What changes for people

With the device named (--ecid or --location), other devices on USB no longer hold the install or launch up:

  • Devices running m1n1 or Linux elsewhere don't count as "another device", and the ibss route goes ahead beside them.
  • checkra1n can't be told which device to take: it takes any device in DFU mode and, once done, waits for the next one. Its start of iOS for the split now knows the target's ECID (and its port while in DFU mode):
    • before checkra1n runs, it waits up to a minute until no other device is in DFU, recovery or Pongo mode, then refuses and names the devices;
    • while it runs, another device coming into one of those modes stops it at once;
    • once its log says "All Done" it is stopped, so it doesn't take the next device;
    • only the device that reports the target's ECID over lockdown is asked for checkra1n's SSH greeting, so other devices running iOS may stay connected.

Without an ECID there must still be exactly one device running iOS, as before.

The graphical installer's --ecid / --location is in #98, which this doesn't need.

Rebase notes

This is rebased onto the checkra1n access route from #108 (0.12.4), the A7 hint from #114 and #139's start-once-open. The ECID is passed through the existing start(executor, soc, …). The start loop keeps both sets of checks: the "All Done" stop and the other-device stop from here, and the last-word error and silent-log timeout from main.

Tested

  • iPhone 7 (D101, iOS 14.1), from an Apple silicon Mac, orchard install omarchy-a --ecid … --access checkra1n --split, with two other devices on USB running Linux. In 3 runs out of 3, checkra1n started iOS on the named phone only: "Checkmate!", download mode, "All Done", the companion answered, and the split screen opened. Each run stopped at the split choice, and nothing was approved.
  • Not exercised on a device: a second device in DFU mode while checkra1n runs.
  • cargo test -p orchard-runtime (101 passed) and -p orchard-flow (118 passed); cargo check --workspace.

🤖 Generated with Claude Code

brkosebay and others added 5 commits December 5, 2026 08:03
With the device named (--ecid, --location), the installer still waited
for other Apple devices to go: a second phone running iOS held up a
launch by the ibss route, and a device elsewhere running m1n1 or an
installed system held up any run. People who work on several devices
keep them plugged in.

With the target named, the driver no longer lists other devices as in
the way, and a device elsewhere in m1n1 or Linux doesn't count as
another device: palera1n and checkra1n only take devices in DFU,
recovery, Pongo or iOS, and everything of ours follows the target by
its ECID or port. What can't be addressed is guarded where it runs
(palera1n's start, and checkra1n's in the next commits). Unnamed, every
device still counts, and one in DFU mode always does.

Watcher::is_target says whether a listed device is the target itself
(by ECID, else by its last port), not merely one the rule ignores; the
list of devices in the way uses it to show the target beside them.

Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The flow held every start (the install system, the launcher's entries,
iOS with the helper) while other Apple devices were on USB. Some starts
are addressed to the device itself and can't take another one: the
ibss route (gaster's worker matches the ECID, chip and board, and
everything after it goes to the device's port), and checkra1n's start
of iOS, which waits for the devices checkra1n could take by itself.
Those no longer wait; palera1n and checkra1n as boot routes still do.

The command line's install passes the route named with --boot (or
ORCHARD_BOOT) to the flow, which decides by it.

Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
checkra1n can't be told which device to start: it takes any device in
DFU mode, and after it is done it waits for the next one. Its start of
iOS for the split needed exactly one device running iOS on USB, and
could take a second device that came into DFU mode meanwhile.

The start now knows the target's ECID (and its port while in DFU mode):
- before checkra1n runs, it waits up to a minute until no other device
  is in DFU, recovery or Pongo mode, and refuses with the devices'
  names after that;
- while it runs, another device coming into one of those modes stops
  it at once;
- once its log says "All Done" it is stopped, so it doesn't wait for
  the next device;
- only the device that tells the target's ECID over lockdown is asked
  for checkra1n's SSH greeting; other devices running iOS may stay.

Without an ECID there must still be one device running iOS, as before.

Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: LLM
Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without a named device (no ECID, as `orchard resize` on iOS 12 to 14
starts it), the check for other devices checkra1n could take had no way
to know the target and counted it too: every start waited a minute and
then failed with "checkra1n would also take another device".

Without an ECID the target is the one device checkra1n could take, known
by its port from then on; a second such device still counts. The checks
are plain functions over a listing now, with tests for both cases.

Assisted-by: LLM
@henrikklee
henrikklee merged commit 7d41234 into OrchardLinux:main Dec 5, 2026
11 checks passed
@henrikklee

Copy link
Copy Markdown
Contributor

Merged, thank you @brkosebay! People who work on several devices keep them all plugged in, and this lets a named device go ahead beside the others while still guarding the starts that can't be addressed (palera1n, checkra1n). The new is_target check also fixes a real mix-up in the device list.

What changed on the branch: I rebased it onto main and added one commit (checkra1n: never count the target as a device in the way) that fixes a regression:

  • Without a named device (no ECID), the new check for other devices checkra1n could take had no way to recognise the target. It counted the target itself as "another device". Every start without --ecid would have waited a minute and then failed with "checkra1n would also take another device", for example every orchard resize on iOS 12 to 14, which calls the start with no ECID.
  • Now, without an ECID, the target is the one device checkra1n could take (as the route always required), and from then on it's known by its port. A second device in DFU, recovery or Pongo mode still counts and still stops checkra1n. With an ECID nothing changes.
  • The checks are now plain functions over a device listing (target_port, in_the_way), with two unit tests: the no-ECID single-device case (also once the target moves on to Pongo), and the named device with other devices around (only another one in DFU counts; ones in iOS or m1n1 don't).

Follow-ups: it ships with today's tools release. A hardware run of orchard resize on iOS 12 to 14 with a second device plugged in would be a welcome confirmation if you have one at hand.

@henrikklee henrikklee mentioned this pull request Dec 5, 2026
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.

2 participants