Browse Source

termux-tools: Search in more places for su

android-5
Fredrik Fornwall 9 years ago
parent
commit
a5421dbdf6
  1. 2
      packages/termux-tools/build.sh
  2. 14
      packages/termux-tools/su

2
packages/termux-tools/build.sh

@ -1,6 +1,6 @@
TERMUX_PKG_HOMEPAGE=http://termux.com/
TERMUX_PKG_DESCRIPTION="Some tools for Termux"
TERMUX_PKG_VERSION=0.21
TERMUX_PKG_VERSION=0.22
termux_step_make_install () {
$CXX $CFLAGS $LDFLAGS -std=c++14 -Wall -Wextra -pedantic -Werror $TERMUX_PKG_BUILDER_DIR/*.cpp -o $TERMUX_PREFIX/bin/termux-elf-cleaner

14
packages/termux-tools/su

@ -1,12 +1,16 @@
#!/bin/sh
if [ -x /system/xbin/su ]; then
# The su tool may require programs from /system/bin in path:
PATH=/system/bin:$PATH /system/xbin/su $@
else
for p in /system/xbin/su /su/bin/su
do
if [ -x $p ]; then
# The su tool may require programs
# from /system/bin in path:
PATH=/system/bin:$PATH exec $p $@
fi
done
echo "There is no su program on this device. Termux"
echo "does not supply tools for rooting, see e.g."
echo "http://www.androidcentral.com/root for"
echo "information about rooting Android."
exit 1
fi

Loading…
Cancel
Save