清华TUNA镜像源下载Android源码的方法

本文在写作时是测试成功的,建议参考以下网页
Google教程:
https://source.android.com/source/downloading.html
TUNA的AOSP使用帮助:
https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/


安装GIT(Ubuntu)

sudo apt-get install git

源码下载

下载 repo 工具:

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

建立工作目录:

mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY

初始化仓库:

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

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

如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo,把 REPO_URL 一行替换成下面的:
REPO_URL = ‘https://gerrit-google.tuna.tsinghua.edu.cn/git-repo

如果需要某个特定的 Android 版本(以android-4.0.1_r1为例):

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

查看Android版本编号:
本文最后一部分有更新于2016.04.28Android5.0.1-6.0.1的版本号
来源:https://source.android.com/source/build-numbers.html#source-code-tags-and-builds

开始同步:

repo sync

接下来就是漫长的等待……
在校园网中下载速度会比较快
下载Android5.0源码压缩成.tar.gz后有26GB,可以参考一下


Android 5.1.0 - 6.0.1 版本号

更新于2016.04.28

Build Branch Version Supported devices
M5C14J android-6.0.1_r31 Marshmallow Pixel C
MOB30D android-6.0.1_r30 Marshmallow Nexus 5, Nexus 6, Nexus 7 (flo/deb), Nexus 9 (volantis/volantisg), Nexus P
  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值