Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit a99799bc authored by Michael Bestas's avatar Michael Bestas
Browse files

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
parent 77715fbe
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -428,7 +428,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.boot.hardware.revision", "");
    if (message->empty()) {
        *message = android::base::GetProperty("ro.revision", "");
    }
    return true;
}