The android4.0 code has been downloaded recently. The following operations are performed:
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
Create source code directory:
$ Mkdir ANDROID_SOURCE
$ Cd ANDROID_SOURCE
Get the android source code version on git
$ Repo init-u https://android.googlesource.com/platform/manifest
Download the latest version.
$ Repo init-u https://android.googlesource.com/platform/manifest-B android-4.0.3_r1
$ Repo sync
Add parameter:-jx indicates how many threads are enabled to download the source code.
According to the settings on the google official website, errors may occur during the download process and thus the Android Code cannot be downloaded. The Android code was previously managed in Linux kernel (android.git.kernel.org) and kicked out by Kernel, the Android source code is now directly managed by Google (android.googlesource.com.
When you use repo/git to download the source code
Errors found:
DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out>
On the Source Code website http://source.android.com/source/downloading.html, you can find the following information:
Using authentication
By default, access to the Android source code is anonymous. To protect theservers against excessive usage, each IP address is associated with a quota.
When sharing an IP address with other users (e.g. when accessing the sourcerepositories from beyond a NAT firewall), the quotas can trigger even forregular usage patterns (e.g. if your users sync new clients from the same IPaddress within a short period ).
In that case, it is 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 that 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 an existing client to use mandatory authentication with the followingcommand:
$ Repo init-u https://android.googlesource.com/a/platform/manifest
Log on to the https://android.googlesource.com/new-password with your own registered mailbox login, click "Allow access" on the page, 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 ~ /. Netrc file end (check the permissions of the current user. If this file does not exist, create one by yourself)
The URI is changed to the https://android.googlesource.com/a/platform/manifest ('/A' is added in the middle ").
Repo init-u https://android.googlesource.com/a/platform/manifest-B android-4.0.3_r1
Repo sync-j10
From zzobin's column