diff --git a/module/customize.sh b/module/customize.sh index a6cd9f2..c583def 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -1,10 +1,14 @@ -# Error on < Android 8 -if [ "$API" -lt 26 ]; then - abort "! You can't use this module on Android < 8.0" +# Allow a scripts-only mode on older Android without Zygisk +if [ "$API" -lt 26 -o ! -d /data/adb/modules/playintegrityfix/zygisk ]; then + ui_print "! Installing global scripts only for Android < 8.0; no Zygisk device spoofing possible" + rm -rf $MODPATH/classes.dex $MODPATH/common_setup.sh $MODPATH/custom.pif.json \ + $MODPATH/example.app_replace.list $MODPATH/example.pif.json $MODPATH/migrate.sh $MODPATH/zygisk \ + /data/adb/modules/playintegrityfix/custom.app_replace.list \ + /data/adb/modules/playintegrityfix/custom.pif.json /data/adb/modules/playintegrityfix/system fi # Copy any disabled app files to updated module -if [ -d "/data/adb/modules/playintegrityfix/system" ]; then +if [ -d /data/adb/modules/playintegrityfix/system ]; then ui_print "- Restoring disabled ROM apps configuration" cp -arf /data/adb/modules/playintegrityfix/system $MODPATH fi @@ -23,7 +27,7 @@ if [ -d /data/adb/modules/MagiskHidePropsConf ]; then fi # Run common tasks for installation and boot-time -. $MODPATH/common_setup.sh +[ -d "$MODPATH/zygisk" ] && . $MODPATH/common_setup.sh # Migrate custom.pif.json to latest defaults if needed if [ -f "$MODPATH/custom.pif.json" ] && ! grep -q "api_level" $MODPATH/custom.pif.json; then diff --git a/module/post-fs-data.sh b/module/post-fs-data.sh index ce4f031..b19c9dc 100644 --- a/module/post-fs-data.sh +++ b/module/post-fs-data.sh @@ -1,14 +1,18 @@ MODPATH="${0%/*}" . $MODPATH/common_func.sh -# Remove Play Services from Magisk Denylist when set to enforcing -if magisk --denylist status; then - magisk --denylist rm com.google.android.gms +if [ -d "$MODPATH/zygisk" ]; then + # Remove Play Services from Magisk DenyList when set to Enforce in normal mode + if magisk --denylist status; then + magisk --denylist rm com.google.android.gms + fi + # Run common tasks for installation and boot-time + . $MODPATH/common_setup.sh +else + # Add Play Services DroidGuard process to Magisk DenyList for better results in scripts-only mode + magisk --denylist add com.google.android.gms com.google.android.gms.unstable fi -# Run common tasks for installation and boot-time -. $MODPATH/common_setup.sh - # Conditional early sensitive properties # Samsung @@ -26,7 +30,7 @@ resetprop_if_diff ro.boot.realmebootstate green # OnePlus resetprop_if_diff ro.is_ever_orange 0 -# Microsoft, RootBeer +# Microsoft resetprop_if_diff ro.build.tags release-keys # Other