Skip to content

Instantly share code, notes, and snippets.

@hayeshaugen
Created May 27, 2011 01:07
Show Gist options
  • Save hayeshaugen/994453 to your computer and use it in GitHub Desktop.
Save hayeshaugen/994453 to your computer and use it in GitHub Desktop.
Android SDK headless install for Linux Jenkins CI
# sudo su -
# apt-get install openjdk-6-jdk
# apt-get install ant1.8
Source control, in this case svn:
# apt-get install subversion
Install Jenkins
# wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
# echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list
# aptitude update
# aptitude install jenkins
Android sdk
# mkdir /android
# cd /android
# wget http://dl.google.com/android/android-sdk_r16-linux.tgz
# tar xzvf android-sdk_r16-linux.tgz
[make sure jenkins has permissions for this directory]
[edit path in etc/bash.bashrc to include /android/android-sdk-linux/tools]
# /android/android-sdk-linux/tools/android update sdk --no-ui
[this will download all supported sdks which is probably overkill even for a build machine]
[to limit which sdks get downloaded use a filter as explained by help: android -h update]
Grab the project
# svn co http://server/path
maybe update projects
# android update project -p [path to project]
@smarek
Copy link

smarek commented Jun 20, 2013

I'd suggest using /opt path as it is meaningfull to do it like that, and permissions setting depends on what will be using android sdk. Using android:android for sdk folder, adding jenkins to android group and adding tools and platform-tools to PATH only in android user, not to pollute global PATH or bring security risk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment