Skip to content

Commit 77f2763

Browse files
committed
Update
1 parent 66f8baa commit 77f2763

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

app/src/main/assets/home/bin/am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
if [ "$UID" != "0" ] && [ "$UID" != "1000" ] && [ "$UID" != "2000" ]; then
44
export CLASSPATH="$ETC/am.apk"
5+
if [ $(getprop ro.build.version.sdk) -ge 34 ]; then
56
chmod 0400 "$CLASSPATH"
7+
fi
68
exec /system/bin/app_process -Xnoimage-dex2oat /system/bin \
79
com.termux.termuxam.Am "$@"
810
else

app/src/main/assets/home/bin/rish

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/data/data/com.tool.tree/files/home/bin/bash
2+
DEX="$ETC"/rish_shizuku.dex
3+
4+
if [ ! -f "$DEX" ]; then
5+
echo "Cannot find $DEX, please check the tutorial in Shizuku app"
6+
exit 1
7+
fi
8+
9+
if [ $(getprop ro.build.version.sdk) -ge 34 ]; then
10+
if [ -w $DEX ]; then
11+
chmod 400 $DEX
12+
fi
13+
if [ -w $DEX ]; then
14+
echo "Cannot remove the write permission of $DEX."
15+
echo "You can copy to file to terminal app's private directory (/data/data/<package>, so that remove write permission is possible"
16+
exit 1
17+
fi
18+
fi
19+
20+
# Replace "PKG" with the application id of your terminal app
21+
[ -z "$RISH_APPLICATION_ID" ] && export RISH_APPLICATION_ID="com.tool.tree"
22+
if [ "$1" == '-c' ] && [ "$2" ]; then
23+
/system/bin/app_process -Djava.class.path="$DEX" /system/bin --nice-name=rish rikka.shizuku.shell.ShizukuShellLoader "$@" &
24+
wait
25+
else
26+
/system/bin/app_process -Djava.class.path="$DEX" /system/bin --nice-name=rish rikka.shizuku.shell.ShizukuShellLoader "$@"
27+
fi
58.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)