Merge pull request #461 from 3a06fa5cf14d569c/main

Better ways to check zygisk
This commit is contained in:
Marcos 2024-10-26 18:01:19 +02:00 committed by GitHub
commit 290c5b442c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,11 +6,11 @@ if ! $BOOTMODE; then
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."
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