

# 2026-11-24 — The 4 stub `ret` patches were a LAZY-BINDING workaround, not detector blinding

This reframes the inherited patch set and explains the trap.

## Evidence (all verified at runtime on the X, build 45 restored in memory)
- Calling ANY of these Driver import stubs directly with x0=0 traps immediately
  ("Error: abort was called"): 0x19038A8, 0x18FE484, 0x18FE118, 0x18FE550, 0x18FE508.
- Their `__la_symbol_ptr` GOT slots STILL point into Driver's own `__stub_helper`
  (e.g. 0x18FE118 -> slot 0x1ed0c28 -> base+0x190df64) **before and after** the call,
  i.e. the lazy bind NEVER completes.
- `LC_DYLD_INFO_ONLY` in the shipped Driver: rebase_off=0x2142a78 sz=0x25f60 (valid),
  export_off=0x21cf700 sz=0xe08a0 (valid), **bind_off=0x29 sz=0x10 (garbage),
  lazy_bind_off=0x1d sz=0x10 (garbage)**. No LC_DYLD_CHAINED_FIXUPS.
  Symtab/strtab are zeroed (7798 syms, n_strx=0). So the lazy-bind stream is unusable
  and import names are unrecoverable statically.
- Therefore those accessors can never be bound -> the real app launch path (which is
  the only code that calls them) cannot run while they are needed.
- The inherited pipeline's `c0035fd6` (ret) on those 4 stubs was therefore a workaround
  for the same broken bind, not a detector blind.

## Trap localisation
- The trap happens BEFORE 0x3b8e4c in `Driver+0x3b8da4`: Interceptor probes on
  0x3bc904 / 0x246c58 / 0x2dc64 / 0x3bcb70 / 0x23a1e8 / 0x19228a0 / 0x19024f8 never fire.
  So it is inside the first two metadata accessors at 0x3b8dd4 / 0x3b8e0c.
- No fatal reporter fires at all (all attached successfully, none called):
  abort, abort_with_payload, abort_with_reason, __abort_with_payload, abort_report_np,
  __assert_rtn, swift_reportError, _swift_stdlib_reportFatalErrorInFile,
  swift_unexpectedError, objc_exception_throw, exit, and write(2) to fd 2.
  => dyld halts from its OWN embedded code (not libsystem_kernel/libsystem_c).
- No `brk`/`udf` anywhere in 0x3b8da4..0x3bb014 -> not a bare Swift trap either.
- Stalker block tracing from inside a NativeCallback recorded 0 events even with a
  deferred parse -> cannot be used to localise here.
- Note: `swift_dynamicCastFailure` is not exported by this iOS 16.7.16 libswiftCore.
- Also: 228 LC_LOAD_DYLIB entries; the stub-helper literals (0x6468/0x64bf/0x64f0/
  0x6537/0x6591) land inside the LC_LOAD_DYLIB command region, consistent with the
  bind stream being lost.

## What this means
The blocker is no longer "the shield decides to ban" alone: the patched IPA cannot
even execute the real app's launch path because four of its imports cannot be bound.
A fresh install on the 15 Pro is the cleanest way to get the missing symbol name,
because without Frida attached the trap becomes a REAL crash and iOS writes a crash
report containing dyld's message (typically
`Symbol not found: _swift_getTypeByMangledNameInContextInMetadataState...` or similar).

## Tooling notes (this session)
- `root_exec.py` must run under fv17 (system python's frida is older than the new
  on-device frida-server -> "major versions match" error).
- `runsh.py` runs a shell script FILE as root; it auto-globs `.jbroot-*`.
- File paths: runsh's OUTFILE must be `/var/mobile/Media/<name>` (opened by the frida
  agent). Files created INSIDE the shell script must use
  `/rootfs/private/var/mobile/Media/<name>` (the shell's view); AFC root == that Media dir.
- DDI must be re-mounted after each rejailbreak (`pymobiledevice3 mounter auto-mount`)
  before DVT screenshots work.
- Launch the app without Frida via `<JB>/usr/bin/uiopen --bundleid vn.gsm.md`.
