Download Android source code @ Ubuntu 12.04 Wednesday 16 hours 23 minutes 21 seconds reference: 1. Google: http://source.android.com/source/downloading.html#initializing-a-repo-client2. GitHub download Android source code: http://www.cnblogs.com/akira90/archive/2013/03/08/2950631.html android4.2 source code download process: Ghost operation process is as follows:
$ mkdir ~/bin$ PATH=~/bin:$PATH$ sudo apt-get install curl$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo$ chmod a+x ~/bin/repo$ mkdir WORKING_DIRECTORY$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest
# Obtain the latest sourcecode
Xxxxxxxxxxx $ repo init-u https://android.googlesource.com/platform/manifest-B android-4.2.2_r1.2
Confirm the information: If you want to change the information, use repo -- config -?? (Forgot)
**************************************** **********************
Your name [region]: Region
Your email [Response @ response-UBT. (none)]: XXXXXXXXX@gmail.com
Your identity is: Your <XXXXXXXX@gmail.com>
Is this correct [Y/n]? Y
**************************************** **********************
Download:
$ repo sync
######################################## #######################
Execution output at the beginning:
Get https://gerrit.googlesource.com/git-repo
It won't stop.
I found that I want to change the hosts, so:
Ping gerrit.googlesource.com
The obtained IP address is 173.194.72.82.
######################################## #######################
$ sudo cp /etc/hosts /etc/hosts.bak$ sudo gedit /etc/hosts
Added:
#*************************************** ***********************
173.194.72.82 gerrit.googlesource.com
173.194.72.82 www.googlesource.com
173.194.72.82 android.googlesource.com
203.208.46.172 cache.pack.google.com
#59.24.3.173 cache.pack.google.com
#*************************************** **********************
Execute again
$ repo sync
Smooth all the way!
Download started on Wednesday, June 19, 2013