Skip to content

Commit

Permalink
Allow optional skipping resetprop --delete to avoid detections
Browse files Browse the repository at this point in the history
  • Loading branch information
osm0sis authored Nov 10, 2024
1 parent 4e96fde commit cd32f0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions module/common_func.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion module/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion module/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd32f0c

Please sign in to comment.