The only supported way to run QBDITrace is through qbditrace_runner.py. Do not load qbditrace.js directly with Frida—the agent requires configuration injected via script.post().
Terminal window
# Trace a function by offset in the main executable
python3tools/qbditrace/qbditrace_runner.py\
--targetcom.example.app\
--entry0xEE91EC\
--output/var/mobile/Documents/trace.bin
# Trace an exported symbol
python3tools/qbditrace/qbditrace_runner.py\
--targetcom.example.app\
--entry_CCCrypt\
--output/var/mobile/Documents/cccrypt.bin
# Trace a function inside a specific framework module
Emit a full register snapshot every N instructions
--ring-bytes
0 (default 64 MiB)
Per-thread ring buffer size
--no-embed-code
off
Disable embedded code table; CFG/loop analysis in Tenet degrades without an external image
--pc-delta
off
Enable v5 PC-delta encoding: 2-byte signed deltas shrink INST headers by ≈60%
--fpr
off
Enable v7 FPR/NEON recording: FPR diffs per instruction + 512 B FPR snapshot per anchor
--no-compress
off
Disable default 1 MiB block zstd compression
--exclude-range
none
Exclude address ranges (format: START-END or START:SIZE, hex static offsets). Up to 8 ranges. Code inside excluded ranges runs natively with zero trace overhead
--sampling
off
Scout mode: bare PC stream only (no registers, memory, or sequence events). ≈80%+ size reduction while loop counts and back-edges remain exact. Implies --pc-delta and a large anchor interval. See Scout workflow below
Write bytes to target process memory before tracing. Format: ADDR:HEXBYTES (absolute runtime) or +OFFSET:HEXBYTES (module-base offset). May be specified multiple times. Original bytes are restored after the trace completes. Use to clear cache flags, modify branch conditions, etc.
Terminal window
# Clear a 4-byte cache flag at module offset +0x1abc