[Bug]: subprocess.Popen not working to run scripts that call /usr/bin/env
in the shebang line on Android 14
#22666
Labels
/usr/bin/env
in the shebang line on Android 14
#22666
Problem description
I'm trying out some build scripts on Android 14 AArch64 and seeing execution issues. Here's a reduced example:
foo.bash
test.py
Running
source foo.bash
works fine, but the commands below fail:What steps will reproduce the bug?
chmod 700 foo.bash
python test.py
What is the expected behavior?
The build scripts that do this were working fine on Android 13 AArch64. I'm working around it for now by modifying the failing build scripts, as the bash script works through Python if I change the first line to
#!/data/data/com.termux/files/usr/bin/env bash
.I thought Termux intercepts such scripts and swaps out the right Termux-prefixed path: is this broken in Android 14?
System information
Termux Variables: TERMUX_APP_PACKAGE_MANAGER=apt TERMUX_APP__APK_RELEASE=F_DROID TERMUX_APP__APP_VERSION_CODE=1020 TERMUX_APP__APP_VERSION_NAME=0.119.0-beta.1 TERMUX_APP__DATA_DIR=/data/user/0/com.termux TERMUX_APP__IS_DEBUGGABLE_BUILD=false TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false TERMUX_APP__PACKAGE_NAME=com.termux TERMUX_APP__TARGET_SDK=28 TERMUX_VERSION=0.119.0-beta.1 TERMUX__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c55,c257,c512,c768 TERMUX__SE_INFO=default:targetSdkVersion=28:complete TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c55,c257,c512,c768 TERMUX__USER_ID=0 Packages CPU architecture: aarch64 Updatable packages: All packages up to date termux-tools version: 1.44.6 Android version: 14 Kernel build information: Linux localhost 5.15.123-android13-8 #1 SMP PREEMPT Mon Aug 19 2024 aarch64 Android LD Variables: LD_LIBRARY_PATH= LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
The text was updated successfully, but these errors were encountered: