First, refer
Download Android 4.0.1 source code in Ubuntu 13.04
Some of the difficulties I encountered are solved here. For more information, see
Ubuntu, which was previously installed on an XP hard disk, crashed while downloading the Android 4.0 source code. The login cycle cannot solve this problem. Therefore, Ubuntu is installed on a USB flash drive.
Install Ubuntu 13.04 on a USB flash drive
Ubuntu installation on Hard Disk
We do not recommend using virtual machines for Ubuntu installation. We recommend that you install the SDK on a single system.
Download source code:
First install git
Sudo apt-get install git-core
Create a folder BIN in the HOME directory to store the repo.
Mkdir bin
Cd bin
Curl http://git-repo.googlecode.com/files/repo-1.12> ~ /Bin/repo
Add permissions to repo
Chmod a + x repo
Add Environment
PATH = $ PATH :~ /Bin
Create a folder to store source code
Mkdir ~ /WorkAndroid
Cd ~ /WorkAndroid
This step is important.
Log on to https://android.googlesource.com/new-passwordin a browser and use the gmailaccount number "Logon;
Click "Allow access" on the webpage to get a similar result:
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 two rows ~ /. The End Of The netrc file. (If you have never created this file in your linux system, create the. netrc file in the home directory and add the above information to the new file ),
To https://android.googlesource.com/a/platform/manifest.
Because access is basically anonymous, in order to prevent excessive connections, the number of connections to the same IP address is limited. Use a gmail account for authentication.
This problem is frequently encountered when downloading from a company network or using a virtual machine.
Repo init-u https://android.googlesource.com/platform/manifest-B android-4.0.3_r1
If
Fatal: unable to auto-detect email address
Enter your email address on the terminal.
Git config-global user. email "you@example.com"
Git config -- global user. name "Your Name"
Just like this
Now your Initialization is successful. This step is recommended before repo sync.
Open. repo/manifest. xml. Find the following section:
<Remote name = "aosp"
Fetch = "..."/>
Modify
<Remote name = "aosp"
Fetch = "git: // Android.git.linaro.org/"/>
I believe I have done this step to download it quickly and never report errors again.
If you are prompted that there is no link to this address, you can try this:
<Remote name = "aosp"
Fetch = "https://android.googlesource.com/"/>
OK, find a time to start
Repo sync
Right
Pay for a picture I'm downloading
Sharing
For compilation, see Ubuntu 13.04 compiling Android 4.0.