Skip to content
Commit 88c1bf07 authored by Felix's avatar Felix
Browse files

core/Build: ro.system when comparing fingerprint



ro.build.fingerprint is dynamically generated by deriveFingerprint(),
but its output does not match ro.{system,vendor}.build.fingerprint.

Fixes:
======
E Build   : Mismatched fingerprints; system reported \
  Sony/aosp_f8331/kagura:10/QP1A.191005.007/eng.builde.20191020.005112:user/test-keys \
  but vendor reported Sony/aosp_f8331/kagura:10/QP1A.191005.007/builder10200050:user/test-keys

Example:
========
ro.system.build.fingerprint = Sony/aosp_f8331/kagura:10/QP1A.191005.007/builder10200050:user/test-keys
ro.build.fingerprint        = Sony/aosp_f8331/kagura:10/QP1A.191005.007/eng.builde.20191020.005112:user/test-keys

The critical difference is that deriveFingerprint() inserts the value of
"ro.build.version.incremental", while the actual fingerprint produced by
build/make/core/Makefile is:
  BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):\
  $(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
Where:
  BF_BUILD_NUMBER := $(BUILD_USERNAME)$$($(DATE_FROM_FILE) +%m%d%H%M)

Fix:
====
Use ro.system.build.fingerprint instead, which will match
ro.vendor.build.fingerprint.

Test:
=====
make otapackage, flash, boot, verify no warning message is shown in UI.

Change-Id: Ie5e972047d7983b411004a3f0d67c4636a205162
Signed-off-by: default avatarFelix <google@ix5.org>
parent 30b39050
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment