Android Source code Download method

Source: Internet
Author: User

1. Download the Repo tool

mkdir ~/binpath=~/bin: $PATHcurl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repochmod a+x ~/ Bin/repo

2. Create source Directory

mkdir ANDROIDSRCCD ANDROIDSRC

3. Initializing the Warehouse

Repo Init-u https://aosp.tuna.tsinghua.edu.cn/platform/manifest

A) If you are prompted that you cannot connect togerrit.googlesource.com,可以 编辑 repo 文件,

VI ~/bin/repo

PutREPO_URL 一行替换成,

Repo_url = ' Https://gerrit-google.tuna.tsinghua.edu.cn/git-repo '

b) If you need a specific Android version, such as Android-6.0.1_r46

Repo Init-u https://aosp.tuna.tsinghua.edu.cn/platform/manifest-b android-6.0.1_r46

4. Synchronous source Code

Repo Sync

You can also automatically synchronize the new script (autosync.sh)

VI autosync.sh

The autosync.sh content is as follows (rest 3 milliseconds when not connected to the terminal and then automatically repo sync),

#!/bin/bashecho "======start repo sync======" Repo syncwhile [$? = = 1]; Do    echo "======sync failed, Re-sync again======"    sleep 3    repo Syncdone







Android Source code Download method

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.