1, setup the bin directory in your home directory and include in your path,
$ mkdir ~/bin$ Path=~/bin: $PATH
2, download the Repo tool and make sure it is executable
$ Curl Https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo$ chmod a+x ~/bin/repo
3, make the working directory and download the branch,
$ mkdir working_directory$ CD working_directory
$ repo init-u https://android.googlesource.com/platform/manifest-b android-4.4.3_r1.1
$ repo Sync
This would take huge amount of time and occupy your space as large as 30G, I just left it there overnight running.
4, make and compile the source code.
Make-j2
It'll take huge amount of the building.
Problem encountered, open JDK cannot be supported, needs Oracle JDK, and Android build error due to incorrect Java version
sudo apt-get purge openjdk*
sudo add-apt-repository Ppa:webupd8team/java
sudo apt-get update
sudo apt-get install Oracle-java6-installer
You can use the This command to choose different version of Java JDK to use,
sudo update-alternatives--config java
5, start the emulator.
Emulator
Problem encountered, cannot find the emulator, needs to build up the environment again,
. Build/envsetup.shset_stuff_for_environment
Ubuntu Android System Setup (2)