- Decision
- ADR-023
- Date
- 2026-08-01
- Status
- AcceptedAccepted
- Mentions
- ADR-021, ADR-022
- Mentioned by
- ADR-024, ADR-025
1Decision
Correct ADR-022: the build number is not the primary cause of most ADR-021 mismatches. A second, source-confirmed cause — an unpinned AVB/dm-verity hashtree salt, defaulting to /dev/urandom — accounts for most of them.
2Why and evidence
Two repackaging tests ran directly on the already-compiled <build-root>/platform-repro tree (minutes, no rebuild), both with BUILD_NUMBER=TESTFIXED001 pinned. Test 1 falsely reported a clean diff — invalidated and discarded: a sed bug destroyed the hash column, and both runs shared one OUT_DIR, so run 2 overwrote run 1 before comparison.
Test 2 fixed both flaws (preserved run 1's images; deleted only the final .img outputs before run 2 to force a real repackage of unchanged compiled intermediates) and found 15 of 25 images still differ with the build number held constant.
external/avb/avbtool.py's salt parameter is documented as "a hexadecimal string or None to use /dev/urandom", read from /dev/urandom whenever unset; no BOARD_AVB_*_ADD_HASHTREE_FOOTER_ARGS override for this target (device/generic/goldfish*, build/make/target/board/generic_x86_64*) passes a --salt.
3Consequences
Of the 18 ADR-021 mismatches: 3 (system, ramdisk, ramdisk-qemu) are explained by the build number (confirmed fixed by pinning it, per the repackaging test). 12 (vbmeta, product, product-qemu, vendor, vendor-qemu, system_ext, system_ext-qemu, system_dlkm, system_dlkm-qemu, system-qemu, vendor_boot, vendor_boot-debug) are explained by the random AVB salt. 1 (super.img) is a cascade (it packages system/vendor/product internally), not independent. 2 (cache.img, userdata.img) remain unexplained by either mechanism — no build.prop, not AVB-protected; likely a third, unconfirmed cause (filesystem-image creation timestamp/UUID).
This corrects ADR-022's claim that build number explained the system/vendor/product/system_ext/system_dlkm/vbmeta family "with high confidence" — true only for system.img. Both confirmed causes are well-understood and fixable; neither indicates compromise or tampering.
4Review when
A follow-up comparison run pins BUILD_NUMBER identically and passes an explicit --salt to every hashtree/hash-footer invocation in both workspaces, and either reproduces a clean diff (supports re-accepting the baseline) or isolates the remaining cache/userdata cause.
Read from docs/governance/decision-log.md, entry ADR-023.