Android source code download success record

Source: Internet
Author: User

1. Install git

Sudo apt-Get install Git-core

2. Install curl

Sudo apt-Get install Git-core curl

3. Install repo and download repo through curl

This is the case on the Internet or in many books:

Curl http://android.git.kernel.org/repo> ~ /Bin/Repo

The repo obtained in the result cannot be used. What is the 301 redirection! Miserable! Later, I posted a post on csdn, and Daniel gave it a solution!

Http://code.google.com/p/git-repo/downloads/detail? Name = repo-1.12This link provides the download Repo!

You can also run the following command:

Curl http://git-repo.googlecode.com/files/repo-1.12> ~ /Bin/Repo

4. Modify the execution permission

Chmod A + x ~ /Bin/Repo

5. Modify ~ /Bin/repo File

This step is prone to errors, and brother died here for a long time! Many books or websites use the following command:

~ /Bin/repo init-u git: // android.git.kernel.org/platform/manifest.git

After the execution, wait for n long, and the results will show unexpected results.

Error: Failed connect to code.google.com: 443; operation now in progress while accessing https://code.google.com/p/git-repo//info/refs

Online solution: Modify ~ /Bin/repo File

Repo_url = 'https: // code.google.com/p/git-repo /'

Change

Repo_url = 'HTTP: // code.google.com/p/git-repo /'

6. Then add the bin path to the path:

Export Path = $ path :~ /Bin

7. Create a directory and enter it.

Mkdir Source

CD Source

8: Run

Repo init-u git: // android.git.kernel.org/platform/manifest.git
Repo init-U Git://Code=ra.org/Platform/Manifest. Git-BGingerbread
Your name and email will be asked in the middle. If you want to uploadCodeEmail must be a Google account.
After repo Initialization is successful, you will see an example similar to the following:
Repo initialized in/home/(current user name)/source
9: Execute $ repo sync to start the synchronization code. The process is long. The download speed depends on your network speed (for example, about 3-4 hours). disconnection may occur in the middle. Re-Execute repo sync to resume data transfer.

 

Related Article

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.