diff --git a/.gitignore b/.gitignore index f697a9d9..113b4420 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ !bin/nas-shutdown.sh !bin/stats.sh !bin/steam.sh +!bin/su.sh !.config diff --git a/bin/su.sh b/bin/su.sh new file mode 100755 index 00000000..5f580882 --- /dev/null +++ b/bin/su.sh @@ -0,0 +1,14 @@ +#!/data/data/com.termux/files/usr/bin/bash + +# My su script for my rooted Android tablet using Termux. +# +# You need to do a normal su before and then "mkdir /data/root" +# as the default $HOME for the root user is / on Android devices +# and we have no write permission for a /root there. +# +# /system/bin PATH? + +su -c "HOME=/data/root \ + PATH=/data/data/com.termux/files/usr/bin \ + SHELL=/data/data/com.termux/files/usr/bin/zsh /data/data/com.termux/files/usr/bin/zsh -l && cd /data/root" +