termux-tools: Unset LD_PRELOAD when calling system

Some 64-bit systems seems to have 32-bit binaries in /system/bin,
so unset LD_PRELOAD before calling them. See #551.
This commit is contained in:
Fredrik Fornwall 2018-01-24 17:20:25 +01:00
parent 78b9b0e7a1
commit 3fc4aa5920
1 changed files with 2 additions and 2 deletions

View File

@ -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.49 TERMUX_PKG_VERSION=0.50
TERMUX_PKG_PLATFORM_INDEPENDENT=yes TERMUX_PKG_PLATFORM_INDEPENDENT=yes
TERMUX_PKG_CONFFILES="etc/motd" TERMUX_PKG_CONFFILES="etc/motd"
@ -10,7 +10,7 @@ termux_step_make_install () {
for tool in am df getprop logcat ping ping6 ip pm settings; do for tool in am df getprop logcat ping ping6 ip pm settings; do
WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool
echo '#!/bin/sh' > $WRAPPER_FILE echo '#!/bin/sh' > $WRAPPER_FILE
echo 'unset LD_LIBRARY_PATH' >> $WRAPPER_FILE echo 'unset LD_LIBRARY_PATH LD_PRELOAD' >> $WRAPPER_FILE
# Some tools require having /system/bin/app_process in the PATH, # Some tools require having /system/bin/app_process in the PATH,
# at least am&pm on a Nexus 6p running Android 6.0: # at least am&pm on a Nexus 6p running Android 6.0:
echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE