PlayIntegrityFix/module/customize.sh

39 lines
1.0 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 07:22:38 +08:00
abort "- !!! You can't use this module on Android < 8.0"
2023-11-25 03:58:30 +08:00
fi
2023-12-11 07:22:38 +08:00
# safetynet-fix module is obsolete and it's incompatible with PIF.
if [ -d /data/adb/modules/safetynet-fix ]; then
2023-12-18 17:46:11 +08:00
rm -rf /data/adb/modules/safetynet-fix
2023-12-14 18:11:36 +08:00
ui_print "- ! safetynet-fix module will be removed. Do NOT install it again along PIF."
fi
2023-12-01 01:28:01 +08:00
# MagiskHidePropsConf module is obsolete in Android 8+ but it shouldn't give issues.
if [ -d /data/adb/modules/MagiskHidePropsConf ]; then
2023-12-14 18:11:36 +08:00
ui_print "- ! WARNING, MagiskHidePropsConf module may cause issues with PIF."
2023-12-11 07:22:38 +08:00
fi
2023-12-11 17:50:13 +08:00
# Remove xiaomi.eu apps
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
if [ -d "/product/app/XiaomiEUInject" ]; then
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
directory="$MODPATH/product/app/XiaomiEUInject"
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
[ -d "$directory" ] || mkdir -p "$directory"
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
touch "$directory/.replace"
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
ui_print "- XiaomiEUInject app removed."
fi
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
if [ -d "/system/app/XInjectModule" ]; then
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
directory="$MODPATH/system/app/XInjectModule"
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
[ -d "$directory" ] || mkdir -p "$directory"
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
touch "$directory/.replace"
2023-12-11 07:22:38 +08:00
2023-12-11 17:50:13 +08:00
ui_print "- XInjectModule app removed."
2023-12-05 20:13:38 +08:00
fi