Mobile/Fennec/Android OtherBuildEnvs
Jump to navigation
Jump to search
Ubuntu
Quick Script
sudo add-apt-repository ppa:ferramroberto/java sudo apt-get update sudo apt-get install sun-java6-jdk mercurial ccache sudo apt-get build-dep firefox wget http://dl.google.com/android/ndk/android-ndk-r6-linux-x86.tar.bz2 tar -xjf android-ndk-r6-linux-x86.tar.bz2 wget http://dl.google.com/android/android-sdk_r12-linux_x86.tgz tar -xzf android-sdk_r12-linux_x86.tgz # go get lunch, this will take a while ./android-sdk-linux_x86/tools/android update sdk -u ./android-sdk-linux_x86/tools/android update adb
Explained
Install Java
First install the Sun Java jdk6, which the Android SDK depends on If you're on Ubuntu 11.04, you'll need to use an addtional repo (ppa) as its not available in the partners repo yet. Others report success using the Maverick partners repo to get it.
sudo add-apt-repository ppa:ferramroberto/java sudo apt-get update sudo apt-get install sun-java6-jdk
Install Gecko Requirements
Then install the usual stuff needed for a firefox build, you probably already have it
sudo apt-get install mercurial ccache sudo apt-get build-dep firefox
Install Android NDK
Download and extract the NDK. NDK revs 4, 5 and 6 have been tested and confirmed to work.
wget http://dl.google.com/android/ndk/android-ndk-r6-linux-x86.tar.bz2 tar -xjf android-ndk-r6-linux-x86.tar.bz2
Install Android SDK
You should just install the latest sdk, we set the API level in our manifest files. The sdk download will take a while, make sure you have a decent internet connection and go get coffee, or maybe lunch.
wget http://dl.google.com/android/android-sdk_r12-linux_x86.tgz tar -xzf android-sdk_r12-linux_x86.tgz ./android-sdk-linux_x86/tools/android update sdk -u ./android-sdk-linux_x86/tools/android update adb