Fix script bootloop issue

This commit is contained in:
chiteroman 2024-10-24 23:12:00 +02:00
parent b121977824
commit d1c1be57c8
4 changed files with 16 additions and 36 deletions

@ -1 +1 @@
Subproject commit 7c1444df316b7e594cb9be4408017f67a5905396 Subproject commit d361415cab7373582b29cd669def06562e370c41

View File

@ -51,3 +51,6 @@ resetprop_if_match() {
[[ "$(resetprop "$NAME")" = *"$CONTAINS"* ]] && $RESETPROP "$NAME" "$VALUE" [[ "$(resetprop "$NAME")" = *"$CONTAINS"* ]] && $RESETPROP "$NAME" "$VALUE"
} }
# stub for boot-time
ui_print() { return; }

View File

@ -18,12 +18,6 @@ if [ "$API" -lt 26 ]; then
abort "! You can't use this module on Android < 8.0" abort "! You can't use this module on Android < 8.0"
fi 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 warn # playcurl warn
if [ -d "/data/adb/modules/playcurl" ]; then if [ -d "/data/adb/modules/playcurl" ]; then
ui_print "! playcurl may overwrite fingerprint with invalid one, be careful!" ui_print "! playcurl may overwrite fingerprint with invalid one, be careful!"
@ -40,25 +34,3 @@ if [ -f "/data/adb/pif.json" ]; then
ui_print "- You are using custom pif.json (/data/adb/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!" 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

View File

@ -11,6 +11,12 @@ else
fi fi
fi fi
# safetynet-fix module is obsolete and it's incompatible with PIF
SNFix="/data/adb/modules/safetynet-fix"
if [ -d $SNFix ]; then
rm -rf $SNFix
fi
# Uninstall conflict apps # Uninstall conflict apps
APPS=" APPS="
/system/app/EliteDevelopmentModule /system/app/EliteDevelopmentModule
@ -22,13 +28,12 @@ APPS="
" "
for APP in $APPS; do for APP in $APPS; do
if [ -d "$APP" ]; then HIDEPATH="$MODPATH$APP"
mkdir -p "${MODPATH}${APP}" mkdir -p "$HIDEPATH"
if [ "$KSU" = true ] || [ "$APATCH" = true ]; then if [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; then
mknod "${MODPATH}${APP}" c 0 0 setfattr -n trusted.overlay.opaque -v y "$HIDEPATH"
else else
touch "${MODPATH}${APP}/.replace" touch "$HIDEPATH"/.replace
fi
fi fi
done done