Download Android Source code:
1. Install Git and curl:
sudo apt-get install Git-core
sudo apt-get install Git-core curl
2. Download Repo
mkdir ~/bin
Path=~/bin: $PATH
Curl Https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
If the above URL is not accessible, you can use the following:
Curl Https://storage-googleapis.lug.ustc.edu.cn/git
-repo-downloads/repo > ~/bin/repo
3. Create a working directory
mkdir Workspace
CD Workspace
4. Initializing the Warehouse
Repo Init-u git://mirrors.ustc.edu.cn/aosp/platform/manifest
The image source provided by Tsinghua University
Repo Init-u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
Mirror source of China University of Science and Technology
Repo Init-u git://mirrors.ustc.edu.cn/aosp/platform/manifest
If you are prompted that you cannot connect to gerrit.googlesource.com
Edit the ~/bin/repo file and replace the Repo_url line with the following: Repo_url= ' Https://gerrit-googlesource.lug.ustc.edu.cn/git-repo '
5. Download the Android version of the source code
Repo Init-u git://mirrors.ustc.edu.cn/aosp/platform/manifest-b android-4.0.4_r2.1
6. Synchronizing the source tree
Repo Sync
Original digest from repo download domestic link Android source code
Android source code compilation--from then on to the Liunx (iii)