1
0
mirror of https://github.com/ponces/treble_aosp.git synced 2024-11-24 08:36:24 +00:00
treble_aosp/patches/personal/device_phh_treble/0002-Rework-securize-tweak.patch
2024-04-13 19:45:25 +00:00

116 lines
5.3 KiB
Diff

From 1423a40a59b5d849e6161a3e7cdf0de003dcbad9 Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Wed, 25 Dec 2019 12:34:05 +0200
Subject: [PATCH 2/3] Rework securize tweak
---
base.mk | 1 -
rw-system.sh | 49 ++++++++++++++++++++++++++++++-------------------
2 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/base.mk b/base.mk
index 22525cd..8c0f2be 100644
--- a/base.mk
+++ b/base.mk
@@ -177,7 +177,6 @@ PRODUCT_PACKAGES += \
resetprop_phh
PRODUCT_COPY_FILES += \
- device/phh/treble/phh-securize.sh:system/bin/phh-securize.sh \
device/phh/treble/files/ota.sh:system/bin/ota.sh \
PRODUCT_COPY_FILES += \
diff --git a/rw-system.sh b/rw-system.sh
index 1e47287..d591190 100644
--- a/rw-system.sh
+++ b/rw-system.sh
@@ -768,32 +768,59 @@ copyprop() {
resetprop_phh "$1" "$(getprop "$2")"
fi
}
-if [ -f /system/phh/secure ] || [ -f /metadata/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
copyprop ro.build.fingerprint ro.vendor.build.fingerprint
+ copyprop ro.system_ext.build.fingerprint ro.vendor.build.fingerprint
+ copyprop ro.product.build.fingerprint ro.vendor.build.fingerprint
copyprop ro.build.device ro.vendor.product.device
copyprop ro.product.system.device ro.vendor.product.device
copyprop ro.product.device ro.vendor.product.device
copyprop ro.product.system.device ro.product.vendor.device
copyprop ro.product.device ro.product.vendor.device
+ copyprop ro.product.system_ext.device ro.vendor.product.device
+ copyprop ro.product.product.device ro.vendor.product.device
+ copyprop ro.product.system_ext.device ro.product.vendor.device
+ copyprop ro.product.product.device ro.product.vendor.device
copyprop ro.product.system.name ro.vendor.product.name
copyprop ro.product.name ro.vendor.product.name
- copyprop ro.product.system.name ro.product.vendor.device
- copyprop ro.product.name ro.product.vendor.device
+ copyprop ro.product.system.name ro.product.vendor.name
+ copyprop ro.product.name ro.product.vendor.name
+ copyprop ro.product.system_ext.name ro.vendor.product.name
+ copyprop ro.product.product.name ro.vendor.product.name
+ copyprop ro.product.system_ext.name ro.product.vendor.name
+ copyprop ro.product.product.name ro.product.vendor.name
copyprop ro.system.product.brand ro.vendor.product.brand
copyprop ro.product.brand ro.vendor.product.brand
+ copyprop ro.product.system.brand ro.vendor.product.brand
+ copyprop ro.product.system_ext.brand ro.vendor.product.brand
+ copyprop ro.product.product.brand ro.product.vendor.brand
+ copyprop ro.system.product.brand ro.product.vendor.brand
+ copyprop ro.product.brand ro.product.vendor.brand
+ copyprop ro.product.system.brand ro.product.vendor.brand
+ copyprop ro.product.system_ext.brand ro.product.vendor.brand
+ copyprop ro.product.product.brand ro.product.vendor.brand
copyprop ro.product.system.model ro.vendor.product.model
copyprop ro.product.model ro.vendor.product.model
+ copyprop ro.product.system_ext.model ro.vendor.product.model
+ copyprop ro.product.product.model ro.vendor.product.model
copyprop ro.product.system.model ro.product.vendor.model
copyprop ro.product.model ro.product.vendor.model
copyprop ro.build.product ro.vendor.product.model
copyprop ro.build.product ro.product.vendor.model
+ copyprop ro.product.system_ext.model ro.product.vendor.model
+ copyprop ro.product.product.model ro.product.vendor.model
copyprop ro.system.product.manufacturer ro.vendor.product.manufacturer
copyprop ro.product.manufacturer ro.vendor.product.manufacturer
+ copyprop ro.product.system.manufacturer ro.vendor.product.manufacturer
+ copyprop ro.product.product.manufacturer ro.vendor.product.manufacturer
+ copyprop ro.product.system_ext.manufacturer ro.vendor.product.manufacturer
copyprop ro.system.product.manufacturer ro.product.vendor.manufacturer
copyprop ro.product.manufacturer ro.product.vendor.manufacturer
+ copyprop ro.product.system.manufacturer ro.product.vendor.manufacturer
+ copyprop ro.product.product.manufacturer ro.product.vendor.manufacturer
+ copyprop ro.product.system_ext.manufacturer ro.product.vendor.manufacturer
(getprop ro.vendor.build.security_patch; getprop ro.keymaster.xxx.security_patch) |sort |tail -n 1 |while read v;do
[ -n "$v" ] && resetprop_phh ro.build.version.security_patch "$v"
done
@@ -812,22 +839,6 @@ if [ -f /system/phh/secure ] || [ -f /metadata/phh/secure ];then
resetprop_phh ro.adb.secure 1
- # Hide system/xbin/su
- mount /mnt/phh/empty_dir /system/xbin
- mount /mnt/phh/empty_dir /system/app/me.phh.superuser
- mount /system/phh/empty /system/xbin/phh-su
-else
- mkdir /mnt/phh/xbin
- chmod 0755 /mnt/phh/xbin
- chcon u:object_r:system_file:s0 /mnt/phh/xbin
-
- #phh-su will bind over this empty file to make a real su
- touch /mnt/phh/xbin/su
- chcon u:object_r:system_file:s0 /mnt/phh/xbin/su
-
- mount -o bind /mnt/phh/xbin /system/xbin
-fi
-
for abi in "" 64;do
f=/vendor/lib$abi/libstagefright_foundation.so
if [ -f "$f" ];then
--
2.34.1