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
  • github.com/MrBIMC/SELinuxModeChanger
    – alecxs
    Commented Oct 23, 2021 at 7:38
  • @alecxs luckily, my SELinux mode is already permissive, but that's a good link anyway. Thanks for sharing it.
    – MountainX
    Commented Oct 23, 2021 at 22:59
  • try Termux:Boot with this script and check '/sdcard/termux.log' for debugging purposes pastebin.com/vqeWK60E
    – alecxs
    Commented Oct 24, 2021 at 7:24
  • @alecxs: good idea. Thanks. Will run that and report back. Also, I have made some progress, so I will update the question. I also need to post a new question related to github.com/topjohnwu/Magisk/blob/master/scripts/emulator.sh
    – MountainX
    Commented Oct 24, 2021 at 16:14
  • @alecxs - I updated our chat room with results. Need your suggestions on next step.
    – MountainX
    Commented Oct 24, 2021 at 16:28

0

You must log in to answer this question.

Browse other questions tagged .