diff --git a/module/common_func.sh b/module/common_func.sh index 80d294fa..6ea90322 100644 --- a/module/common_func.sh +++ b/module/common_func.sh @@ -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 diff --git a/module/customize.sh b/module/customize.sh index 5096bbe0..914bd690 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -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 diff --git a/module/service.sh b/module/service.sh index 134301ec..79568f60 100644 --- a/module/service.sh +++ b/module/service.sh @@ -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