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"