2023-11-24 21:58:30 +02:00
|
|
|
# Error on < Android 8
|
|
|
|
if [ "$API" -lt 26 ]; then
|
2023-11-29 06:19:14 +02:00
|
|
|
abort "!!! You can't use this module on Android < 8.0"
|
2023-11-24 21:58:30 +02:00
|
|
|
fi
|
|
|
|
|
2023-11-29 18:55:27 +02:00
|
|
|
# Remove/warn if conflicting modules are installed
|
2023-11-29 06:19:14 +02:00
|
|
|
if [ -d /data/adb/modules/safetynet-fix ]; then
|
|
|
|
touch /data/adb/modules/safetynet-fix/remove
|
|
|
|
ui_print "- 'safetynet-fix' module will be removed on next reboot"
|
|
|
|
fi
|
2023-11-29 18:55:27 +02:00
|
|
|
if [ -d /data/adb/modules/MagiskHidePropsConf ]; then
|
|
|
|
ui_print "- Warning, 'MagiskHidePropsConf' module may cause issues with PIF"
|
|
|
|
fi
|
2023-11-29 06:19:14 +02:00
|
|
|
|
2023-11-29 17:19:43 +02:00
|
|
|
# Copy any custom.pif.json to updated module
|
|
|
|
if [ -f /data/adb/modules/playintegrityfix/custom.pif.json ]; then
|
|
|
|
ui_print "- Restoring custom.pif.json"
|
|
|
|
cp -af /data/adb/modules/playintegrityfix/custom.pif.json $MODPATH/custom.pif.json
|
|
|
|
fi
|
|
|
|
|
2023-11-29 06:19:14 +02:00
|
|
|
# Clean up any leftover files from previous deprecated methods
|
|
|
|
rm -f /data/data/com.google.android.gms/cache/pif.prop /data/data/com.google.android.gms/pif.prop
|
2023-11-29 17:19:43 +02:00
|
|
|
rm -f /data/data/com.google.android.gms/cache/pif.json /data/data/com.google.android.gms/pif.json
|