From 721c93e7f0e414e83725edce3c3aa25d72113df3 Mon Sep 17 00:00:00 2001 From: 3a06fa5cf14d569c Date: Sat, 26 Oct 2024 23:10:25 +0800 Subject: [PATCH 1/2] Check zygisksu before execute magisk --- module/customize.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/customize.sh b/module/customize.sh index 842f6be6..6df89119 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -8,8 +8,7 @@ if ! $BOOTMODE; then 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 +if [ ! -d "/data/adb/modules/zygisksu" ] && [ "$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")" == "value=0" ]; then abort "! Zygisk is not enabled. Please, enable Zygisk in Magisk settings or install ZygiskNext or ReZygisk module." fi From 1f1126ee5c0b5fc95b139fa6caa42f75d4cf8004 Mon Sep 17 00:00:00 2001 From: 3a06fa5cf14d569c Date: Sat, 26 Oct 2024 23:22:39 +0800 Subject: [PATCH 2/2] Better magisk zygisk check --- module/customize.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/customize.sh b/module/customize.sh index 6df89119..4b4724a5 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -6,10 +6,11 @@ if ! $BOOTMODE; then ui_print "! Please install from Magisk / KernelSU / APatch app" abort "*********************************************************" fi - # Module requires Zygisk to work -if [ ! -d "/data/adb/modules/zygisksu" ] && [ "$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")" == "value=0" ]; then - abort "! Zygisk is not enabled. Please, enable Zygisk in Magisk settings or install ZygiskNext or ReZygisk module." +if [ ! -d "/data/adb/modules/zygisksu" ]; then + if [ -d "/data/adb/magisk" ]; then + [ ! "$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")" == "value=0" ] || abort "! Zygisk is not enabled. Please, enable Zygisk in Magisk settings or install ZygiskNext or ReZygisk module." + fi fi # Error on < Android 8