With a new version of Ubuntu comes an update to my world-famous guide for setting up a build environment to compile Android ROMs. 14.04 Trusty Tahr is the next Long Term Support edition of the popular Linux distro. The aim of this guide is to simplify the configuration process for you.
Follow the directions step-by-step. All you have to do is copy and paste the code sections in order and you will be up and running in no time!
This guide applies to all variations of Ubuntu 14.04 LTS Trusty Tahr 64 bit. Do not use the 32 Bit version.
Also, PAY CLOSE ATTENTION when to use "sudo" and when to not. It can make things funky if you do something as root that you shouldn't.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
Ready to begin? Ok.
1) Unless it's a completely fresh Ubuntu installation, many of you may have the wrong version of Java installed. Let's fix that first.
The command below makes sure you're starting with a clean slate. Copy and paste it into a terminal (command prompt) window:
If necessary, follow the on-screen instructions to remove any previous versions. Otherwise, move on to the next step.
It's time to install Java, one of the core pieces for compiling Android ROMs. Depending on which version of Android you are building, you will need the corresponding version of the Java Development Kit.
*** IF YOU ARE BUILDING ANDROID GINGERBREAD THRU KITKAT (2.3 - 4.4.x) USE THESE INSTRUCTIONS FOR JDK 6***
2) Copy and paste the following into the terminal:
11) In the terminal, navigate to where you would like to download the Android source code. The commands below will make it in your home folder, but if you have limited space you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external is basically unusable. Here we go:
I've build android 4.2 and 4.4 using openjdk 1.7, without any changes, using ubuntu 13.10 (some time ago in aosp there has been added patches which fixes build under java 7, of course it's not for all android versions).
I appreciate a detailed, step-by-step guide like this. In my experience here, I've found that far too many arrogant developers hold the opinion that since they had to find things out the hard way, everyone else should have to as well. Finding developers that actually want to help people out, rather than snub them with snot-nosed attitudes, is always refreshing, so thanks to the OP for the guide!
MARTIN'S ANDROID DEVICES
Samsung Galaxy S3 (AT&T) running Quantum v5
Google Nexus 10 running CM 11
Asus Eee Pad Transformer TF101
Motorola Atrix 4G
Cell Phone Unlocking is legal again!! That and much … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?