2024-09-04 13:12:52 +03:00
|
|
|
# Module requires Zygisk to work
|
2024-09-15 18:15:37 +03:00
|
|
|
isZygiskEnabled=$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")
|
|
|
|
if [ "$isZygiskEnabled" == "value=0" ] && [ ! -d "/data/adb/modules/zygisksu" ]; then
|
|
|
|
abort "! Zygisk is not enabled. Please, enable Zygisk in Magisk settings or install ZygiskNext or ReZygisk module."
|
2024-09-04 13:12:52 +03:00
|
|
|
fi
|
|
|
|
|
2024-07-21 19:34:45 +03:00
|
|
|
# Error on < Android 8
|
|
|
|
if [ "$API" -lt 26 ]; then
|
2024-09-04 13:12:52 +03:00
|
|
|
abort "! You can't use this module on Android < 8.0"
|
2024-07-21 19:34:45 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
# safetynet-fix module is obsolete and it's incompatible with PIF
|
|
|
|
if [ -d "/data/adb/modules/safetynet-fix" ]; then
|
|
|
|
touch "/data/adb/modules/safetynet-fix/remove"
|
|
|
|
ui_print "! safetynet-fix module removed. Do NOT install it again along PIF"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# playcurl must be removed when flashing PIF
|
|
|
|
if [ -d "/data/adb/modules/playcurl" ]; then
|
|
|
|
touch "/data/adb/modules/playcurl/remove"
|
|
|
|
ui_print "! playcurl module removed!"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# Check custom fingerprint
|
|
|
|
if [ -f "/data/adb/pif.json" ]; then
|
|
|
|
mv -f "/data/adb/pif.json" "/data/adb/pif.json.old"
|
|
|
|
ui_print "- Backup custom pif.json"
|
|
|
|
fi
|