From 3c04dab47274e9bbbfb3ddd1fcf71c929c8ed0c0 Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Mon, 18 May 2020 21:27:35 -0300 Subject: [PATCH] magiskhide: fix late_prop_key setprop, reorganize props slightly --- native/jni/magiskhide/hide_policy.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/native/jni/magiskhide/hide_policy.cpp b/native/jni/magiskhide/hide_policy.cpp index 088724f1e..64c530c50 100644 --- a/native/jni/magiskhide/hide_policy.cpp +++ b/native/jni/magiskhide/hide_policy.cpp @@ -11,15 +11,17 @@ 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", "vendor.boot.vbmeta.device_state", - "ro.vendor.boot.warranty_bit", "ro.vendor.warranty_bit", nullptr }; + "ro.boot.veritymode", "ro.boot.warranty_bit", "ro.warranty_bit", + "ro.debuggable", "ro.secure", "ro.build.type", "ro.build.tags", + "ro.vendor.boot.warranty_bit", "ro.vendor.warranty_bit", + "vendor.boot.vbmeta.device_state", nullptr }; static const char *prop_val[] = { "locked", "green", "1", - "enforcing", "0", "0", "0", - "1", "user", "release-keys", "locked", - "0", "0", nullptr }; + "enforcing", "0", "0", + "0", "1", "user", "release-keys", + "0", "0", + "locked", nullptr }; static const char *late_prop_key[] = { "vendor.boot.verifiedbootstate", nullptr }; @@ -66,7 +68,7 @@ void hide_late_sensitive_props() { for (int i = 0; late_prop_key[i]; ++i) { auto value = getprop(late_prop_key[i]); if (!value.empty() && value != late_prop_val[i]) - setprop(prop_key[i], late_prop_val[i], false); + setprop(late_prop_key[i], late_prop_val[i], false); } }