Q the question
H hypothesis
P what you predict if it holds
R what would refute it <-- WRITE THIS BEFORE YOU LOOK
E the exact command
O the raw observation, not a conclusion
V SUPPORTED / REFUTED / INCONCLUSIVE
37 shell-only names, 0 app-only. DIVERGED, cause not established.
Property
root
shell
app
ro.debuggable
1
1
(empty)
ro.secure
1
1
(empty)
partition.system.verified
2
2
(empty)
ro.serialno
set
set
(empty)
qemu.sf.lcd_density
560
560
(empty)
ro.build.tags
dev-keys
dev-keys
dev-keys
ro.boottime.qemu-props
set
(empty)
(empty)
Three standard integrity properties are unreadable by the app. Written "1".equals(get(p)), the
check fails open.
Measured: ro.boot.verifiedbootstate — four values¶
Device
Property
Truth
Rooted Redmi (API 30)
green
TEE: Unverified, deviceLocked=false, all-zero key
Same, at source
/proc/cmdline = orange
Three fields forged; digest + veritymode honest
AVD (API 35)
""
No androidboot.verifiedbootstate in bootconfig
// WRONG -- passes on "", "" is not "orange"return!"orange".equals(SystemProperties.get("ro.boot.verifiedbootstate"));// RIGHT -- allow-list; note the argument order (null-safe)return"green".equals(SystemProperties.get("ro.boot.verifiedbootstate"));
Still only a mitigation. The real fix is server-validated attestation.
__attribute__((noinline)) was present in both and changed nothing — it constrains the inliner,
not interprocedural constant propagation or function specialisation.
# both lines are required; the first alone passes for the wrong reason
llvm-strings-n4lib.so|grep-F"$SECRET"# expect nothing
llvm-objdump-s-j.rodatalib.so|grep-iF"$CT"# expect SOMETHING
APKs containing 'xposed' : 58 of 237
total occurrences : 1141
accounted for by 'exposed'/'Exposed': 1141
unexplained : 0
Rule: never put a token under ~8 characters in a high-confidence tier. False-positive rate
rises on better-obfuscated apps — R8 generates short lowercase identifiers.
"If a detector agrees with you about a lot of samples, suspect the detector"¶
# instrument first -- always
adbdevices-l&&adbshellgetpropro.product.model&&adbshellgetpropro.build.version.sdk
# root convention -- try BOTH; the wrong one reads as "not rooted"
adbshell"su -c id"# physical devices, Magisk
adbshell"su 0 id"# AOSP emulator# NEVER: adb shell su -c 'cmd' <-- broken; su eats the fragments# three vantages
./scripts/vantage-diff.sh-p<pkg>--pathspaths.txt
./scripts/vantage-diff.sh-p<pkg>--props
./scripts/vantage-diff.sh--find-package
# replay the chapter's cases
./scripts/case-replay.sh-s<serial>-p<pkg>--caseall
# audit a written case study
python3-Bscripts/claim-ledger.py--strictcase.md
python3-Bscripts/claim-ledger.py--self-test
# find the case-A idiom, including the tell-tale negation
grep-rn--include=*.smali-A6'ro\.boot\.verifiedbootstate'out/|grep-B2'xor-int/lit8'# count call sites without a regex you can get wrong
llvm-objdump-dlib.so|grep-oE'bl[[:space:]]+0x[0-9a-f]+ <[^>]+>'|sort|uniq-c