Android Introduction and source code compilation---android source code download

Source: Internet
Author: User

Four. Android Source download

4.1 Installing Repo

    • Create the Bin folder in the home directory
      mkdir ~/bin$ PATH=~/bin: $PATH

    • Install and Change permissions
      $curl https://chmod a+x ~/bin/repo

4.2 Initializing Repo

    • Create working directory (store source)
      mkdir Android4. 1 $ cd Android4. 1

    • Initialize repo to get the latest source code, which is the main branch source code:
      $repo init-u https://android.googlesource.com/platform/manifest

    • Find other branches (enter in browser)
      HTTPS://android.googlesource.com/platform/manifest/+refs

    • Get additional branch source code
      $ repo init-u https://android.googlesource.com/platform/manifest-b android-4.1.1_r3

4.3 Download Android Source Tree

    • After the initialization is complete, download the source code, execute:
      Sync

Repo Sync supports the continuation of the breakpoint. If there is an error during the download, the network cannot connect, etc., after processing the exception, perform repo sync again

You can also perform automatic download batch processing, automatically repo sync after download exception

1 #!/bin/sh2sync3while     0  ]4 Do      5         Sync 6  Done

Android Download source is painful, connect to the server to download code is often abnormal, even fq, download speed is very slow. Downloading the source code usually takes 3 days to weeks, or even 1 months to complete the download.

Now there are a lot of good people abroad, download the source and compressed and put it on the Internet for sharing, we can choose to search these later share, to save time.

Introduced below: "Android Introduction and source code compilation---compiled Android source code"

Android Introduction and source code compilation---android source code download

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.