Skip to content

Instantly share code, notes, and snippets.

@gion
Last active September 22, 2015 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gion/3706019dbf508b0c3a1b to your computer and use it in GitHub Desktop.
Save gion/3706019dbf508b0c3a1b to your computer and use it in GitHub Desktop.
#Download Android SDK from Google and unzip it
curl --location http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -x -z -C $HOME
export ANDROID_HOME=$HOME/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
#Thanks to https://github.com/makinacorpus/android-archetypes/wiki/Getting-started:-Configure-your-environment for the command lines
#While loop is for auto-accept licence terms (press y every 1 sec)
#Install build tools
( sleep 1 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-21.1.2
#Now we want at least two SDK to test our build
#Install max SDK (API 22: should be your target SDK!)
( sleep 1 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --filter android-22,sys-img-armeabi-v7a-android-22,addon-google_apis-google-22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment