Recently downloaded the android4.0 code, the following actions download repo
$ mkdir ~/bin $ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo
To create a source code folder:
$ mkdir ANDROID_SOURCE
$ cd ANDROID_SOURCE
Get the Android source code version number on Git
$ repo Init-u https://android.googlesource.com/platform/manifest
We download the latest version
$ repo init-u https://android.googlesource.com/platform/manifest-b ANDROID-4.0.3_R1
$ repo Sync
Add-On:-jx x represents how many threads are opened to download the source code
According to Google's official website settings will appear in the download now when the error can not be downloaded, before the Android code is in the Linux Kernel (android.git.kernel.org) management, after being kicked out by kernel, the Android source code is now managed directly by Google (android.googlesource.com).
When downloading source code with Repo/git
An error was found:
DownloadError:android.googlesource.com: <urlopen error [Errno] Connection timed out>
At the source code site http://source.android.com/source/downloading.html can learn about:
Using Authentication
By default, access to the Android source code is anonymous. To protect theservers against excessive usage, each IP address was associated with a quota.
When sharing a IP address with other users (e.g. when accessing the sourcerepositories from beyond a NAT firewall), the Q Uotas can trigger even forregular usage patterns (e.g. if many users sync new clients from the same IPaddress within a sho RT period).
In this case, it's possible to use authenticated access, which then usesa separate quota for each user, regardless of the IP address.
The first step is to create a password fromthe password generator andto save it in ~/.netrc
according to the instructions on T Hat page.
The second step is to force authenticated access, by using the Followingmanifest URI: https://android.googlesource.com/a/platform/manifest
. Noticehow the /a/
directory prefix triggers mandatory authentication. You canconvert a existing client to use mandatory authentication with the Followingcommand:
$ repo init -u https://android.googlesource.com/a/platform/manifest
Login Https://android.googlesource.com/new-password Use your own registration email login, click on the page "Consent to visit", to get similar
Machine android.googlesource.com login git-<username>.gmail.com password <password> machine android-review.googlesource.com login git-<username>.gmail.com Password <password> Append the above information to ~/. NETRC the end of the file (check the permissions of the current user, assuming that the file is not present and create a new one), change the URI to Https://android.googlesource.com/a/platform/manifest (with "/a" in the middle). Repo init-u https://android.googlesource.com/a/platform/manifest-b android-4.0.3_r1 repo sync-j10
android4.0 Download Issues