Browse Source

termux-tools: use proper su search order

This mirrors the search order in the standard Android PATH, so that the
right tool is used consistently. This makes it easier for something like
Kernel Assisted Superuser to co-exist with Magisk.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
android-5
Jason A. Donenfeld 6 years ago
committed by Fredrik Fornwall
parent
commit
479b8f9828
  1. 2
      packages/termux-tools/build.sh
  2. 2
      packages/termux-tools/su

2
packages/termux-tools/build.sh

@ -1,6 +1,6 @@
TERMUX_PKG_HOMEPAGE=https://termux.com/ TERMUX_PKG_HOMEPAGE=https://termux.com/
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux" TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
TERMUX_PKG_VERSION=0.58 TERMUX_PKG_VERSION=0.59
TERMUX_PKG_PLATFORM_INDEPENDENT=yes TERMUX_PKG_PLATFORM_INDEPENDENT=yes
TERMUX_PKG_ESSENTIAL=yes TERMUX_PKG_ESSENTIAL=yes
TERMUX_PKG_DEPENDS="termux-am" TERMUX_PKG_DEPENDS="termux-am"

2
packages/termux-tools/su

@ -2,7 +2,7 @@
unset LD_LIBRARY_PATH LD_PRELOAD unset LD_LIBRARY_PATH LD_PRELOAD
for p in /system/xbin/su /system/bin/su /su/bin/su /sbin/su /magisk/.core/bin/su for p in /sbin/su /system/sbin/su /system/bin/su /system/xbin/su /su/bin/su /magisk/.core/bin/su
do do
if [ -x $p ]; then if [ -x $p ]; then
# The su tool may require programs in PATH: # The su tool may require programs in PATH:

Loading…
Cancel
Save