參考資訊:
https://github.com/termux/termux-app/issues/77
步驟如下:
$ adb shell $ su # mount -o remount,rw / # vi /system/bin/termux #!/system/bin/sh export PREFIX='/data/data/com.termux/files/usr' export HOME='/data/data/com.termux/files/home' export LD_LIBRARY_PATH='/data/data/com.termux/files/usr/lib' export PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:$PATH" export LANG='en_US.UTF-8' export SHELL='/data/data/com.termux/files/usr/bin/bash' cd "$HOME" exec "$SHELL" -l # chmod a+x /system/bin/termux # mount -o remount,ro /
從ADB Shell執行Termux
$ adb shell 127|Titan:/ $ su 127|Titan:/ # termux ~ #