Skip to content

Commit

Permalink
[cli] Support KernelSU without magisk
Browse files Browse the repository at this point in the history
  • Loading branch information
mywalkb committed Jul 21, 2023
1 parent 2cfda57 commit 54507b8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions magisk-loader/magisk_module/cli
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 54507b8

Please sign in to comment.