tsu icon indicating copy to clipboard operation
tsu copied to clipboard

Magisk su was moved ? - No superuser binary detected

Open bugith opened this issue 8 months ago • 11 comments

Android15, rooted recently upgraded to android 20250401 security patch and Magisk 28103/28104

~ which su
/data/data/com.termux/files/usr/bin/su

~ su
:/data/data/com.termux/files/home # which su
/debug_ramdisk/su
...# find / -name su | grep "/su"
...
/product/bin/su
/debug_ramdisk/su
/data_mirror/data_ce/null/0/com.termux/.......
/data/data/com.termux/...
/data/user/0/com.termux/...

I had to tweak $PREFIX/usr/bin/tsu script, adding the 2 additional places were I found the real su: SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su" "/debug_ramdisk/su" "/product/bin/su")

Then it worked

[EDIT]: to retrieve all previous behaviour I had to revoke and/or grand back files (pictures, Music...) access permissions from within Android Settings / Applications / Permissions for Termux, as stated all in bottom in https://wiki.termux.com/wiki/Termux-setup-storage

bugith avatar May 01 '25 11:05 bugith

I had to tweak $PREFIX/usr/bin/tsu script, adding the 2 additional places were I found the real su: SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su" "/debug_ramdisk/su" "/product/bin/su")

Then it worked

Do you have a modified tsu file that works on magisk 29? Please upload

alpha-t12 avatar May 14 '25 15:05 alpha-t12

No I did not yet tried magisk 29 so I don't even know if they changed the binary location/partitions. Maybe just using my way of searching su binary then tweak the tsu script accordingly will hopefully work for you.

bugith avatar May 16 '25 10:05 bugith

I'm using Magisk v29.0

I can't use tsu because it can't find su binary. After I modified the tsu script like this:

SU_BINARY_SEARCH=("/debug_ramsiak/su" "/system/product/bin/su")

I can use tsu now, but there's still a little issue.

~ $ tsu
bash: cannot set terminal process group (13254): Inappropriate ioctl for device
bash: no job control in this shell
.../files/home # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
.../files/home #

BinTianqi avatar May 17 '25 11:05 BinTianqi

I'm using Magisk v29.0

I can't use tsu because it can't find su binary. After I modified the tsu script like this:

SU_BINARY_SEARCH=("/debug_ramsiak/su" "/system/product/bin/su")

I can use tsu now, but there's still a little issue.

~ $ tsu
bash: cannot set terminal process group (13254): Inappropriate ioctl for device
bash: no job control in this shell
.../files/home # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
.../files/home #

I have same issue, remove tsu and install sudo package The new version of sudo works fine The creator of tsu hasn't updated it in five years, so I doubt they'll update it.

alpha-t12 avatar May 18 '25 03:05 alpha-t12

I have same issue, remove tsu and install sudo package The new version of sudo works fine The creator of tsu hasn't updated it in five years, so I doubt they'll update it.

sudo package works, but It doesn't contain an interactive shell

BinTianqi avatar May 18 '25 03:05 BinTianqi

I have same issue, remove tsu and install sudo package The new version of sudo works fine The creator of tsu hasn't updated it in five years, so I doubt they'll update it.

sudo package works, but It doesn't contain an interactive shell

I don't understand what you mean, but sudo package works fine even with zsh sudo -S zsh

alpha-t12 avatar May 18 '25 04:05 alpha-t12

I forgot that sudo bash can launch an interactive shell like tsu.

BinTianqi avatar May 18 '25 08:05 BinTianqi

bash: cannot set terminal process group (13254): Inappropriate ioctl for device bash: no job control in this shell .../files/home # id uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0 .../files/home #

Go to line 325 and add su_args+=("-i") right above su_args+=("-c")

See: /debug_ramdisk/su --help [...] -i, --interactive Force pseudo-terminal allocation when using -c

DaleBCooper avatar May 26 '25 14:05 DaleBCooper

I had to tweak $PREFIX/usr/bin/tsu script, adding the 2 additional places were I found the real su: SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su" "/debug_ramdisk/su" "/product/bin/su")

Great. This works with magisk 29 and android 14 for me.

9996b6999 avatar Jun 22 '25 22:06 9996b6999

I'm using Magisk v29.0

I can't use tsu because it can't find su binary. After I modified the tsu script like this:

SU_BINARY_SEARCH=("/debug_ramsiak/su" "/system/product/bin/su") I can use tsu now, but there's still a little issue.

~ $ tsu
bash: cannot set terminal process group (13254): Inappropriate ioctl for device

The same!! Android 14 and Magisk 29.

$ tsu bash: cannot set terminal process group (18009): Inappropriate ioctl for device bash: no job control in this shell .../files/home # .../files/home # whoami root .../files/home # mc works

But the rest is working now.

9996b6999 avatar Jun 22 '25 22:06 9996b6999

You should read my comment above where I've written how to fix this.

DaleBCooper avatar Jun 22 '25 22:06 DaleBCooper