mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-19 02:52:20 +08:00
Improve scripts
This commit is contained in:
parent
ac9d4d385c
commit
0d2c22d982
@ -1,3 +1,12 @@
|
|||||||
|
# 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
|
# Module requires Zygisk to work
|
||||||
isZygiskEnabled=$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")
|
isZygiskEnabled=$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")
|
||||||
if [ "$isZygiskEnabled" == "value=0" ] && [ ! -d "/data/adb/modules/zygisksu" ]; then
|
if [ "$isZygiskEnabled" == "value=0" ] && [ ! -d "/data/adb/modules/zygisksu" ]; then
|
||||||
@ -15,10 +24,9 @@ if [ -d "/data/adb/modules/safetynet-fix" ]; then
|
|||||||
ui_print "! safetynet-fix module removed. Do NOT install it again along PIF"
|
ui_print "! safetynet-fix module removed. Do NOT install it again along PIF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# playcurl must be removed when flashing PIF
|
# playcurl warn
|
||||||
if [ -d "/data/adb/modules/playcurl" ]; then
|
if [ -d "/data/adb/modules/playcurl" ]; then
|
||||||
touch "/data/adb/modules/playcurl/remove"
|
ui_print "! playcurl may overwrite fingerprint with invalid one, be careful!"
|
||||||
ui_print "! playcurl module removed!"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# MagiskHidePropsConf module is obsolete in Android 8+ but it shouldn't give issues
|
# MagiskHidePropsConf module is obsolete in Android 8+ but it shouldn't give issues
|
||||||
@ -28,6 +36,29 @@ fi
|
|||||||
|
|
||||||
# Check custom fingerprint
|
# Check custom fingerprint
|
||||||
if [ -f "/data/adb/pif.json" ]; then
|
if [ -f "/data/adb/pif.json" ]; then
|
||||||
mv -f "/data/adb/pif.json" "/data/adb/pif.json.old"
|
ui_print "!!! WARNING !!!"
|
||||||
ui_print "- Backup custom pif.json"
|
ui_print "- You are using custom pif.json (/data/adb/pif.json)"
|
||||||
|
ui_print "- Remove that file if you can't pass attestation test!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Uninstall conflict apps
|
||||||
|
APPS="
|
||||||
|
/system/app/EliteDevelopmentModule
|
||||||
|
/system/app/XInjectModule
|
||||||
|
/system/product/app/XiaomiEUInject
|
||||||
|
/system/product/app/XiaomiEUInject-Stub
|
||||||
|
/system/system_ext/app/hentaiLewdbSVTDummy
|
||||||
|
/system/system_ext/app/PifPrebuilt
|
||||||
|
"
|
||||||
|
|
||||||
|
for APP in $APPS; do
|
||||||
|
if [ -d "$APP" ]; then
|
||||||
|
mkdir -p "${MODPATH}${APP}"
|
||||||
|
if [ "$KSU" = true ] || [ "$APATCH" = true ]; then
|
||||||
|
mknod "${MODPATH}${APP}" c 0 0
|
||||||
|
else
|
||||||
|
touch "${MODPATH}${APP}/.replace"
|
||||||
|
fi
|
||||||
|
ui_print "- Removed: $(basename "$APP")"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
@ -1,11 +1,35 @@
|
|||||||
MODPATH="${0%/*}"
|
MODPATH="${0%/*}"
|
||||||
. $MODPATH/common_func.sh
|
. "$MODPATH"/common_func.sh
|
||||||
|
|
||||||
# Remove Play Services from Magisk DenyList when set to Enforce in normal mode
|
# Remove Play Services from Magisk DenyList when set to Enforce in normal mode
|
||||||
if magisk --denylist status; then
|
if magisk --denylist status; then
|
||||||
magisk --denylist rm com.google.android.gms
|
magisk --denylist rm com.google.android.gms
|
||||||
|
else
|
||||||
|
# If DenyList is disabled, maybe you are using Shamiko
|
||||||
|
magisk --denylist add com.google.android.gms com.google.android.gms.unstable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Uninstall conflict apps
|
||||||
|
APPS="
|
||||||
|
/system/app/EliteDevelopmentModule
|
||||||
|
/system/app/XInjectModule
|
||||||
|
/system/product/app/XiaomiEUInject
|
||||||
|
/system/product/app/XiaomiEUInject-Stub
|
||||||
|
/system/system_ext/app/hentaiLewdbSVTDummy
|
||||||
|
/system/system_ext/app/PifPrebuilt
|
||||||
|
"
|
||||||
|
|
||||||
|
for APP in $APPS; do
|
||||||
|
if [ -d "$APP" ]; then
|
||||||
|
mkdir -p "${MODPATH}${APP}"
|
||||||
|
if [ "$KSU" = true ] || [ "$APATCH" = true ]; then
|
||||||
|
mknod "${MODPATH}${APP}" c 0 0
|
||||||
|
else
|
||||||
|
touch "${MODPATH}${APP}/.replace"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Conditional early sensitive properties
|
# Conditional early sensitive properties
|
||||||
|
|
||||||
# Samsung
|
# Samsung
|
||||||
@ -22,12 +46,12 @@ resetprop_if_diff ro.is_ever_orange 0
|
|||||||
|
|
||||||
# Microsoft
|
# Microsoft
|
||||||
for PROP in $(resetprop | grep -oE 'ro.*.build.tags'); do
|
for PROP in $(resetprop | grep -oE 'ro.*.build.tags'); do
|
||||||
resetprop_if_diff $PROP release-keys
|
resetprop_if_diff "$PROP" release-keys
|
||||||
done
|
done
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
for PROP in $(resetprop | grep -oE 'ro.*.build.type'); do
|
for PROP in $(resetprop | grep -oE 'ro.*.build.type'); do
|
||||||
resetprop_if_diff $PROP user
|
resetprop_if_diff "$PROP" user
|
||||||
done
|
done
|
||||||
resetprop_if_diff ro.adb.secure 1
|
resetprop_if_diff ro.adb.secure 1
|
||||||
resetprop_if_diff ro.debuggable 0
|
resetprop_if_diff ro.debuggable 0
|
||||||
|
Loading…
Reference in New Issue
Block a user