lineage_patches_unified/patches_treble_td/platform_bionic/0004-Add-some-properties-to-fake-in-keymaster-prop-replac.patch
2023-06-22 07:49:58 +08:00

32 lines
1.1 KiB
Diff

From b9ad9ef613bcc1c7fb7713b5091e98343669d393 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 28 May 2023 16:46:46 -0400
Subject: [PATCH 4/4] Add some properties to fake in "keymaster" prop
replacement mode, to expose unlocked vbmeta state and orange
verifiedbootstate
---
libc/system_properties/system_properties.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
index 40ff48bad..057199318 100644
--- a/libc/system_properties/system_properties.cpp
+++ b/libc/system_properties/system_properties.cpp
@@ -121,6 +121,12 @@ static const char* redirectToProp(const char *name) {
if(strcmp(name, "ro.build.version.security_patch") == 0) {
return "ro.keymaster.xxx.security_patch";
}
+ if(strcmp(name, "ro.boot.vbmeta.device_state") == 0) {
+ return "ro.keymaster.xxx.vbmeta_state";
+ }
+ if(strcmp(name, "ro.boot.verifiedbootstate") == 0) {
+ return "ro.keymaster.xxx.verifiedbootstate";
+ }
}
return name;
}
--
2.34.1