AOSP镜像清华版
2015-11-03 15:30
483 查看
http://mirrors.tuna.tsinghua.edu.cn/help/#AOSP
参考 Google 教程 https://source.android.com/source/downloading.html,将
2015-10-13 : 修复上游替换文档错误
2015-10-13 : 修复次级镜像文档错误
2015-10-09 : 恢复 git://aosp.tuna.tsinghua.edu.cn/aosp/ 访问
2015-10-08 : 镜像地址更新为 https://aosp.tuna.tsinghua.edu.cn/ (结尾没有/android)
下载 repo 工具:
建立工作目录:
初始化仓库:
如果需要某个特定的 Android 版本(列表):
同步源码树(以后只需执行这条命令来同步):
具体步骤为:
下载
初始化:
同步源码树:
同步完成后,运行
此后,其他用户使用
同时,修改
更改为
这个方法也可以用来在同步 Cyanogenmod 代码的时候从 TUNA 同步部分代码
AOSP 的 git 仓库
为何不能通过浏览器访问?
暂时没有 gitweb, 而且反正是 git bare 仓库,没有可以直接看到的内容。
出现
无视即可。
Android 镜像使用帮助
注意: 本镜像是 AOSP 镜像,Android SDK因版权原因,我们不能提供镜像服务。参考 Google 教程 https://source.android.com/source/downloading.html,将
https://android.googlesource.com/全部使用
https://aosp.tuna.tsinghua.edu.cn/或
git://aosp.tuna.tsinghua.edu.cn/aosp/代替即可。
2015-10-13 : 修复上游替换文档错误
2015-10-13 : 修复次级镜像文档错误
2015-10-09 : 恢复 git://aosp.tuna.tsinghua.edu.cn/aosp/ 访问
2015-10-08 : 镜像地址更新为 https://aosp.tuna.tsinghua.edu.cn/ (结尾没有/android)
过程摘录
(参考 https://lug.ustc.edu.cn/wiki/mirrors/help/aosp 编写)下载 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 版本(列表):
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-4.0.1_r1
同步源码树(以后只需执行这条命令来同步):
repo sync
建立次级镜像
由于 AOSP 镜像需求量巨大,且 Git 服务占资源较多,TUNA 服务器因 AOSP 产生的负载已经占主要部分。如果你是团队用户,我们强烈建议你通过 TUNA 建立次级镜像,再分享给团队内其他用户,减轻 TUNA 服务器压力。建立 AOSP 镜像需要占用约 65G 磁盘。具体步骤为:
下载
repo工具和建立工作目录(略)
初始化:
repo init -u git://aosp.tuna.tsinghua.edu.cn/aosp/mirror/manifest --mirror
同步源码树:
repo sync
同步完成后,运行
git daemon --verbose --export-all --base-path=WORKING_DIR WORKING_DIR(WORKING_DIR为代码树所在目录) 。
此后,其他用户使用
git://ip.to.mirror/作为镜像即可。
替换已有的 AOSP 源代码的 remote
如果你之前已经通过某种途径获得了 AOSP 的源码(或者你只是 init 这一步完成后),你希望以后通过 TUNA 同步 AOSP 部分的代码,只需要将.repo/manifest.xml把其中的 aosp 这个 remote 的 fetch 从
https://android.googlesource.com改为
https://aosp.tuna.tsinghua.edu.cn/或
git://aosp.tuna.tsinghua.edu.cn/aosp。
<manifest> <remote name="aosp" - fetch="https://android.googlesource.com" + fetch="https://aosp.tuna.tsinghua.edu.cn" 或 "git://aosp.tuna.tsinghua.edu.cn/aosp" review="android-review.googlesource.com" /> <remote name="github"
同时,修改
.repo/manifests.git/config,将
url = https://android.googlesource.com/platform/manifest
更改为
url = git://aosp.tuna.tsinghua.edu.cn/aosp/platform/manifest # 或 url = https://aosp.tuna.tsinghua.edu.cn/platform/manifest
这个方法也可以用来在同步 Cyanogenmod 代码的时候从 TUNA 同步部分代码
FAQ
镜像的是什么?AOSP 的 git 仓库
为何不能通过浏览器访问?
暂时没有 gitweb, 而且反正是 git bare 仓库,没有可以直接看到的内容。
出现
curl: (22) The requested URL returned error: 404 Not FoundServer does not provide clone.bundle; ignoring.怎么办?
无视即可。
相关文章推荐
- C#图片处理像素质量等代码问题
- 搞清楚脚本中这些函数的调用规律 .
- 性能测试中SQL引起的性能问题
- PHP生成简单计算的验证码,模仿CSDN
- Activity与Fragment的生命周期
- Airplace平台
- Android 实现图片滚动控件,含页签功能,让你的应用像淘宝一样炫起来
- hdu 2859 Phalanx(字符匹配)
- 使用const引用传递来提高效率
- Mac获取安装包
- 创业?你还差一位合格的产品经理
- 机器学习-数据集资源
- UNIX Tutorial Four
- 深入浅出Android Support Annotations
- iOS数据持久化存储 (1)-- Plist 、归档、NSUserDefaults、NSFileManager
- 【UER #5】万圣节的南瓜灯
- HDU-2059龟兔赛跑(基础方程DP-遍历之前的所有状态)
- sort函数用法
- 软键盘属性
- activity活动管理类