Original URL: http://www.cnblogs.com/zhx831/p/3550830.html
This article records i download the source code and compile the whole process, the entire process reference Android official documents
1. Download Android Source 1.1 installation Repo
$ mkdir ~/bin$ path=~/bin: $PATH $ curl Http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo
1.2 Initializing the Repo client
$ mkdir working_directory$ cd working_directory$ repo init-u https://android.googlesource.com/platform/manifest
Working_directory is the folder you use to store Android source code. Also, if you need to download the branch, use the-B option, as follows:
$ repo init-u https://android.googlesource.com/platform/manifest-b ANDROID-4.0.1_R1
1.3 Download Android Source code
$ repo Sync
After a period of waiting, the Android source code is downloaded to the local.
2. Compiling the source 2.1 initialization environment
$ source Build/envsetup.sh
2.2 Selecting the target platform and the compiled version
$ Lunch Aosp_arm-eng
2.3 Compiling
$ make-j4
You can take a rest now. Luckily, once successful, there was no mistake.
2.4 Run
$ emulator
Refs:
Http://source.android.com/source/downloading.html
Http://source.android.com/source/building-running.html
"Go" Android 4.4 source Download and compile