Android源码下载 清华AOSP镜像源

这个是Android源码镜像源  https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/

把https://android.googlesource.com/

全部使用 https://aosp.tuna.tsinghua.edu.cn/


1下载repo源码管理脚本

sudo apt-get install git curl
PATH=~/bin:$PATH

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

chmod a+x ~/bin/repo


下面这个在repo中更改下

编辑 ~/bin/repo,把 REPO_URL 一行替换成下面的:REPO_URL = 'https://gerrit-google.tuna.tsinghua.edu.cn/git-repo'


下载git仓库Android清单

git clone  https://android.googlesource.com/platform/manifest可全部替换为下面的
git clone  https://aosp.tuna.tsinghua.edu.cn/platform/manifest

$ cd manifest  

$ git branch -a 可以查看当前的分支


下载指定版本源码,参数 -b 后为指定版本号,可根据第5步获得
$          repo init -u https://android.googlesource.com/platform/manifest -b android-2.2.2_r1


替换为 repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-4.1.1_r3  

$ repo sync


下载内核goldfish源码清单

git clone https://aosp.tuna.tsinghua.edu.cn/aosp/kernel/goldfish.git

cd goldfish查看分支

git branch -a

git checkout -b remotes/origin/android-goldfish-2.6.29

猜你喜欢

转载自blog.csdn.net/jiyilanzhou/article/details/51675015