summaryrefslogtreecommitdiff
path: root/fastboot/device/variables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fastboot/device/variables.cpp')
-rw-r--r--fastboot/device/variables.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/fastboot/device/variables.cpp b/fastboot/device/variables.cpp
index 9ac2ddab6..75352489e 100644
--- a/fastboot/device/variables.cpp
+++ b/fastboot/device/variables.cpp
@@ -142,7 +142,7 @@ bool GetSlotUnbootable(FastbootDevice* device, const std::vector<std::string>& a
bool GetMaxDownloadSize(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
std::string* message) {
- *message = std::to_string(kMaxDownloadSizeDefault);
+ *message = android::base::StringPrintf("0x%X", kMaxDownloadSizeDefault);
return true;
}
@@ -194,7 +194,7 @@ bool GetPartitionSize(FastbootDevice* device, const std::vector<std::string>& ar
return false;
}
uint64_t size = get_block_device_size(handle.fd());
- *message = android::base::StringPrintf("%" PRIX64, size);
+ *message = android::base::StringPrintf("0x%" PRIX64, size);
return true;
}
@@ -300,3 +300,9 @@ std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(FastbootDevice*
}
return args;
}
+
+bool GetHardwareRevision(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.revision", "");
+ return true;
+}