Reputation: 5462
I open my terminal to the tools
directory of my sdk
directory:
/Users/myusername/Library/Android/sdk/tools
and then I run below command to open the sdk manager:
./android
the result is:
-bash: ./android: Permission denied
I also tried:
sudo ./android
but get below result:
sudo: ./android: command not found
does some one know what is the problem?
This is the result of pwd
:
/Users/myuser/Library/Android/sdk/tools
Upvotes: 0
Views: 10856
Reputation: 356
Have you tried "sudo chmod +x android" ? Chmod +x will make the binary executable chmod is a POSIX standard and you can find the man page online http://linux.die.net/man/1/chmod
Upvotes: 0
Reputation: 191701
./android: Permission denied
You need to give permission, if you want to run the command as any user, then 755
for -rwxr-xr-x
.
sudo: ./android: command not found
You are in the wrong directory.
Just put the full path.
ANDROID_HOME=/Users/myusername/Library/Android/sdk/
sudo chmod 755 $ANDROID_HOME/tools/android
Upvotes: 1
Reputation: 83527
When using the Android command-line tools, I often add a ANDROID_HOME
system variable and edit the PATH
. On a Mac, you can do this in .bashrc
in your home directory:
export ANDROID_HOME=/path/to/android/sdk
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/build-tools:$PATH
Now this only makes it easier to do things at the command line. It doesn't solve the permission issues you are having. For that, you need to use chmod
to ensure you have permission as the current user.
Upvotes: 0