summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@arm.com>2020-10-13 17:48:01 +0100
committerTushar Khandelwal <tushar.khandelwal@arm.com>2020-10-26 22:17:52 +0000
commit3ee612770cc41abf7715eac0fbebb8ff984f5f25 (patch)
tree7a1e54df277b5843d27057066cd54b4e5980e6f5
parent7811e6e7ece8808d38c57dee28a25a7f081b1c86 (diff)
Add frameworks/base patch to verify the right fingerprint propertyTC0-2020.10.29
Change-Id: Ic4cf7f59f407225a84c74039744c7586ec89de72 Signed-off-by: Usama Arif <usama.arif@arm.com>
-rw-r--r--tc0/patches/0001-core-Build-ro.system-when-comparing-fingerprint.patch67
-rw-r--r--tc0/vendorsetup.sh1
2 files changed, 68 insertions, 0 deletions
diff --git a/tc0/patches/0001-core-Build-ro.system-when-comparing-fingerprint.patch b/tc0/patches/0001-core-Build-ro.system-when-comparing-fingerprint.patch
new file mode 100644
index 0000000..eeab557
--- /dev/null
+++ b/tc0/patches/0001-core-Build-ro.system-when-comparing-fingerprint.patch
@@ -0,0 +1,67 @@
+From 11cd4a973a3a10e2ea359202bbe3cd97ac3c285e Mon Sep 17 00:00:00 2001
+From: Felix <google@ix5.org>
+Date: Sun, 20 Oct 2019 02:04:04 +0200
+Subject: [PATCH] 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: Felix <google@ix5.org>
+---
+ core/java/android/os/Build.java | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
+index 176c2b7db05..f541ce7140c 100755
+--- a/core/java/android/os/Build.java
++++ b/core/java/android/os/Build.java
+@@ -1076,7 +1076,7 @@ public class Build {
+ return result == 0;
+ }
+
+- final String system = SystemProperties.get("ro.build.fingerprint");
++ final String system = SystemProperties.get("ro.system.build.fingerprint");
+ final String vendor = SystemProperties.get("ro.vendor.build.fingerprint");
+ final String bootimage = SystemProperties.get("ro.bootimage.build.fingerprint");
+ final String requiredBootloader = SystemProperties.get("ro.build.expect.bootloader");
+@@ -1085,7 +1085,7 @@ public class Build {
+ final String currentRadio = SystemProperties.get("gsm.version.baseband");
+
+ if (TextUtils.isEmpty(system)) {
+- Slog.e(TAG, "Required ro.build.fingerprint is empty!");
++ Slog.e(TAG, "Required ro.system.build.fingerprint is empty!");
+ return false;
+ }
+
+--
+2.17.1
+
diff --git a/tc0/vendorsetup.sh b/tc0/vendorsetup.sh
index d900291..768548e 100644
--- a/tc0/vendorsetup.sh
+++ b/tc0/vendorsetup.sh
@@ -37,3 +37,4 @@ apply_patch "system/core" "0001-Add-amba-bus-support-to-platform-devices.patch"
apply_patch "external/minigbm" "0001-minigbm-komeda-Add-driver.patch"
apply_patch "external/minigbm" "0001-Make-drv_mapping_destroy-be-called-in-release-builds.patch"
apply_patch "external/swiftshader" "0001-Don-t-unlock-Android-buffers-immediately-after-locki.patch"
+apply_patch "frameworks/base" "0001-core-Build-ro.system-when-comparing-fingerprint.patch"