aboutsummaryrefslogtreecommitdiff
path: root/fastboot
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2022-05-11 06:39:40 +0300
committerMichael Bestas <mkbestas@lineageos.org>2022-08-29 23:07:51 +0300
commit66c482b9e5f5b5848fc820338f6fe42a44f2f097 (patch)
tree6410030ec87996e76ffaf056a02f829c0fc01e52 /fastboot
parent4ef767f34375d7c0793c052ecb6e70eb74b2f419 (diff)
fastboot: Prefer ro.boot.hardware.revision for hw-revision
ro.revision defaults to 0 if it's not set in cmdline. Some devices might want to set it in their device specific init files, however it's not possible to override ro properties. Test: Set ro.boot.hardware.revision in device specific init.rc and observe "HW version" in fastbootd UI Change-Id: I6e785c3fe3a49409e815af269a9a8db732b80ada
Diffstat (limited to 'fastboot')
-rw-r--r--fastboot/fastboot.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 898d15cb..6a9d0845 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -42,7 +42,8 @@ Device::BuiltinAction StartFastboot(Device* device, const std::vector<std::strin
std::string bootloader_version = android::base::GetProperty("ro.bootloader", "");
std::string baseband_version = android::base::GetProperty("ro.build.expect.baseband", "");
- std::string hw_version = android::base::GetProperty("ro.revision", "");
+ std::string hw_version = android::base::GetProperty(
+ "ro.boot.hardware.revision", android::base::GetProperty("ro.revision", ""));
std::vector<std::string> title_lines;
title_lines.push_back("Product name - " + android::base::GetProperty("ro.product.device", ""));
if (!android::base::EqualsIgnoreCase(bootloader_version, "unknown")) {