Skip to content

Add the Amethyst route: storage access without DFU on iOS 12.2 to 13.7 - #43

Merged
henrikklee merged 1 commit into
mainfrom
amethyst-route
Dec 4, 2026
Merged

henrikklee merged 1 commit into
mainfrom
amethyst-route

Conversation

@henrikklee

Copy link
Copy Markdown
Contributor

What

Resize APFS without DFU on iOS 12.2 to 13.7, every device, the iPhone 5s, iPad Air and iPad mini 2 and 3 included: ./resize-apfs boot --amethyst. It works like the Dopamine route: one app, signed with the user's own Apple ID, that gets storage access by itself. The difference is that the host app is the official Amethyst 1.1 release instead of Dopamine. Decision note: OrchardLinux/tools#115.

Why

On iOS 12 and 13, the only way to make room was checkra1n. Its Linux build skips A7, and on the iPad mini 2 and 3 iOS panics under it (OrchardLinux/orchard#401). Owners of those devices with no Mac couldn't make room at all.

How

  • Executable built from source. Amethyst's released executable is stripped, so its jailbreak functions can't be called. scripts/build-amethyst.sh compiles the same tag's source, unchanged, with clang for iOS 12.0: current Xcode refuses the project's iOS 12 target. It then checks that the needed names are exported. embed.py swaps this executable in for the official one and refuses a stripped one. Every other file is the official release's.
  • Access/AmethystBridge.m is the Amethyst counterpart of AccessBridge.m, and Access/AmethystInterface.h lists everything it uses (five functions, two objects). The bridge:
    • hides Amethyst's window;
    • answers its first-run Sileo/Zebra question with no;
    • installs the helper from Amethyst's fade notification, right before the screen restart that ends its run;
    • restarts the whole device on the first run, when Amethyst sets the system snapshot aside as orig-fs.
  • Storage access page: before that first run, only the yellow notice changes: "Your iPad restarts once. Open Resize APFS again when it's back." The device word is the real one ("iPhone" on an iPhone). Henrik approved this wording.
  • Rootful paths: the helper and its daemon go under / instead of /var/jb. StorageAccess learns this from two optional bridge methods, so other apps' bridges (the tools installer) keep compiling and working. The developer SSH server is not offered on this route.
  • Signing: xtool always signs, because Xcode no longer builds for iOS 12 and 13. Its signing record is kept apart from the Dopamine one.
  • iOS 12.0 and 12.1 are left out: the library needs the Swift runtime that iOS ships from 12.2 on, and Amethyst's executable brings none. The checkra1n route covers those versions.

Testing

  • python3 -m unittest discover -s Tests/ReleaseTests: 171 tests OK, 15 of them new for this route.
  • swift test: 106 tests OK.
  • scripts/check-release.py passes on the repository and on out/device-ios12.
  • scripts/build-device-ios12.sh builds locally, the access payload and Amethyst's executable included (minos 12.0, names exported). Release CI builds it the same way.
  • embed.prepared_ipa on the real Amethyst 1.1 IPA (pin verified): the library is added and our resources and helper are in place.

Not run on a device yet. The first test is en3r0's iPad mini 3 (iOS 12.5.5).

Assisted-by: LLM

The route without DFU so far needs Dopamine, iOS 15 and later. iOS 12 and 13
devices could make room only through checkra1n, whose Linux build leaves out
A7 (iPhone 5s, iPad Air, iPad mini 2 and 3) and whose iOS boot panics on the
iPad mini 2 and 3 (orchard#401). Amethyst is the same kind of app for
iOS 12.0 to 13.7 on every device (OrchardLinux/tools#115).

The app is the official Amethyst 1.1 release with Resize APFS in it,
installed with the user's Apple ID through xtool (Xcode builds nothing for
iOS 12 and 13). Amethyst's released executable is stripped, so its jailbreak
functions have no names to call: scripts/build-amethyst.sh compiles the same
tag's source, unchanged, with clang for iOS 12.0, and embed.py puts that
executable in place of the official one, refusing a stripped one. Every
other file is the official release's.

Access/AmethystBridge.m is the Amethyst counterpart of AccessBridge.m. It
hides Amethyst's window, answers its first-run question (no Sileo, no Zebra),
installs the helper from Amethyst's "fade" notification right before the
userspace reboot that ends its run, and restarts the whole device on the
first run, when Amethyst sets the system snapshot aside as orig-fs. The
storage access page then says "Your iPad restarts once. Open Resize APFS
again when it's back." (iPhone on an iPhone). Amethyst is rootful, so the
helper and daemon go under / instead of /var/jb; StorageAccess learns that
from two optional bridge methods, so other apps' bridges keep working.

iOS 12.0 and 12.1 are left out: the library needs the Swift runtime iOS has
from 12.2 on, and Amethyst's executable brings none.

Not run on a device yet.

Assisted-by: LLM
@henrikklee
henrikklee merged commit 0b53b2f into main Dec 4, 2026
1 check passed
@henrikklee
henrikklee deleted the amethyst-route branch December 4, 2026 07:47
grierj pushed a commit to grierj/tools that referenced this pull request Dec 4, 2026
`orchard resize --amethyst` (or --access amethyst) installs Resize APFS
inside the pinned official Amethyst 1.1 app, signed with the person's
Apple ID through xtool, as the dopamine route does with Dopamine. It
reaches every device on iOS 12.2 to 13.7 from any computer, so the iPhone
5s, iPad Air and iPad mini 2 and 3 can make room without checkra1n, whose
Linux build leaves out A7 (OrchardLinux#115).

The Resize APFS release brings the Amethyst part in
out/device-ios12/access, with Amethyst's executable built from its source
(the released one is stripped, so its functions have no names to call);
prepare() puts that executable in place of the official one and refuses a
stripped one, as resize-apfs's embed.py does (OrchardLinux/resize-apfs#43).
Xcode builds nothing for iOS 12 and 13, so only xtool signs, and there is
no Developer Mode step.

The route needs its entry in routes.toml (orchard) and a Resize APFS
release that has the part.

Assisted-by: LLM
henrikklee added a commit to alistairreay/orchard that referenced this pull request Dec 4, 2026
Amethyst carries Resize APFS into iOS 12 and 13 on every device without
DFU mode (OrchardLinux/resize-apfs#43, OrchardLinux/tools#160). It comes
ahead of checkra1n there: checkra1n needs DFU mode and its Linux build
leaves out A7. iOS 12.0 and 12.1 stay with checkra1n: the app's library
needs the Swift runtime iOS has from 12.2 on.

Tools releases before tools#160 drop an access route they do not know and
never choose one themselves, so the entry is safe for them.

Assisted-by: LLM
@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.

1 participant