1

I'm attempting to execute this command in a Termux:Boot script.

 exec su --mount-master -c "LD_LIBRARY_PATH=$LD_LIBRARY_PATH HOME=$HOME PATH=$PATH:$HOME/bin $0"

I get this error:

: /data/data/com.termux/files/usr/bin/su: \
/data/data/com.termux/files/usr/bin/sh: bad interpreter: Permission denied

However, I can execute the command directly (without the exec) on the command line without any errors and I get the root prompt as expected.

The command comes from https://android.stackexchange.com/a/225612/12444

#!/data/data/com.termux/files/usr/bin/bash -e

[ $(id -u) -eq 0 ] || exec su --mount-master -c "LD_LIBRARY_PATH=$LD_LIBRARY_PATH HOME=$HOME PATH=$PATH:$HOME/bin $0"

Also, as part of trying to get that entire script to work on my device, I am trying this in Termux:

$ tsu
# rclone -v mount GDrive: /mnt/runtime/write/emulated/0/GDrive --gid 9997 --dir-perms 0771 --file-perms 0660 --umask=0 --allow-other

This gives the error:

# bash: /data/data/com.termux/files/usr/bin/rclone: Permission denied

The permissions are:

-rwxr-xr-x 1 u0_a212 u0_a212 62257128 Oct 21 16:57 /data/data/com.termux/files/usr/bin/rclone

Any suggestions?

5

0

You must log in to answer this question.

Browse other questions tagged .