Repository navigation
usb: a broken transfer can be a lost reply on a pwned boot ROM - #170
Merged
Merged
Conversation
On Linux, a device that leaves USB in the middle of a control request can show as a broken transfer (nusb's TransferError::Fault, EPROTO) rather than as a disconnect. usbliter8's boot request on an iPhone XS Max ended that way while the iBSS started, and the ibss route stopped with "DFU start on a pwned boot ROM: hardware fault or protocol violation" although the patched iBoot came up in recovery mode a few seconds later. Give that failure its own kind, Fault, and let reply_may_be_lost take it as an unconfirmed reply, as it takes a timeout, stall or disconnect. The download before it still fails on any error. Assisted-by: LLM
Contributor
|
Merged, thank you @17xande! A clear diagnosis (the iBSS had started; Linux just reported the phone leaving mid-request as a broken transfer instead of a disconnect), a narrow fix that gives that failure its own kind, and RAM boots plus two installs on the XS Max from Linux to back it up. Very nice. What changed on the branch: nothing. Follow-ups:
|
henrikklee
added a commit
to ashtonamory/tools
that referenced
this pull request
Dec 5, 2026
Since OrchardLinux#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
This was referenced Dec 5, 2026
Merged
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.
On Linux,
orchard run --ibsson an iPhone XS Max (d331p) whose boot ROM a usbliter8 board entered stopped with:The patched iBSS had in fact started: the phone came up in recovery mode a few seconds later. The phone leaves USB in the middle of usbliter8's boot or finish request, and Linux reports that as a broken transfer (nusb
TransferError::Fault, EPROTO), not as a disconnect.reply_may_be_losttook only a timeout, stall or disconnect as a lost reply.This gives that failure its own kind,
Kind::Fault, and letsreply_may_be_losttreat it as an unconfirmed reply. The image download before it still fails on any error. The macOS bring-up of the iPhone XR never hit this.Tested on an iPhone XS Max from Linux (Arch, x86_64): RAM boots of hardware-check and two
orchard install omarchy-a --ibssruns, the second of which is the installed system now running. With logging added for the test, the finish request ended once inFaultand twice inDisconnected, each time with the iBSS starting.cargo test -p orchard-usb: 84 passed.Not fixed here: about one start in three, the iBSS hangs after the boot request (black screen, nothing on USB). The good and the hung starts look the same from the host, so that is still open.