lineage_patches_unified/patches_treble/device_phh_treble/0008-treble-Also-use-data-adb-for-securize-status.patch
2023-06-22 07:49:58 +08:00

47 lines
1.5 KiB
Diff

From adbae267d33896e4904b95d0960e6f118c91e265 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 22 Mar 2023 23:37:05 +0000
Subject: [PATCH 8/9] treble: Also use /data/adb for securize status
Change-Id: I778f2be5407ae0a548a098c72031cce9be83cf96
---
phh-prop-handler.sh | 5 ++++-
rw-system.sh | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/phh-prop-handler.sh b/phh-prop-handler.sh
index a6ddab8..0ad7a1f 100644
--- a/phh-prop-handler.sh
+++ b/phh-prop-handler.sh
@@ -225,10 +225,13 @@ if [ "$1" == "persist.sys.phh.securize" ];then
fi
if [[ "$prop_value" == "true" ]]; then
- mkdir /metadata/phh
+ mkdir -p /metadata/phh
touch /metadata/phh/secure
+ mkdir -p /data/adb/phh
+ touch /data/adb/phh/secure
else
rm /metadata/phh/secure
+ rm /data/adb/phh/secure
fi
exit
fi
diff --git a/rw-system.sh b/rw-system.sh
index 9c7cc42..8a188f7 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -739,7 +739,7 @@ copyprop() {
resetprop_phh "$1" "$(getprop "$2")"
fi
}
-if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
+if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ] || [ -f /data/adb/phh/secure ];then
copyprop ro.build.device ro.vendor.build.device
copyprop ro.system.build.fingerprint ro.vendor.build.fingerprint
copyprop ro.bootimage.build.fingerprint ro.vendor.build.fingerprint
--
2.34.1