简书链接:原创termuxadb高级玩法结合程序执行批处理666
文章字数:176,阅读全文大约需要1分钟
进入模式有时候不太好,比如是某程序执行的,需要执行就立马结束,就需要用到-c

首先新建termux.sh adb push /data/local/tmp/
移动到/sbin
给与可执行权限.

1
2
3
4
5
#!/system/bin/sh
echo 您传入的参数是:$*
echo adb shell su -c termux.sh 进入模式
echo adb shell su -c termux.sh -c ls 通过termux.sh执行并退出.
su $(stat -c %u /data/data/com.termux) /data/data/com.termux/files/home/bin/termux-shell.sh $

下面是测试效果
可以看到执行后立马结束了
image.png
下面是直接进入模式
image.png
然后我输入类似ls init*并没有退出