PlayIntegrityFix/module/customize.sh

46 lines
1.2 KiB
Bash
Raw Normal View History

2023-12-01 01:28:01 +08:00
# Error on < Android 8.
2023-11-25 03:58:30 +08:00
if [ "$API" -lt 26 ]; then
2023-12-11 08:36:14 +08:00
abort "- !!! You can't use this module on Android < 8.0"
fi
# safetynet-fix module is obsolete and it's incompatible with PIF.
if [ -d /data/adb/modules/safetynet-fix ]; then
abort "- !!! REMOVE safetynet-fix module and do NOT install it again along PIF."
2023-11-25 03:58:30 +08:00
fi
2023-12-05 23:34:53 +08:00
# Check pif.json
if [ ! -f /data/adb/pif.json ]; then
2023-12-11 08:36:14 +08:00
mv -f $MODPATH/pif.json /data/adb/pif.json
ui_print "- Moved pif.json template, you must modify it."
2023-12-04 04:12:15 +08:00
fi
2023-12-05 23:34:53 +08:00
rm -f $MODPATH/pif.json
2023-12-11 08:36:14 +08:00
# MagiskHidePropsConf module is obsolete in Android 8 but it shouldn't give issues.
if [ -d /data/adb/modules/MagiskHidePropsConf ]; then
ui_print "- ! WARNING, MagiskHidePropsConf module may cause issues with PIF"
fi
2023-12-11 08:36:14 +08:00
# Check for xiaomi.eu apps
if [ -d "/product/app/XiaomiEUInject" ]; then
directory="$MODPATH/product/app/XiaomiEUInject"
[ -d "$directory" ] || mkdir -p "$directory"
touch "$directory/.replace"
ui_print "- XiaomiEUInject app removed."
fi
if [ -d "/system/app/XInjectModule" ]; then
directory="$MODPATH/system/app/XInjectModule"
[ -d "$directory" ] || mkdir -p "$directory"
touch "$directory/.replace"
ui_print "- XInjectModule app removed."
2023-12-05 23:34:53 +08:00
fi