Read these on cs.android.com, which gives cross-references and history.
07-AOSP covers navigation technique. No line numbers appear anywhere in
this chapter — file paths are stable across releases and line numbers are not.
You want to see that a Signature is a certificate, not a signature: DER bytes, toByteArray() returning a copy, and a 32-bit hashCode(). Also has a Signature(String) hex constructor, which explains a pattern you will meet in decompiled apps
You are reading hasMultipleSigners() versus hasPastSigningCertificates() and want to see that the two branches read different fields — which is why calling the wrong accessor returns an empty array instead of an error
The real structure: current signers, the rotation lineage, the signature scheme version, and CertCapabilities (the flags: 17 in §3.2.3). Was PackageParser.SigningDetails before Android 13 — look there in older trees
The concrete class an app actually holds.PackageManager is abstract; hooking it silently does nothing. This is the single most useful practical fact in the whole reference list
Where GET_SIGNING_CERTIFICATES is honoured. Read the signingInfo branch and the legacy signatures branch side by side and the deprecation of GET_SIGNATURES explains itself: they are different code paths reading different fields
RESILIENCE-2 (anti-tampering) and RESILIENCE-4 (anti-dynamic-analysis) are this chapter. Note the category is explicitly conditional on a threat model that includes a compromised device — applying it to every app is a misreading, not a strict reading
The anti-tampering and anti-dynamic-analysis tests. A MASTG test tells you how to determine whether a control is present. "Absent" is a test result, not a severity — see README §5.3
71-OWASP-Mobile carries the full mapping across all categories.
Reading the check. Search for 134217728 — jadx prints the flag in decimal. 56-JADX also documents why the decompiled Java can disagree with the bytecode
Building ../examples/tamper_check.c. The chapter's copy compiled clean with aarch64-linux-android21-clang -O2 -Wall -Wextra
llvm-readelf (ships with the NDK)
--dyn-syms to separate imports from exports; -S to find .init_array. Parse, do not strings — "imports ptrace" and "the word ptrace appears" are different claims
-list -v | grep SHA256 gives the same value as apksigner's certificate digest and as sha256(Signature.toByteArray()). Verify that equivalence once yourself
Run this first. Maps the tamper surface by tier from a static APK. Parses DEX string_ids and the ELF dynamic symbol table properly. Grades every row STRONG or WEAK, because the first version matched 18 of 18 apps and was therefore useless
No-Gradle, no-network build of the detector app, plus --repack which strips the signature and re-signs with a second key. Builds out of tree; never writes an APK or a keystore into the repository
67 owns the bypass methodology and the adversarial back-and-forth. This chapter owns the
controls. Where §6.6 and §7.3 show a neutralisation, it is there so you can confirm a mechanism,
not as a playbook.
Deliberately short. Most published material on this topic is either vendor marketing or a blog post
that reprints the same twelve checks without pricing any of them. Prefer primary sources.
The MASTG resilience tests are the best-maintained public catalogue, and unusually for this
field they are honest about what each test does and does not establish.
Frida's own documentation on the gadget is the clearest statement of the repackaging trade-off:
gadget mode requires re-signing, and re-signing is exactly what this chapter's core control
detects. There is no third option that avoids both.
The AOSP commit history on SigningDetails is worth skimming if you want to understand why
rotation is shaped the way it is. The capability flags exist because rotation had to preserve
behaviour that was already depending on certificate identity — shared user IDs, signature
permissions, installed-data access.
If you find yourself reading a source that lists checks without stating what each proves and what it
costs to defeat, close it. That pairing is the only thing that makes this material useful, and its
absence is a reliable signal that the author has not done the work.