2023-11-30 19:28:01 +02:00
|
|
|
# Error on < Android 8.
|
2023-11-24 21:58:30 +02:00
|
|
|
if [ "$API" -lt 26 ]; then
|
2023-12-11 01:22:38 +02:00
|
|
|
abort "- !!! You can't use this module on Android < 8.0"
|
2023-11-24 21:58:30 +02:00
|
|
|
fi
|
|
|
|
|
2023-12-11 01:22:38 +02:00
|
|
|
# safetynet-fix module is obsolete and it's incompatible with PIF.
|
2023-11-29 06:19:14 +02:00
|
|
|
if [ -d /data/adb/modules/safetynet-fix ]; then
|
2024-01-12 14:32:32 +02:00
|
|
|
rm -rf /data/adb/modules/safetynet-fix
|
|
|
|
rm -f /data/adb/SNFix.dex
|
2023-12-20 14:16:05 +02:00
|
|
|
ui_print "! safetynet-fix module will be removed. Do NOT install it again along PIF."
|
2023-11-29 18:55:27 +02:00
|
|
|
fi
|
2023-11-29 06:19:14 +02:00
|
|
|
|
2023-11-30 19:28:01 +02:00
|
|
|
# MagiskHidePropsConf module is obsolete in Android 8+ but it shouldn't give issues.
|
|
|
|
if [ -d /data/adb/modules/MagiskHidePropsConf ]; then
|
2023-12-20 14:16:05 +02:00
|
|
|
ui_print "! WARNING, MagiskHidePropsConf module may cause issues with PIF."
|
2023-12-11 01:22:38 +02:00
|
|
|
fi
|
|
|
|
|
2023-12-11 11:50:13 +02:00
|
|
|
# Remove xiaomi.eu apps
|
2023-12-11 01:22:38 +02:00
|
|
|
|
2023-12-11 11:50:13 +02:00
|
|
|
if [ -d "/product/app/XiaomiEUInject" ]; then
|
2024-01-12 14:32:32 +02:00
|
|
|
|
|
|
|
directory="$MODPATH/product/app/XiaomiEUInject"
|
|
|
|
|
|
|
|
[ -d "$directory" ] || mkdir -p "$directory"
|
|
|
|
|
|
|
|
touch "$directory/.replace"
|
|
|
|
|
|
|
|
ui_print "- XiaomiEUInject app removed."
|
2023-12-11 11:50:13 +02:00
|
|
|
fi
|
2023-12-18 14:09:17 +02:00
|
|
|
|
2024-01-28 12:09:50 +02:00
|
|
|
if [ -d "/product/app/XiaomiEUInject-Stub" ]; then
|
|
|
|
|
|
|
|
directory="$MODPATH/product/app/XiaomiEUInject-Stub"
|
|
|
|
|
|
|
|
[ -d "$directory" ] || mkdir -p "$directory"
|
|
|
|
|
|
|
|
touch "$directory/.replace"
|
|
|
|
|
|
|
|
ui_print "- XiaomiEUInject-Stub app removed."
|
|
|
|
fi
|
|
|
|
|
2023-12-18 14:09:17 +02:00
|
|
|
# Remove EliteRoms app
|
2023-12-20 14:16:05 +02:00
|
|
|
|
2024-01-12 14:32:32 +02:00
|
|
|
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-20 14:16:05 +02:00
|
|
|
fi
|
|
|
|
|
2023-12-18 14:09:17 +02:00
|
|
|
if [ -d "/system/app/EliteDevelopmentModule" ]; then
|
2024-01-12 14:32:32 +02:00
|
|
|
|
|
|
|
directory="$MODPATH/system/app/EliteDevelopmentModule"
|
|
|
|
|
|
|
|
[ -d "$directory" ] || mkdir -p "$directory"
|
|
|
|
|
|
|
|
touch "$directory/.replace"
|
|
|
|
|
|
|
|
ui_print "- EliteDevelopmentModule app removed."
|
2024-01-28 12:09:50 +02:00
|
|
|
fi
|
2024-02-16 03:50:50 +02:00
|
|
|
|
|
|
|
if [ -f "/data/adb/pif.json" ]; then
|
|
|
|
mv -f "/data/adb/pif.json" "/data/adb/pif.json.old"
|
|
|
|
ui_print "- Backup old pif.json file"
|
|
|
|
ui_print "- Module will use the default one"
|
|
|
|
ui_print "- If you want to use your custom fingerprint, remove .old extension"
|
|
|
|
fi
|