Merge "init: set ro.boot.flash.locked from ro.boot.verifiedbootstate"
This commit is contained in:
commit
85abb0860e
1 changed files with 13 additions and 0 deletions
|
|
@ -350,6 +350,18 @@ static void import_kernel_nv(const std::string& key, const std::string& value, b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void export_oem_lock_status() {
|
||||||
|
if (property_get("ro.oem_unlock_supported") != "1") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string value = property_get("ro.boot.verifiedbootstate");
|
||||||
|
|
||||||
|
if (!value.empty()) {
|
||||||
|
property_set("ro.boot.flash.locked", value == "orange" ? "0" : "1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void export_kernel_boot_props() {
|
static void export_kernel_boot_props() {
|
||||||
struct {
|
struct {
|
||||||
const char *src_prop;
|
const char *src_prop;
|
||||||
|
|
@ -614,6 +626,7 @@ int main(int argc, char** argv) {
|
||||||
signal_handler_init();
|
signal_handler_init();
|
||||||
|
|
||||||
property_load_boot_defaults();
|
property_load_boot_defaults();
|
||||||
|
export_oem_lock_status();
|
||||||
start_property_service();
|
start_property_service();
|
||||||
|
|
||||||
const BuiltinFunctionMap function_map;
|
const BuiltinFunctionMap function_map;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue