fastbootd: Implement getvar hw-revision.
Bug: 78793464
Test: fastboot getvar hw-revision works
fuzzy_fastboot Conformance.GetVarRevision passes
Change-Id: I5a3e9893d61e18567f2f818ef06cad8e862d637f
diff --git a/fastboot/device/variables.cpp b/fastboot/device/variables.cpp
index 68efa08..a960189 100644
--- a/fastboot/device/variables.cpp
+++ b/fastboot/device/variables.cpp
@@ -256,3 +256,9 @@
}
return args;
}
+
+bool GetHardwareRevision(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.revision", "");
+ return true;
+}