1. install required tools
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------
Sudo apt-Get install Git-core GnuPG sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------
2. Configure the Java environment
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------
Sudo Update-Java-alternatives-s Java-6-sun
Add/usr/lib/JVM/Java-6-sun to the top line of sudo VI/etc/JVM.
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------
3. Obtain the repo script.Code
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------
Cd ~; Mkdir bin; export Path = ~ /Bin: $ path; curl http://android.git.kernel.org/repo> ~ /Bin/repo; chmod A + x ~ /Bin/Repo
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------
4. create a project directory and capture the android Source Code
export --------------------------------
mkdir Android
Cd Android
repo init- U git: // android.git.kernel.org/platform/manifest.git
repo sync