Added bin/su.sh

This commit is contained in:
Johannes Findeisen 2025-07-02 20:28:23 +02:00
commit a97c892c9e
2 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View file

@ -16,6 +16,7 @@
!bin/nas-shutdown.sh
!bin/stats.sh
!bin/steam.sh
!bin/su.sh
!.config

14
bin/su.sh Executable file
View file

@ -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"