Skip to content

Instantly share code, notes, and snippets.

@leviwilson
Created June 2, 2012 14:49
Show Gist options
  • Save leviwilson/2858703 to your computer and use it in GitHub Desktop.
Save leviwilson/2858703 to your computer and use it in GitHub Desktop.
Ubuntu Android, Java and Maven Shell Script
# update packages
sudo apt-get update
# Install git
sudo apt-get install git-core
# Install jdk
sudo apt-get install openjdk-6-jdk
# Setup Maven
wget http://apache.cs.utah.edu/maven/binaries/apache-maven-3.0.4-bin.tar.gz
tar -zxf apache-maven-3.0.4-bin.tar.gz
sudo mv apache-maven-3.0.4 /usr/local/apache-maven
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
export M2_HOME=/usr/local/apache-maven
export MAVEN_HOME=${M2_HOME}
export M2=${MAVEN_HOME}/bin
export PATH=${PATH}:${M2}
# Install ia32-libs (for emulator, adb, etc.)
sudo apt-get install ia32-libs
# Install android
wget http://dl.google.com/android/android-sdk_r18-linux.tgz
tar -zxf android-sdk_r18-linux.tgz
export ANDROID_HOME=~/android-sdk-linux
export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
android update sdk --filter 1,2,4,9 --no-ui --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment