22 Commits
Author SHA1 Message Date
FatalSec 5c4a51d5fb Fix Dart 3.13 ObjectPool decode: parse early base-object clusters
- Support Dart 3.13 combined VM snapshots
- Add CID kinds and layouts for LocalVarDescriptors, ApiError, and UnwindError
- Fix stream desync causing "PP not resolved" in `r2flutter -p`
- Skip zero-length ObjectPools when resolving PP slots
2026-09-16 07:48:42 +08:00
pancake 5d86dff9fa Update all tests to use commands instead of !! oneliners 2026-09-03 18:09:11 +02:00
pancake 3fe9dff0cc Support Dart 3.13 Single Snapshots 2026-09-01 15:16:12 +02:00
pancake 2e85b70bda Parse Versioned Code Cluster Layouts 2026-09-01 14:58:59 +02:00
pancake b45d487fd3 Handle Versioned ObjectPool Entry Bits 2026-09-01 14:54:37 +02:00
pancake b1994cd98e Add Versioned Snapshot Reference Decoding 2026-09-01 14:51:16 +02:00
pancake 3b9d12efea Parse Version-Specific Snapshot Headers 2026-09-01 14:46:26 +02:00
pancake 08001fe45b Tutorial to bypass ssl pinning on iOS/flutter 2026-08-12 12:30:46 +02:00
pancakeandClaude Fable 5 f138b952c9 Fix discovery-stripped-ios test on r2 release builds
The r2 6.1.6 release parses the bare '>' redirect inside the quoted
!!sh -c one-liner and truncates the command, so the test produced no
output on CI while passing against r2 git. Move the pipeline into a
helper script so the r2 command line carries no quotes or redirects.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-11 15:54:30 +02:00
pancakeandClaude Opus 4.8 986e2cb42a Locate Dart instruction images without symbols on stripped Mach-O
The four kDart*Snapshot* symbols are external/global and load-bearing (the engine
resolves them at runtime), so they survive strip; but obfuscators/repackagers can
remove them, leaving only the two data snapshots findable by magic scan
(instruction images carry no magic) and iso_instr=0, which disables IT name
recovery.

Add locate_instr_images_structural(): vm_instr = start of the first executable
section; read the Dart Image header (word0=ImageSize) and chain
iso_instr = align_up(vm_instr + ImageSize, 64). Every step is cross-checked
(plausible headers; the isolate image must end where the first data image
begins), so an unknown/gapped layout degrades to 0 (no IT names) rather than junk
addresses. No-op when symbols already resolved the instructions.

Verified against symbol-derived ground truth: Runner (0x4000/0xe700, full 7671
IT entries recovered) and AuthPass (0x5a80/0xfdc0); the gapped macOS hello.aot
safely falls back to 0. Symbol-present bins unchanged; suite green (95 db/cmd,
3 extras, 35 custom).

Adds scripts/strip_macho_symbols.py (zeroes LC_SYMTAB + dyld export trie, since
strip cannot) and test/db/cmd/discovery-stripped-ios which builds the fixture
from the committed Runner App and asserts structural recovery. Remaining
follow-ups tracked in COMMIT2.md.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-11 12:32:01 +02:00
pancake bfaf13a013 Use the script to sync with the missing 21 versions of Dart 2026-07-05 20:48:49 +02:00
pancake 5cf313c681 Refactor version metadata: single offsets.json, remove CID fields from DartVerLayout
- Consolidate all version metadata into offsets.json as the single source
  of truth (hashes, version profiles, offset arrays)
- Remove CID fields (cid_class, cid_function, cid_code, cid_string, ...)
  from DartVerLayout struct — all CID lookups now go through dart_cid.c's
  cid_tables[] via dart_cid_get()
- Remove CID fast-path switch from dart_cid_get(); always use cid_tables[]
- Replace l->cid_* references in dart_pool_parse.c and dart_pool_names.c
  with dart_cid_get(l, DART_CID_*) calls
- Remove CID fallback assignments from dart_pick_layout_by_hash()
- Delete obsolete scripts/derive_offsets.py and scripts/gen_offsets.sh
- Add `make gen` target to regenerate C files from offsets.json
- Update doc/learn.md, doc/support.md, INFO.md, and test expectations
2026-07-03 20:33:44 +02:00
pancake 9b9a112561 Use r_getopt and one char flags 2026-06-01 17:45:44 +02:00
pancake f3cec5a388 Remove --no-stubs, its just dupping data from rbin 2026-03-08 11:14:06 +01:00
pancake 5252e014e5 Delete --dump-snapshot because is dupe of --dump-header, also support -j for json 2026-02-19 11:32:49 +01:00
pancake ac289d2143 Rebrand old references to r2flutter 2026-02-18 12:38:41 +01:00
pancake ab50780d16 Followup on the function name resolution 2025-09-17 19:22:44 +02:00
pancake 2b4b302ac3 Improved derive offsets script aiming to improve string resolution on iOS 2025-09-17 18:32:38 +02:00
pancake 28ab99d9cf More pool parsing improvements and tests 2025-09-17 10:04:15 +02:00
Abhi f2ab0639d0 fix snapshot extraction if we have multiple _kDartVmSnapshotData entries 2025-09-13 00:42:02 +02:00
Abhi 035c629737 fix snapshot extraction & (core dumped) error 2025-09-13 00:42:02 +02:00
pancake 62f41bce64 Add genoffsets script 2025-09-12 00:41:29 +02:00