From d1c1be57c89bce8ed4dd4ddd5959db7f366133b1 Mon Sep 17 00:00:00 2001 From: chiteroman Date: Thu, 24 Oct 2024 23:12:00 +0200 Subject: [PATCH] Fix script bootloop issue --- app/src/main/cpp/Dobby | 2 +- module/common_func.sh | 3 +++ module/customize.sh | 28 ---------------------------- module/post-fs-data.sh | 19 ++++++++++++------- 4 files changed, 16 insertions(+), 36 deletions(-) diff --git a/app/src/main/cpp/Dobby b/app/src/main/cpp/Dobby index 7c1444d..d361415 160000 --- a/app/src/main/cpp/Dobby +++ b/app/src/main/cpp/Dobby @@ -1 +1 @@ -Subproject commit 7c1444df316b7e594cb9be4408017f67a5905396 +Subproject commit d361415cab7373582b29cd669def06562e370c41 diff --git a/module/common_func.sh b/module/common_func.sh index 681e91a..80d294f 100644 --- a/module/common_func.sh +++ b/module/common_func.sh @@ -51,3 +51,6 @@ resetprop_if_match() { [[ "$(resetprop "$NAME")" = *"$CONTAINS"* ]] && $RESETPROP "$NAME" "$VALUE" } + +# stub for boot-time +ui_print() { return; } diff --git a/module/customize.sh b/module/customize.sh index c382d26..842f6be 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -18,12 +18,6 @@ if [ "$API" -lt 26 ]; then abort "! You can't use this module on Android < 8.0" 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 if [ -d "/data/adb/modules/playcurl" ]; then 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 "- Remove that file if you can't pass attestation test!" 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 diff --git a/module/post-fs-data.sh b/module/post-fs-data.sh index 8d30694..5cc3a9a 100644 --- a/module/post-fs-data.sh +++ b/module/post-fs-data.sh @@ -11,6 +11,12 @@ else 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 APPS=" /system/app/EliteDevelopmentModule @@ -22,13 +28,12 @@ APPS=" " 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 + HIDEPATH="$MODPATH$APP" + mkdir -p "$HIDEPATH" + if [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; then + setfattr -n trusted.overlay.opaque -v y "$HIDEPATH" + else + touch "$HIDEPATH"/.replace fi done