0

I am using a rooted Samsung S8+. But, Termux cannot gain root access. I tried su, sudo unsuccessfully.

When I tried installing termux-sudo, I had the error cat: sudo: no such a file or directory.

IMG: IMG:

(Tap to enlarge)

  • Are you Magisk or SuperSU? – Reddy Lutonadio Dec 14 '18 at 17:16
  • 3
    There is no sudo on Android, only /sbin/su binary exists on rooted phones. How did you root your phone? What does 'ls /sbin' command show? Did you grant root access to Termux app through Magisk or SuperSU app? Do you have SELinux enforcing or permissive? You may edit your question to add further details. Termux-sudo package isn't necessarily needed to run as root, that just a bash wrapper around su binary. – Irfan Latif Dec 14 '18 at 18:58
  • Can you please show the output of which su? – Lennoard Silva Jan 8 at 14:02
1

Are you sure that's the correct order of those commands? I have a strong feeling that it should have been sudo cat instead of cat sudo.

1

You have installed incompatible software. In your output, the line "Exec: exec format error" is the program loader complaining about an incompatible binary format.

Your experiment failed because of wrong software type.

0

First, you probably need to use su rather than sudo. Where did you copy the sudo from? It looks like some incompatible executable, maybe copied from an x64 distro (guessing).

Second, Termux overrides $PATH. You will need to provide full path or to make su available on $PATH. You might want a symlink (ln -s) of su (which might be located in /sbin/, /system/xbin or so).

-1

Instead of sudo ..Try running tsu

  • I don't think tsu comes inbuilt with Termux. Requires installation. You should mention that. – Firelord May 19 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.