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 fastboot getvar hw-revision in fastbootd
Change-Id: I6e785c3fe3a49409e815af269a9a8db732b80ada
This commit is contained in:
parent
b6b893f8e1
commit
80d251133c
1 changed files with 4 additions and 1 deletions
|
|
@ -447,7 +447,10 @@ std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(FastbootDevice*
|
|||
|
||||
bool GetHardwareRevision(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
|
||||
std::string* message) {
|
||||
*message = android::base::GetProperty("ro.revision", "");
|
||||
*message = android::base::GetProperty("ro.boot.hardware.revision", "");
|
||||
if (message->empty()) {
|
||||
*message = android::base::GetProperty("ro.revision", "");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue