Android 镜像使用帮助
按照 Google 官方教程 https://source.android.com/source/downloading.html
将 https://android.googlesource.com/platform/manifest
替换为 http://mirrors.ustc.edu.cn/aosp/platform/manifest
。
具体做法摘录如下(以防墙抽风):
首先下载 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 http://mirrors.ustc.edu.cn/aosp/platform/manifest
如果需要某个特定的 Android 版本(Android 版本列表):
repo init -u http://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-4.0.1_r1
同步源码树(以后只需执行这条命令来同步):
repo sync
已有仓库如何改用科大源
如果您已经从官方同步了 AOSP 仓库,现在希望使用科大的 AOSP 仓库,请修改 .repo/manifests.git/config
,将
url = https://android.googlesource.com/platform/manifest
修改成
url = http://mirrors.ustc.edu.cn/aosp/platform/manifest
即可。
说明
本镜像每天凌晨同步一次。