Domestic mirror download Android source code

Reprinted from:  http://m.blog.csdn.net/blog/xm379303813/45126101

Compiler Environment

In order to compile the Android source code, you first need a Linux, this time using Ubuntu Kylin14.04, kernel version 3.13. It is installed on a virtual machine with quad-core, 4G memory and 120G hard disk (the light source code is 60G, so more hard disks must be required). The virtual machine installation is relatively simple and is no longer organized. 
Check the kernel version number:

$uname -all

Tsinghua mirror address

The speed of Tsinghua mirror station is relatively fast, address: 
git://aosp.tuna.tsinghua.edu.cn/android/

Use your browser to access:

http://aosp.tuna.tsinghua.edu.cn/android/

download

  1. download repo 
    $git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/

  2. Modify 
    $vi /git-repo.git/repo 
    the address of repo google 
    REPO_URL = ' https://gerrit.googlesource.com/git-repo
    to the address of Tsinghua University 
    REPO_URL = 'git://aosp.tuna.tsinghua.edu.cn/android/git-repo '

  3. Download the manifest 
    google address 
    $ repo init -u  https://android.googlesource.com/platform/manifest 
    to the address of Tsinghua University 
    $ repo init -u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest 
    If you need to set the version, add the parameter -b Android source code version number.
  4. 同步源码 
    $repo sync [-j4] 
    后面-j4表示4个线程进行下载,清华镜像允许最多4线程下载,不要超过4个。 
    如果中间发现断掉了或者报错了,不要紧张,重新运行一下。源码大小

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325766103&siteId=291194637