Merge "fastboot: derive device locked state from Android property"

This commit is contained in:
Oleg Matcovschi 2021-03-26 01:26:57 +00:00 committed by Gerrit Code Review
commit b16ef309d6
1 changed files with 1 additions and 6 deletions

View File

@ -204,12 +204,7 @@ std::vector<std::string> ListPartitions(FastbootDevice* device) {
}
bool GetDeviceLockStatus() {
std::string cmdline;
// Return lock status true if unable to read kernel command line.
if (!android::base::ReadFileToString("/proc/cmdline", &cmdline)) {
return true;
}
return cmdline.find("androidboot.verifiedbootstate=orange") == std::string::npos;
return android::base::GetProperty("ro.boot.verifiedbootstate", "") != "orange";
}
bool UpdateAllPartitionMetadata(FastbootDevice* device, const std::string& super_name,