因为被墙的原因,下载Android源码有很多的不便。虽然使用了VPN,但是仍然有下载中断的问题,不知道是VPN都有的问题,还是我用的这家VPN会出现的问题。
于是,在网上搜索了一下可以下载AOSP镜像的地方,知道的有两个,其中清华的镜像亲测是可以的。
参考引用: http://blog.csdn.net/sunchaoenter/article/details/46342759
http://blog.sina.com.cn/s/blog_70b9730f01016peg.html
一. 清华的镜像
仓库地址:git://aosp.tuna.tsinghua.edu.cn/android/
下载步骤:
1. 下载 repo: git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/
2. . 修改repo google的地址
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
改为清华大学的地址
REPO_URL = 'git://aosp.tuna.tsinghua.edu.cn/android/git-repo'
3. repo init -u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest
下载master以外的分支, 用 -b 参数指定,比如下载 android-5.1.1_r3分支:
repo init -u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest -b android-5.1.1_r3
具体分支可以到官方网站去查询
4. repo sync
(以上的repo为 第 1 步中下载的repo,不要用错城google的repo)
repo init -u git://git.omapzoom.org/platform/manifest
repo init -u git://git.omapzoom.org/platform/manifest -b