Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I try to run the Android SDK Manager from the command line it doesn't open. Keeps giving me command not found or permission denied message like so.

osama@prometheus:/media/osama/develop/android-sdk-linux/tools$ pwd
/media/osama/develop/android-sdk-linux/tools
osama@prometheus:/media/osama/develop/android-sdk-linux/tools$ /media/osama/develop/android-sdk-linux/tools/android
bash: /media/osama/develop/android-sdk-linux/tools/android: Permission denied
osama@prometheus:/media/osama/develop/android-sdk-linux/tools$ sudo /media/osama/develop/android-sdk-linux/tools/android
sudo: /media/osama/develop/android-sdk-linux/tools/android: command not found
osama@prometheus:/media/osama/develop/android-sdk-linux/tools$ 

Am I missing something? Am i doing something wrong? Please help.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

The reason you could not run it is because the SDK was on an external drive mounted with the noexec flag active. If you run the mount command you should see the word noexec on the line of the external drive. This is a safety feature to prevent executing malicious software by accident. As a result the android binary could not have the executable bit set, hence you could not run it.

Copying it to a different disk (as you did) where you can set the executable bit with chmod +x /path/to/android is the solution.

share|improve this answer

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.