I am using a rooted Samsung S8+. But, Termux cannot gain root access. I tried
When I tried installing termux-sudo, I had the error
cat: sudo: no such a file or directory.
(Tap to enlarge)
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.Sign up to join this community
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
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.
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).