

# 2026-11-24 — PROPER DUMP ACHIEVED (the fix that should have been done on day 1)

The user's diagnosis was exactly right: the project inherited a corrupted dump
(`vn.gsm.md_3.19.0-PARTIAL.ipa`) whose __LINKEDIT was not taken from memory, and
treated it as the definitive source. Nothing else was ever wrong with the approach.

## What was done
1. Original 3.19.0 installed from the App Store on the X (confirmed FairPlay:
   `SC_Info/Driver.sinf|supf|supp`, no mobileprovision).
2. `dump_orig2.py` — spawn-gated launch + survival guards (exit/_exit/abort ->
   native `b .` self-branch so the calling thread spins with no JS involvement;
   kill/pthread_kill -> ret0; -[UIApplication openURL:...] -> no-op) + force
   page-in of every page (that is what performs the FairPlay per-page
   decryption) + fwrite straight from process memory into the app's own tmp
   (the process is sandboxed and cannot write to /var/mobile/Media).
   The two script bodies share ONE preamble declared once in Python, so no
   helper can be orphaned when they are split.
3. 172 modules dumped, copied out by root shell, pulled by AFC.
4. `rebuild_dump.py`: on-disk file as the base (pre-rebase __DATA pointers),
   __TEXT and __LINKEDIT overlaid from memory.

## Result — the Driver is finally whole
```
Driver      : wrote 36372384 bytes  __TEXT(0x0,+0x1d98000) __LINKEDIT(0x2044000,+0x26bfa0)
              dyld_info: rebase 0x2044000/0x170d0  bind 0x205b0d0/0x3a430
                         lazy  0x2095d98/0x486d0   export 0x20de468/0x64610  [LOOKS VALID]
build-info  : dyld_info rebase 0x800000/0x1f40 bind 0x801f40/0x1e80 lazy 0x803eb0/0x1d78 [LOOKS VALID]
```
- **Driver: 7798 symbols, ALL with names** (the old dump had 7798 with zero names).
- **build-info: 395 symbols, ALL with names**, and they are the shield's own
  classes: `_OBJC_CLASS_$_ShieldAPI`, `_ShieldAssets`, `_ShieldConfig`,
  `_ShieldData`, `_ShieldDataProtection`, `_SecuredFile`, `_SecuredStore`, ...
- Only **Driver** was corrupted; build-info's on-disk dyld_info was always valid.
- The new Driver needs only the 6 detector neuters re-applied (0x22C740 -> ret,
  0x1709780 -> mov w0,#0;ret, 0x170867C/0x1708684/0x17086BC/0x17086C0 -> mov x0,xzr);
  the 11 launch-path sites are ALREADY pristine in the fresh dump (verified 11/11).
- `uncrypt46.py` sets cryptid 1 -> 0 (the fresh dump carries the App Store header).

## Build 46
`E:\ios\GSMDriver-3.19.0-patched46-unsigned.ipa`
sha256 cfdd3c76578d3fc6853782b7881c809729af3c1b88706c1cad2a0c9d39b0bc1b
65 patch sites verified, 0 encrypted binaries, bundle id vn.gsm.md, version 3.19.0.

## Observed behaviour of build 46 on the X
- Installs and launches; the app runs in the foreground for the full 20 s and is
  then killed by **the process-launch watchdog** ("exhausted real (wall clock)
  time allowance of 20.00 seconds", ProcessState: Running) — it never produces a
  first frame.
- This is a NEW behaviour: build 45 showed the ban screen immediately. The proper
  Driver makes the app run substantially further along the real launch path.
- Frida cannot spawn it (spawn times out waiting for the launch event) and cannot
  attach in time after `uiopen`, because the watchdog window is tight.
- Next step: attach during the window (or pull the watchdog crash report, which
  contains every thread's backtrace at the 20 s mark) to see where the launch path
  is stalled. With the real symbol table now available, that backtrace can be
  symbolicated instead of guessed.

## Tooling notes
- `runsh.py` + `launch46b.sh` for uiopen; `dump_orig2.py` (two-phase: guards at
  spawn, dump after resume, PRELUDE shared by both bodies); `rebuild_dump.py`;
  `apply46.py`; `uncrypt46.py`; `build_tar46.py`.
- `uicache -l` shows which PATH the bundle id is registered at — after deleting
  and re-creating a bundle, `uicache -a` (respring) re-registers it, and the
  registered path may differ from the one you just wrote to. Check it first.
