Question: I'm installing and configuring the Android SDK. I follow this guide:
<https://www.digitalocean.com/community/tutorials/how-to-build-android-apps-with-jenkins>

First of all I did not found the /etc/profile.d/android.sh. That file did nog exist. But I had to add env-variables. So I made the android.sh manually.
I hope this is the right way to do this.

Later on came my real problem, I want to do this command:

```
android update sdk --no-ui

```

But I don't have the permissions to do this. Even not when I'm using sudo:

```
ubuntu@ip-172-31-33-139:/opt/android-sdk-linux$ android update sdk --no-ui
-bash: /opt/android-sdk-linux/tools/android: Permission denied

```

This are the permissions on my folder.

```
drwxr-xr-x  3 root   root 4096 Apr 27 02:17 .
drwxr-xr-x 23 root   root 4096 Apr 17 08:36 ..
drwxrwxr-x  5 144773 5000 4096 Feb 27 22:04 android-sdk-linux

```

Will it be enough to change the permissions? I don't have experience with the 1447733 - 5000.

Answer: 
Even with sudo it did not work but I found a solution:
I had to change my permission with `sudo chmod -R 777 /opt/android-sdk-linux`
After that I changed it back so my Jenkins could use it
Do you use root account to execute Android command?
I suggest you use root account to do it.