From 54507b81d665e8a207bbcd435a5ee4ef44b29fbd Mon Sep 17 00:00:00 2001 From: mywalk <66966897+mywalkb@users.noreply.github.com> Date: Fri, 21 Jul 2023 21:42:00 +0200 Subject: [PATCH] [cli] Support KernelSU without magisk --- magisk-loader/magisk_module/cli | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/magisk-loader/magisk_module/cli b/magisk-loader/magisk_module/cli index a5b83f7be..f4069dd65 100644 --- a/magisk-loader/magisk_module/cli +++ b/magisk-loader/magisk_module/cli @@ -1,13 +1,17 @@ #!/system/bin/sh -dex_path="$(magisk --path)/.magisk/modules" +if ! which magisk >/dev/null; then + dex_path="/data/adb/modules" +else + dex_path="$(magisk --path)/.magisk/modules" +fi if [ -d "$dex_path/riru_lsposed" ]; then - dex_path="$dex_path/riru_lsposed" + dex_path="$dex_path/riru_lsposed" elif [ -d "$dex_path/zygisk_lsposed" ]; then - dex_path="$dex_path/zygisk_lsposed" + dex_path="$dex_path/zygisk_lsposed" else - echo "No lsposed module path found" - exit 1 + echo "No lsposed module path found" + exit 1 fi dex_path="$dex_path/daemon.apk"