mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-19 03:22:39 +02:00
Move props that need to be changed earlier into post-fs-data.sh
This commit is contained in:
parent
502dae9c45
commit
c07e2707b7
@ -7,3 +7,37 @@ fi
|
|||||||
if [ -d /data/adb/modules/safetynet-fix ]; then
|
if [ -d /data/adb/modules/safetynet-fix ]; then
|
||||||
touch /data/adb/modules/safetynet-fix/remove
|
touch /data/adb/modules/safetynet-fix/remove
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Conditional early sensitive properties
|
||||||
|
|
||||||
|
resetprop_if_diff() {
|
||||||
|
local NAME=$1
|
||||||
|
local EXPECTED=$2
|
||||||
|
local CURRENT=$(resetprop $NAME)
|
||||||
|
|
||||||
|
[ -z "$CURRENT" ] || [ "$CURRENT" == "$EXPECTED" ] || resetprop $NAME $EXPECTED
|
||||||
|
}
|
||||||
|
resetprop_if_match() {
|
||||||
|
local NAME=$1
|
||||||
|
local CONTAINS=$2
|
||||||
|
local VALUE=$3
|
||||||
|
|
||||||
|
[[ "$(resetprop $NAME)" == *"$CONTAINS"* ]] && resetprop $NAME $VALUE
|
||||||
|
}
|
||||||
|
|
||||||
|
# RootBeer, Microsoft
|
||||||
|
resetprop_if_diff ro.build.tags release-keys
|
||||||
|
|
||||||
|
# Samsung
|
||||||
|
resetprop_if_diff ro.boot.warranty_bit 0
|
||||||
|
resetprop_if_diff ro.vendor.boot.warranty_bit 0
|
||||||
|
resetprop_if_diff ro.vendor.warranty_bit 0
|
||||||
|
resetprop_if_diff ro.warranty_bit 0
|
||||||
|
|
||||||
|
# OnePlus
|
||||||
|
resetprop_if_diff ro.is_ever_orange 0
|
||||||
|
|
||||||
|
# Other
|
||||||
|
resetprop_if_diff ro.build.type user
|
||||||
|
resetprop_if_diff ro.debuggable 0
|
||||||
|
resetprop_if_diff ro.secure 1
|
||||||
|
@ -15,33 +15,15 @@ resetprop_if_match() {
|
|||||||
[[ "$(resetprop $NAME)" == *"$CONTAINS"* ]] && resetprop $NAME $VALUE
|
[[ "$(resetprop $NAME)" == *"$CONTAINS"* ]] && resetprop $NAME $VALUE
|
||||||
}
|
}
|
||||||
|
|
||||||
# RootBeer, Microsoft
|
|
||||||
resetprop_if_diff ro.build.tags release-keys
|
|
||||||
|
|
||||||
# Samsung
|
|
||||||
resetprop_if_diff ro.boot.warranty_bit 0
|
|
||||||
resetprop_if_diff ro.vendor.boot.warranty_bit 0
|
|
||||||
resetprop_if_diff ro.vendor.warranty_bit 0
|
|
||||||
resetprop_if_diff ro.warranty_bit 0
|
|
||||||
|
|
||||||
# OnePlus
|
|
||||||
resetprop_if_diff ro.is_ever_orange 0
|
|
||||||
|
|
||||||
# Other
|
|
||||||
resetprop_if_diff ro.build.type user
|
|
||||||
resetprop_if_diff ro.debuggable 0
|
|
||||||
resetprop_if_diff ro.secure 1
|
|
||||||
|
|
||||||
# Magisk recovery mode
|
# Magisk recovery mode
|
||||||
resetprop_if_match ro.bootmode recovery unknown
|
resetprop_if_match ro.bootmode recovery unknown
|
||||||
resetprop_if_match ro.boot.mode recovery unknown
|
resetprop_if_match ro.boot.mode recovery unknown
|
||||||
resetprop_if_match vendor.boot.mode recovery unknown
|
resetprop_if_match vendor.boot.mode recovery unknown
|
||||||
|
|
||||||
# SELinux
|
# SELinux
|
||||||
if [ -n "$(getprop ro.build.selinux)" ]; then
|
if [ -n "$(resetprop ro.build.selinux)" ]; then
|
||||||
resetprop --delete ro.build.selinux
|
resetprop --delete ro.build.selinux
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# use toybox to protect *stat* access time reading
|
# use toybox to protect *stat* access time reading
|
||||||
if [ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]; then
|
if [ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]; then
|
||||||
chmod 640 /sys/fs/selinux/enforce
|
chmod 640 /sys/fs/selinux/enforce
|
||||||
|
Loading…
Reference in New Issue
Block a user