Every time I create a new remote machine running Linux to be used as a source automation server as part of the Continues Integration process, I have to struggle with the Android SDK installation over again and again to setup it correctly.

So I made a bash script that simplifies the process to make easy to setup and update Android SDK on Linux

The script by default will update APT and install Java (OpenJdk-8) if its not installed then will proceed with the basic Android SDK setup, also by default it will accept the Android SDK Licenses for you.

You can find the script here on Github AutoFramer/android_sdk_setup.sh.

The script offers some options to setup, either you install full Android SDK or Basic one, or you can just update the existing SDK.

To run the script you can use:

This command will download the script from github and execute it.

<arguments> can have

--full #setup all packages

--basic #setup most common packages

--none #skip sdk installation

--update #update the sdk if exists

--no-java #skip java installation

--no-apt #skip apt update

for example to you can install Java and Full SDK using this command:

$ bash android_sdk_setup.sh --full --update

this command will install the SDK if it doesn’t exists, also it will update if its already installed.

If you notice theres a missing package you need you can download the file and add the required package to the list packages in the script (either full or basic)