From 465b8930f0165b48f2979fc617d8455414594aed Mon Sep 17 00:00:00 2001 From: ashtonamory <287786029+ashtonamory@users.noreply.github.com> Date: Fri, 4 Dec 2026 07:26:03 -0400 Subject: [PATCH 1/2] ibss: Take a protocol error as the boot ROM's new DFU session After gaster's patch the boot ROM leaves USB and comes back with a new DFU session. On an iPhone 5s (N51) attached to a Linux host the transfer in flight ends with EPROTO (nusb TransferError::Fault, Kind::Other), not a disconnect, so every ibss start failed right after the exploit had worked. Accept that error too; wait_marked still requires the boot ROM back with gaster's mark, so a real fault is still caught. Tested: N51, orchard install omarchy-a --boot ibss and orchard run, several starts. Assisted-by: LLM --- CHANGELOG.md | 4 ++++ crates/runtime/src/ibss.rs | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cca7f56..f623213 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,10 @@ is on main, the release is published with that section as its notes (AGENTS.md, route: the boot request can end in a USB protocol error while the iBSS takes over, and the run no longer stops there. +- On Linux, the iPhone 5s and other A7 devices start by the ibss route: + the boot ROM's new DFU session after gaster can show as a USB protocol + error instead of a disconnect, and the start no longer stops there. + - The A13 iPhones (iPhone 11, 11 Pro, 11 Pro Max, SE 2nd generation) get their boot firmware built as the A12's: their patched iBSS takes the same borrowed manifest, so no manifest of your own is needed. diff --git a/crates/runtime/src/ibss.rs b/crates/runtime/src/ibss.rs index cd259de..4b7edb7 100644 --- a/crates/runtime/src/ibss.rs +++ b/crates/runtime/src/ibss.rs @@ -167,7 +167,11 @@ fn fresh_dfu_after_gaster(session: &mut Session, say: &mut dyn FnMut(&str) dfu.reset().map_err(usb::error)?; break; } - Err(e) if e.kind == orchard_usb::Kind::Disconnected => { + // Leaving mid-transfer can also end it with a protocol error + // (Linux EPROTO, nusb's TransferError::Fault, Kind::Other), as + // on an A7 (N51); wait_marked below still requires the boot + // ROM back with gaster's mark. + Err(e) if matches!(e.kind, orchard_usb::Kind::Disconnected | orchard_usb::Kind::Other) => { say("The boot ROM started a new DFU session"); break; } From ff48faf6a4345b361c8a39671152f7da74c148ce Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Sat, 5 Dec 2026 08:02:36 +0800 Subject: [PATCH 2/2] ibss: take only a broken transfer as the new DFU session Since #170 a transfer that breaks off on the bus (Linux EPROTO, what the iPhone 5s shows here) has its own kind, Kind::Fault. Take that and a disconnect as the boot ROM leaving for its new session, rather than every error without a kind of its own (Kind::Other). Assisted-by: LLM --- crates/runtime/src/ibss.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/runtime/src/ibss.rs b/crates/runtime/src/ibss.rs index 4b7edb7..958b6bc 100644 --- a/crates/runtime/src/ibss.rs +++ b/crates/runtime/src/ibss.rs @@ -168,10 +168,9 @@ fn fresh_dfu_after_gaster(session: &mut Session, say: &mut dyn FnMut(&str) break; } // Leaving mid-transfer can also end it with a protocol error - // (Linux EPROTO, nusb's TransferError::Fault, Kind::Other), as - // on an A7 (N51); wait_marked below still requires the boot - // ROM back with gaster's mark. - Err(e) if matches!(e.kind, orchard_usb::Kind::Disconnected | orchard_usb::Kind::Other) => { + // (Linux EPROTO: Kind::Fault), as on an A7 (N51); wait_marked + // below still requires the boot ROM back with gaster's mark. + Err(e) if matches!(e.kind, orchard_usb::Kind::Disconnected | orchard_usb::Kind::Fault) => { say("The boot ROM started a new DFU session"); break; }