From 7f73f44377f83c6e1ea99d8824185eec54876560 Mon Sep 17 00:00:00 2001 From: Salvo Giangreco Date: Sun, 27 Oct 2024 11:56:07 +0100 Subject: [PATCH] app: hooks: PropSpoofHooks: improve prop spoofing Signed-off-by: Salvo Giangreco --- .../java/io/mesalabs/knoxpatch/hooks/PropSpoofHooks.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/mesalabs/knoxpatch/hooks/PropSpoofHooks.kt b/app/src/main/java/io/mesalabs/knoxpatch/hooks/PropSpoofHooks.kt index 2aeacba..eb0b21e 100644 --- a/app/src/main/java/io/mesalabs/knoxpatch/hooks/PropSpoofHooks.kt +++ b/app/src/main/java/io/mesalabs/knoxpatch/hooks/PropSpoofHooks.kt @@ -108,11 +108,11 @@ object PropSpoofHooks : YukiBaseHooker() { val key: String = args(0).string() val def: String = args(1).string() - if (key == "ro.boot.flash.locked" - || key == "ro.boot.verifiedbootstate" - || key == "ro.boot.warranty_bit" - || key == "ro.config.iccc_version") { - result = def + when (key) { + "ro.boot.flash.locked" -> result = "1" + "ro.boot.verifiedbootstate" -> result = "green" + "ro.boot.warranty_bit" -> result = "0" + "ro.config.iccc_version" -> result = def } } }