Stop reporting a tool's resource failure as a finding about the target

A JVM reader that dies on a large or deeply nested input -- OutOfMemoryError, an OOM kill, a
container limit, a timeout -- prints an empty result that looks exactly like a reader that read the
file and found nothing. That is the `present but unreadable` case SKILL.md §Coverage names, and it is
where a wrong "that class is not in there" gets recorded.

The new section in toolchain.md says what a failed analysis actually supports (a claim about the
route, not about the artifact) and the three things to check before a negative from a heavy tool
becomes a finding: the exit code and stderr rather than stdout alone, a re-run with room to work, and
the indexed-query route that answers most location questions without materialising anything. A
deadline you set yourself gets the same reading -- it reported nothing about the target.

Also: the README claimed the scripts "work identically on Windows, macOS and Linux", while every gate
run, every test result and every figure in the evidence record comes from one Windows host. The claim
now carries the strength it actually has -- measured on Windows, `unverified` elsewhere -- and names
the usual suspects (path separators, `os.pathsep` in `APKREV_TOOLS`, console encodings, ADB shell
quoting) so a first run on another platform has somewhere to look.
This commit is contained in:
inliver233
2026-10-16 19:20:45 +08:00
parent 6ab905b2c8
commit 5c3ba9cd2e
3 changed files with 33 additions and 1 deletions
@@ -270,6 +270,29 @@ line numbers and even which branch is which can differ from the bytecode. When a
it, verify in smali or at runtime. `jadx` writing `(unknown)`/empty method bodies means it failed,
not that the method is empty.
### A tool that ran out of room did not tell you the target is empty
Every JVM-based reader in this list, and several of the native ones, can die on a large or deeply
nested input without saying anything about the artifact: `OutOfMemoryError`, a `Killed` from the OOM
killer, a container limit, or a timeout. The output looks like a tool that read the file and found
nothing — an empty result plus a line most people skim past.
**What a failed analysis supports is a claim about the analysis, not the artifact**: "this route could
not complete on this input" is `present but unreadable` (`SKILL.md` §Coverage), and it is exactly
where a wrong "that class is not in there" gets written into a record. Three things to do before a
negative from a heavy tool becomes a finding:
- read the **exit code and stderr**, not just stdout — a heap death often exits non-zero with a
partial result already printed;
- give the tool the room the input warrants (a larger heap for the JVM readers) and re-run before
concluding anything;
- prefer a route that does not have to materialise everything: an indexed query against the APK
(`rasc`/`droidasc`/`dexsql`) answers most location questions without decompiling a single class, and
it is also the route that survives a target too large for a full export.
The same reading applies to a **time budget** you set yourself: a command you killed at your own
deadline reported nothing about the target, only about your deadline.
**`smali` assembling can abort silently** — the tree produces no dex while the process still exits
0. Never treat exit code as proof of a build. Assert the artifact exists, is fresh, and is non-empty
(`patch-audit.md`).