Android源代码下载教程

来源:互联网 发布:云计算平台特点 编辑:程序博客网 时间:2024/06/04 17:56

本文使用的源是清华源,只是介绍repo初始化和下载部分,之前的依赖库的下载,参考官网网址:
http://source.android.com/source/downloading.html

repo初始化

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

清华源下载源码

mkdir WORKING_DIRECTORYcd WORKING_DIRECTORY

初始化仓库:

repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest

如果需要某个特定的 Android 版本(列表):

列表链接:https://source.android.com/source/build-numbers.html#source-code-tags-and-builds

repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-4.0.1_r1

同步源码树(以后只需执行这条命令来同步):

repo sync

UCAS源下载

mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY

初始化仓库:

repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest

如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo,把 REPO_URL 一行替换成下面的:

REPO_URL = ‘https://gerrit-googlesource.proxy.ustclug.org/git-repo’

如果需要某个特定的 Android 版本(Android 版本列表):

列表链接:https://source.android.com/source/build-numbers.html#source-code-tags-and-builds

repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-4.0.1_r1
同步源码树(以后只需执行这条命令来同步):

repo sync

1 0
原创粉丝点击