Android Source download process (record, leave a souvenir)

Source: Internet
Author: User

Pre-preparation toolsUSB flash drive installs Ubuntu http://www.linuxidc.com/Linux/2012-11/74695.htm Http://6.xp510.com:801/xp2011/UltraISO.zip

1. Install git

sudo apt-get install Git-core


2. Install Curl

sudo apt-get install Git-core curl


3. Create a storage directory

mkdir ~/bin Creating a directory Repo storage directory

mkdir ~/android Creating a Directory source code store directory


4.repo get (this address of the repo verify that you can use it without modification), download the repo, and remember to give him execute permission, finally remember to add a global path, this way in any directory he used repo command

Curl Http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo > ~/bin/repo

chmod a+x ~/bin/repo

Export path= $PATH: ~/bin


5. Because Google supports anonymous download, but to prevent the IP connection process frequently, you need to login to Google account to obtain information about your account password, as follows

Open the following website: Https://android.googlesource.com/new-password (login required)

You will then see information similar to the following


How to operate also has the detailed explanation, probably next, is opens the ~/.netrc file, the information which I first in the paragraph, saves in the ~/.netrc file,

And then set chmod ~/.netrc, so that the file has read and write permissions on it, my account verification information, affixed to everyone, specific can use, look at the fate of the choice, (do not login to their own account to get once)

Machine android.googlesource.com login git-dy145xp.gmail.com password 1/HPJMXSN0LICKDBROI3V44SJ39JGYNJGFRM0CJQUFVXQ

Machine android-review.googlesource.com Login git-dy145xp.gmail.com password 1/ Hpjmxsn0lickdbroi3v44sj39jgynjgfrm0cjqufvxq


6. Initialize the relevant information, according to the online professional statement is to construct the local warehouse, is not very familiar with git, hey

CD ~/android

Repo init-u https://android.googlesource.com/platform/manifest-b android-4.2.2_r1.2 (I want to download the source code of 4.2.2, So the related information of this node is directly constructed)

View Branch Address: Https://android.googlesource.com/platform/manifest/+refs  

Git-dy145xp.gmail.com because the last time we set up a local account verification information can be here to fill in the corresponding authentication using the account and mailbox

[Email protected]

after the local warehouse initialization is complete, we modify the place once, ~/android directory is the directory where we prepare to store the source code, after initialization there will be a hidden directory called. Repo, which is a git script that downloads the source code for all Android nodes .

execute command sudo vim android/.repo/manifest.xml, note the red box, the following picture is the file I have modified, you will notice when opening the file , Fetch property, default is "..." , so we need to modify the property here to https://android.googlesource.com/, which is fetch= "https://android.googlesource.com/"


Modify manifest.xml mainly to solve the following error message:

Fatal: '. /platform/abi/cpp.git ' does not appear to be a git repository

Fatal:the remote end hung up unexpectedly

Error:cannot Fetch Platform/abi/cpp

Find the fetch attribute in the manifest.xml in the. Repo directory

Fetch= "https://android.googlesource.com/"

7. Last Repo Sync

Next, we can start our repo sync great cause, because of the pit of the celestial network, there may be a network interruption in the middle of the same, the following is a network fluent script, will automatically repo sync

  1. #!/bin/bash
  2. echo "======start repo sync======"   
  3. repo  sync  
  4. while  [ $?  = 1 ];  do   
  5. echo
  6. Sleep 3
  7. Repo Sync
  8. Done

How to use the script can be self-Baidu, haha, because I have not tried, Brother's network is great, a repo sync, sleep woke up, the download good, decisive network to force is good ah, haha






From for notes (Wiz)

Android Source download process (record, leave a souvenir)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.