Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I am trying to run an executable from the android terminal with root permissions, but I am constantly receiving the following error:

[ExecutableName] : permission denied

I am confirmed to be loged in as root. I see the # sign before my prompt and I can run root commands such as chmod. I saw that the android shell guide says

"The built-in shell has very limited error handling. When you type a command name >incorrectly it will say "permission denied", even though the real problem is that it >couldn't find the command:"

Does anyone know how to get more information on this "permission denied" error?

share|improve this question
    
Can you run ls -l from the directory the executable is in and post that? –  eldarerathis Dec 11 '11 at 17:23
    
Here is what I ran, I just really want more info on what happens when i run it. ---xrwxr-x 1 system sdcard_r 76 Oct 3 2007 doukutsu –  Bubbleware Technology Dec 11 '11 at 18:26
2  
Hm, the sdcard_r is interesting. Is the binary on your SD card? I know some devices (but possibly not all) simply won't let you run an executable if it's on the external storage. You could try moving it to /data/local or somewhere similar and see if that helps. I don't know that there's a way to simply get more info from the shell as to why you're getting permission denied, though. –  eldarerathis Dec 11 '11 at 18:48
    
Do you have SuperUser installed? What does the log say? –  Matthew Read Dec 11 '11 at 19:08
    
@MatthewRead It says "terminal emulator allowed" –  Bubbleware Technology Dec 11 '11 at 21:08

1 Answer 1

As eldarerathis already mentioned: On many (if not most) devices supporting an SD card, this card is mounted with the noexec option -- which means as the name suggests: "no exec from here", i.e. you cannot execute anything from the sdcard.

Again, one solution was already mentioned by eldarerathis: Try a different storage. You've got the power, your device is rooted.

A second approach would be to re-mount the sdcard without the noexec option. But there's a good reason why noexec is used here; it at least offers an additional level of security. So before using this approach, you should research a bit whether it might trigger unwanted side-effects.

share|improve this answer
    
+1 from me - that's the sole reason why SDcards have the executable bit blocked at the filesystem level, to prevent malicious apps wreaking havoc from another place outside of the ROM i.e. SDcard! –  t0mm13b Aug 7 '12 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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