mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 23:57:39 +00:00
Add missing ro.vendor(.boot).warranty_bit props
Co-authored-by: John Wu <topjohnwu@gmail.com>
This commit is contained in:
parent
e261579e72
commit
c07775f5e3
@ -12,12 +12,14 @@ using namespace std;
|
||||
static const char *prop_key[] =
|
||||
{ "ro.boot.vbmeta.device_state", "ro.boot.verifiedbootstate", "ro.boot.flash.locked",
|
||||
"ro.boot.veritymode", "ro.boot.warranty_bit", "ro.warranty_bit", "ro.debuggable",
|
||||
"ro.secure", "ro.build.type", "ro.build.tags", "ro.build.selinux", nullptr };
|
||||
"ro.secure", "ro.build.type", "ro.build.tags", "ro.build.selinux",
|
||||
"ro.vendor.boot.warranty_bit", "ro.vendor.warranty_bit", nullptr };
|
||||
|
||||
static const char *prop_value[] =
|
||||
{ "locked", "green", "1",
|
||||
"enforcing", "0", "0", "0",
|
||||
"1", "user", "release-keys", "0", nullptr };
|
||||
"1", "user", "release-keys", "0",
|
||||
"0", "0", nullptr };
|
||||
|
||||
void hide_sensitive_props() {
|
||||
LOGI("hide_policy: Hiding sensitive props\n");
|
||||
@ -29,6 +31,15 @@ void hide_sensitive_props() {
|
||||
setprop(prop_key[i], prop_value[i], false);
|
||||
}
|
||||
|
||||
// Hide that we booted from recovery when magisk is in recovery mode
|
||||
auto bootmode = getprop("ro.bootmode");
|
||||
if (!bootmode.empty() && bootmode.find("recovery") != string::npos) {
|
||||
setprop("ro.bootmode", "unknown", false);
|
||||
}
|
||||
bootmode = getprop("ro.boot.mode");
|
||||
if (!bootmode.empty() && bootmode.find("recovery") != string::npos) {
|
||||
setprop("ro.boot.mode", "unknown", false);
|
||||
|
||||
// Xiaomi cross region flash
|
||||
auto hwc = getprop("ro.boot.hwc");
|
||||
if (!hwc.empty() && hwc.find("CN") != string::npos) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user