summaryrefslogtreecommitdiff
path: root/fastboot/device/variables.cpp
diff options
context:
space:
mode:
authorBowgo Tsai <bowgotsai@google.com>2020-01-21 18:31:23 +0800
committerBowgo Tsai <bowgotsai@google.com>2020-01-22 23:29:07 +0800
commit99f9a38a8b55fadfdbc0a578e7d45818f0407091 (patch)
treec3a4e61823bec4919facb306e76f249403fff803 /fastboot/device/variables.cpp
parente99ec483b13075107f110699127318e4b0622ba5 (diff)
fastbootd: exporting more properties
Exporting more properties that can be useful for image compatibility check, prior to run fastboot flash. Bug: 74445765 Bug: 144473561 Test: fastboot getvar <new variable> Change-Id: I2ddfa2c1e9e719e05a3a64b9ca1d608957aebf11
Diffstat (limited to 'fastboot/device/variables.cpp')
-rw-r--r--fastboot/device/variables.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/fastboot/device/variables.cpp b/fastboot/device/variables.cpp
index 10eac01b5..e7d8bc366 100644
--- a/fastboot/device/variables.cpp
+++ b/fastboot/device/variables.cpp
@@ -62,6 +62,18 @@ bool GetBasebandVersion(FastbootDevice* /* device */, const std::vector<std::str
return true;
}
+bool GetOsVersion(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.build.version.release", "");
+ return true;
+}
+
+bool GetVndkVersion(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.vndk.version", "");
+ return true;
+}
+
bool GetProduct(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
std::string* message) {
*message = android::base::GetProperty("ro.product.device", "");
@@ -458,3 +470,42 @@ bool GetCpuAbi(FastbootDevice* /* device */, const std::vector<std::string>& /*
*message = android::base::GetProperty("ro.product.cpu.abi", "");
return true;
}
+
+bool GetSystemFingerprint(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.system.build.fingerprint", "");
+ if (message->empty()) {
+ *message = android::base::GetProperty("ro.build.fingerprint", "");
+ }
+ return true;
+}
+
+bool GetVendorFingerprint(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.vendor.build.fingerprint", "");
+ return true;
+}
+
+bool GetDynamicPartition(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.boot.dynamic_partitions", "");
+ return true;
+}
+
+bool GetFirstApiLevel(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.product.first_api_level", "");
+ return true;
+}
+
+bool GetSecurityPatchLevel(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.build.version.security_patch", "");
+ return true;
+}
+
+bool GetTrebleEnabled(FastbootDevice* /* device */, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ *message = android::base::GetProperty("ro.treble.enabled", "");
+ return true;
+}