Today finally successfully downloaded from the Google official online Android source code. In the middle of a long time, finally got something to gain
1. Download repo
Curl https://Storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
If you do not have curl installed under Ubuntu, you can use the following command to download
sudo Install Curl
Then set executable permissions to Repo
chmod a+x ~/bin/repo
2.repo Init
To the path where you store the source code
Refer to the information on the Internet, said the following methods can be
Repo init-u https://android.googlesource.com/platform/manifest-b android-5.1.1_r9
However, I have not been successful, said the connection is not on. I don't know if it's about FQ.
Toss for a while, later on the Internet saw another method, the implementation of success.
1) Modify the ~/bin/repo file and set the Repo_url as follows :
' Git://aosp.tuna.tsinghua.edu.cn/android/git-repo '
2) Initialize Repo
Repo init-u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest-b android-5.1.1_r4
3. Then we can get the code through Repo sync.
Sync
Android-from the official website of the source (Ubuntu)