50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
From 77488a9ec7f97c5b658cd6224b0ef147ef9752cd Mon Sep 17 00:00:00 2001
|
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
Date: Thu, 29 Dec 2022 15:12:03 +0000
|
|
Subject: [PATCH 7/9] treble: Securize on-demand
|
|
|
|
Status is stored in /metadata and controlled by persist prop
|
|
|
|
Change-Id: I8069b6f471ad87ab34c18b743689ab3584cee35b
|
|
---
|
|
phh-prop-handler.sh | 14 ++++++++++++++
|
|
vndk.rc | 3 +++
|
|
2 files changed, 17 insertions(+)
|
|
|
|
diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh
|
|
index e187466..fe857b7 100644
|
|
--- a/phh-prop-handler.sh
|
|
+++ b/phh-prop-handler.sh
|
|
@@ -281,3 +281,17 @@ if [ "$1" == "persist.bluetooth.system_audio_hal.enabled" ]; then
|
|
restartAudio
|
|
exit
|
|
fi
|
|
+
|
|
+if [ "$1" == "persist.sys.phh.securize" ];then
|
|
+ if [[ "$prop_value" != "true" && "$prop_value" != "false" ]]; then
|
|
+ exit 1
|
|
+ fi
|
|
+
|
|
+ if [[ "$prop_value" == "true" ]]; then
|
|
+ mkdir /metadata/phh
|
|
+ touch /metadata/phh/secure
|
|
+ else
|
|
+ rm /metadata/phh/secure
|
|
+ fi
|
|
+ exit
|
|
+fi
|
|
diff --git a/vndk.rc b/vndk.rc
|
|
index 9f74ffd..dfcfcfe 100644
|
|
--- a/vndk.rc
|
|
+++ b/vndk.rc
|
|
@@ -112,3 +112,6 @@ service watchdogd-gsi /system/bin/watchdogd 10 20
|
|
# Fix for non-AMOLED Transsion devices where brightness would be dimmer than usual
|
|
on property:ro.vendor.transsion.backlight_12bit=*
|
|
setprop ro.vendor.transsion.backlight_hal.optimization ${ro.vendor.transsion.backlight_12bit}
|
|
+
|
|
+on property:persist.sys.phh.securize=*
|
|
+ exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.securize"
|
|
--
|
|
2.34.1
|
|
|