Latest Magisk binds SU binaries under /data/data/<app>/files/usr/bin/su
https://github.com/cswl/tsu/blob/5543412247ec8209e4ce776db2c7871f4fe3841b/shell/tsu.sh#L261
I know that after five years without updates to the codebase, it is probably abandoned. However, the Termux package manager still points to the repo, and I suppose there are still people like me who need a smooth transition between the su environment and Termux defaults. If you allow, I would like to open a new pull request with a few updates.
Thanks.
261号线 在5543412
SU_BINARY_SEARCH=(“/system/xbin/su” “/system/bin/su” “/su/bin/su”) 我知道,在五年没有更新代码库之后,它很可能被放弃了。但是,Termux 包管理器仍然指向存储库,我想仍然有像我这样的人需要在环境和 Termux 默认值之间平滑过渡。如果您允许,我想打开一个包含一些更新的新拉取请求。
su谢谢。
Note that I did not use Markdown syntax. The bash comment "#" is recognized as uppercase in Markdown syntax. Please pay attention to the difference.
Tsu has not been maintained for 5 years. The latest magisk/alpha moved the su file to /debug_ramdisk / su Instead of the old /system/bin/su Therefore, the current tsu works abnormally on the latest magisk. If you still want to use it, please refer to the source code. And find this part SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su")
On some systems with other root methods /sbin is inacessible.
if [[ -x "/sbin" ]]; then SU_BINARY_SEARCH+=("/sbin/su" "/sbin/bin/su") else SKIP_SBIN=1 fi
You can modify it to SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su" "/debug_ramdisk/su" "/sbin/su")
On some systems with other root methods /sbin is inacessible.
if [[ -x "/sbin" ]]; then SU_BINARY_SEARCH+=("/sbin/su" "/sbin/bin/su" "/sbin/.magisk/su") else SKIP_SBIN=1 fi
Additional paths Magisk may use
SU_BINARY_SEARCH+=("/data/adb/magisk/su" "/dev/.magisk/su")
This way, tsu can be used normally on the latest Magisk.
But what confuses me is that when I use tsu to enter the root space, There will be two very troublesome error messages: bash: cannot set terminal process group (4528): Inappropriate ioctl for device bash: no job control in this shell I have been studying it for a long time, but I still can't solve it. I don't know what caused it either. If anyone can solve it, please reply to me. Thank you for your efforts. I will post my modified tsu file here.
最新的termux中,tsu执行失败,原来问题在这里,这个bin文件的搜索路径可以自定义吗,或者有什么环境变量可以配置吗