forked from PeterGSI/patches
33 lines
1.4 KiB
Diff
33 lines
1.4 KiB
Diff
From b50dd85e88568bddedbab1e18984a5b5578c8612 Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Hugues Husson <phh@phh.me>
|
|
Date: Fri, 21 Apr 2023 13:08:48 -0400
|
|
Subject: [PATCH 2/2] Let system override some properties (ro.apex.updatable,
|
|
ro.adb.secure, etc.)
|
|
|
|
Change-Id: I3c84fa617f0ab7990abb0d905230a8703cf39bf7
|
|
---
|
|
init/property_service.cpp | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/init/property_service.cpp b/init/property_service.cpp
|
|
index 26341b196..19fc09d63 100644
|
|
--- a/init/property_service.cpp
|
|
+++ b/init/property_service.cpp
|
|
@@ -726,7 +726,12 @@ static void LoadProperties(char* data, const char* filter, const char* filename,
|
|
} else if (it->second != value) {
|
|
LOG(WARNING) << "Overriding previous property '" << key << "':'" << it->second
|
|
<< "' with new value '" << value << "'";
|
|
- it->second = value;
|
|
+ if (strcmp("ro.apex.updatable", key) == 0 || strcmp("ro.control_privapp_permissions", key) == 0
|
|
+ || strstr(key, "adb") || strstr(key, "secure")) {
|
|
+ LOG(WARNING) << "... Ignored";
|
|
+ } else {
|
|
+ it->second = value;
|
|
+ }
|
|
}
|
|
} else {
|
|
LOG(ERROR) << "Do not have permissions to set '" << key << "' to '" << value
|
|
--
|
|
2.40.0
|
|
|