Allow optional skipping resetprop --delete to avoid detections

This commit is contained in:
Chris Renshaw
2024-11-10 13:09:56 -04:00
committed by GitHub
parent 4e96fdef9d
commit cd32f0cb0a
3 changed files with 5 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
SKIPDELPROP=false
[ -f "$MODPATH/skipdelprop" ] && SKIPDELPROP=true
RESETPROP="resetprop -n"
[ -f /data/adb/magisk/util_functions.sh ] && [ "$(grep MAGISK_VER_CODE /data/adb/magisk/util_functions.sh | cut -d= -f2)" -lt 27003 ] && RESETPROP=resetprop_hexpatch

View File

@@ -17,7 +17,7 @@ if [ -d /data/adb/modules/playintegrityfix/system ]; then
fi
# Copy any supported custom files to updated module
for FILE in custom.app_replace.list custom.pif.json; do
for FILE in custom.app_replace.list custom.pif.json skipdelprop; do
if [ -f "/data/adb/modules/playintegrityfix/$FILE" ]; then
ui_print "- Restoring $FILE"
cp -af /data/adb/modules/playintegrityfix/$FILE $MODPATH/$FILE

View File

@@ -11,7 +11,7 @@ resetprop_if_match vendor.boot.mode recovery unknown
# SELinux
resetprop_if_diff ro.boot.selinux enforcing
# use delete since it can be 0 or 1 for enforcing depending on OEM
if [ -n "$(resetprop ro.build.selinux)" ]; then
if ! $SKIPDELPROP && [ -n "$(resetprop ro.build.selinux)" ]; then
resetprop --delete ro.build.selinux
fi
# use toybox to protect stat access time reading