From a97c892c9e8ae53dd59e0b06b5513afb0ccef2f9 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Wed, 2 Jul 2025 20:28:23 +0200 Subject: [PATCH] Added bin/su.sh --- .gitignore | 1 + bin/su.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 bin/su.sh 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" +