summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2024-05-15 20:03:53 +0000
committerSteven Moreland <smoreland@google.com>2024-05-15 20:18:51 +0000
commit188d59a9191edd182e3430b4bceb757738a1786b (patch)
tree1ca4a1b6f645016278817b7cb0b0dc7227250f78 /init
parent9fbd7e10264dfd6db3fb734872876de5a919918f (diff)
downloadcore-188d59a9191edd182e3430b4bceb757738a1786b.tar.gz
16k kernel dev option changes ro.build.fingerprint
When someone uses the 16kb dev option, they switch out the kernel, but the same build is used. Make sure this is visible in the fingerprint to help split up any analytics or reports. Bug: 332406754 Test: no change on normal device, on 16k dev option device: :) adb shell getprop ro.product.build.16k_page.enabled true :) adb shell getconf PAGE_SIZE 16384 :) adb shell getprop ro.build.fingerprint generic/aosp_cf_x86_64_phone_pgagnostic_16kb/vsoc_x86_64_pgagnostic:VanillaIceCream/MAIN.b7aab5e4/eng.smorel.20240514.203625:userdebug/test-keys ^^^^^^ ----------------------------/ cheers Change-Id: I9632237cef4a3b077761022eda8cf42784a41753
Diffstat (limited to 'init')
-rw-r--r--init/property_service.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/init/property_service.cpp b/init/property_service.cpp
index d3cdd437f..cd5933d23 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -974,6 +974,17 @@ static std::string ConstructBuildFingerprint(bool legacy) {
std::string build_fingerprint = GetProperty("ro.product.brand", UNKNOWN);
build_fingerprint += '/';
build_fingerprint += GetProperty("ro.product.name", UNKNOWN);
+
+ // should be set in /product/etc/build.prop
+ // when we have a dev option device, and we've switched the kernel to 16kb mode
+ // we use the same system image, but we've switched out the kernel, so make it
+ // visible at a high level
+ bool has16KbDevOption =
+ android::base::GetBoolProperty("ro.product.build.16k_page.enabled", false);
+ if (has16KbDevOption && getpagesize() == 16384) {
+ build_fingerprint += "_16kb";
+ }
+
build_fingerprint += '/';
build_fingerprint += GetProperty("ro.product.device", UNKNOWN);
build_fingerprint += ':';