How to download the android4.0 source code in ubuntu10.04 (and solve the problem that android Source Code cannot be downloaded in the past)

Source: Internet
Author: User

Some time ago, because Android betrayed GNU and the idea of freedom and open source pursued by Linux, it kicked out the main line of Linux source code. In addition to the recent adjustments made by kernel.org to black and Google for android, there are various reasons. The method for downloading the android source code is invalid. The original source code for downloading android is: repo init-u git: // Repository.


The following is the latest android source code download method, including the source code for downloading android4.0. When compiling the android source code, you need to install multiple packages. For ubuntu systems, it is simple! First open the terminal:

After installing these packages, We need to install the download tool repo. Repo is an easy-to-use tool for managing the android source code. It can be used to download, synchronize, and upload the Android project source code. Installation steps:

(Note: The original address: curl https://android.git.kernel.org/repo> ~ /Bin/repo has expired, new address is: curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo> ~ /Bin/repo)

Initialize Repo and create an empty directory to store the android source code:

(Note: The original address: repo init-u git: // android.git.kernel.org/platform/manifest.githas been ineffective, the new address: repo init-u https://android.googlesource.com/platform/manifest. You can add-B to download the android source code of the specified version, for example, android4.0.1 _ r1)

After repo init is completed, it requires you to enter your real name and email address to configure the Repo.

After initialization and configuration, execute the last step: repo sync-j4

Because repo sync mainly obtains the source code from the server, the execution time will be relatively long, depending on the speed of the network. However, you can add-j4 after repo sync to achieve parallel acceleration, 4 is the number of parallel threads, which can be determined based on your actual situation.

 

From Righthek's column

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.