PlayIntegrityFix/module/customize.sh

37 lines
1.4 KiB
Bash
Raw Normal View History

2024-10-23 15:22:27 +03:00
# Don't flash in recovery!
if ! $BOOTMODE; then
ui_print "*********************************************************"
ui_print "! Install from recovery is NOT supported"
ui_print "! Recovery sucks"
ui_print "! Please install from Magisk / KernelSU / APatch app"
abort "*********************************************************"
fi
# Module requires Zygisk to work
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."
fi
2024-07-21 19:34:45 +03:00
# Error on < Android 8
if [ "$API" -lt 26 ]; then
abort "! You can't use this module on Android < 8.0"
2024-07-21 19:34:45 +03:00
fi
2024-10-23 15:22:27 +03:00
# playcurl warn
2024-07-21 19:34:45 +03:00
if [ -d "/data/adb/modules/playcurl" ]; then
2024-10-23 15:22:27 +03:00
ui_print "! playcurl may overwrite fingerprint with invalid one, be careful!"
2024-07-21 19:34:45 +03:00
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
2024-10-23 15:22:27 +03:00
ui_print "!!! WARNING !!!"
ui_print "- You are using custom pif.json (/data/adb/pif.json)"
ui_print "- Remove that file if you can't pass attestation test!"
2024-07-21 19:34:45 +03:00
fi