ipadecrypt icon indicating copy to clipboard operation
ipadecrypt copied to clipboard

decrypt fails on multi-arch framework "expected one arm64 slice" and "SUPF arm64 page records are incomplete"

Open ViewtifulCereza opened this issue 1 month ago • 1 comments

Tool version: 0.9.0-rc1 Device / jailbreak: iPad Gen 5 iOS 18.3 Host OS: Arch Linux Kernel: 7.2

Summary

Decrypting an app whose embedded framework ships both an arm64 and an arm64e slice fails in two stages. The affected binary is Payload/REWE.app/Frameworks/Batch.framework/Batch (Batch SDK) in the App Store app com.rewe.iosapp (v6.16).

Stage 1 - expected one arm64 slice, found 2

decrypt failed: Payload/REWE.app/Frameworks/Batch.framework/Batch:
  expected one arm64 slice, found 2

The framework is a FAT Mach-O with two arm64-family slices:

arch fat offset size cryptid cryptoff cryptsize
arm64 16384 2769504 1 16384 1261568
arm64e 2801664 2836896 1 16384 1327104

The decrypt flow appears to assume at most one arm64-family slice per Mach-O and aborts instead of selecting the slice matching the target device (arm64e on A12+).

Stage 2 - SUPF arm64 page records are incomplete

As a workaround I reduced the FAT binary to the single arm64e slice (byte-exact extraction of the slice region [2801664 .. 2801664+2836896], i.e. a valid standalone thin Mach-O; cryptoff/cryptsize unchanged, region 16 KB-aligned and fully contained in the slice). The stage-1 error disappears, but decryption then fails with:

decrypt failed: Payload/REWE.app/Frameworks/Batch.framework/Batch:
  SUPF arm64 page records are incomplete

The thinned slice is byte-identical to the original arm64e slice and structurally valid (verified: MH_MAGIC_64, cryptid=1, encrypted region [16384 .. 1343488], all 16 KB-aligned, within the slice). So this second failure does not appear to be caused by the thinning — the FairPlay page records of this framework seem not to be fully recovered by the decrypt method itself.

This may be related to the "some frameworks seemed to not work" note in #22.

Steps to reproduce

  1. ipadecrypt decrypt com.rewe.iosapp (or the local IPA)
  2. Observe stage-1 failure on Batch.framework/Batch.
  3. (Optional) thin the binary to the arm64e slice only; re-run → stage-2 failure.

Expected

  • The decrypt flow selects the device-matching arm64-family slice when a framework ships several, instead of aborting (stage 1).
  • FairPlay page records for such frameworks are recovered completely (stage 2).

Notes

  • Workaround for others hitting stage 1 only: reduce the framework to the device's slice before decrypting (lipo -thin, or any FAT-slice extractor). This does not resolve stage 2.

ViewtifulCereza avatar Oct 27 '26 13:10 ViewtifulCereza

Closing this as the fallback method works. Sorry for the confusion :)

ViewtifulCereza avatar Oct 29 '26 10:10 ViewtifulCereza