termux / termux-tools

Scripts and small programs that are packaged into termux's termux-tools package
GNU General Public License v3.0
280 stars 60 forks source link

termux-tools: Add /debug_ramdisk to PATH #67

Closed HuskyDG closed 8 months ago

HuskyDG commented 8 months ago

Magisk now uses /sbin or /debug_ramdisk for tmpfs Add /debug_ramdisk to PATH so that magisk su can be executed even it's not magic mounted to /system/bin

Michael-OBask commented 8 months ago

Last termux-tools update broke rooting using su (solved) #68

fifth line in script /data/data/com.termux/files/usr/bin/su

for p in /debug_ramdisk/su sbin/su /system/sbin/su /system/bin/su /system/xbin/su /su/bin/su /magisk/.core/bin/su .......................................................^ slash is missing at the beginning of '/sbin/su' !

happy new year 2024 HuskyDG :-)

HuskyDG commented 8 months ago

@Michael-OBask there is new line so it won't break

2096779623 commented 8 months ago
--- a   2024-01-03 17:47:28.617676847 +0800
+++ b   2024-01-03 17:47:38.453676844 +0800
@@ -1 +1 @@
-for p in /debug_ramdisk/su sbin/su /system/sbin/su /system/bin/su /system/xbin/su /su/bin/su /magisk/.core/bin/su
+for p in /debug_ramdisk/su /sbin/su /system/sbin/su /system/bin/su /system/xbin/su /su/bin/su /magisk/.core/bin/su

Fixed .

Michael-OBask commented 8 months ago

The typo is still there in termux-tools 1.40.3

agnostic-apollo commented 8 months ago

It's fixed in 1.40.4

https://github.com/termux/termux-tools/commit/fb7981ad0bd84a3580d398204f2bd08f5e195c95

2096779623 commented 8 months ago

Does sudo work properly?