您的位置:首页 > 移动开发 > Android开发

Android源码下载 清华AOSP镜像源

2016-06-14 22:11 513 查看
这个是Android源码镜像源 https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
把https://android.googlesource.com/

全部使用 https://aosp.tuna.tsinghua.edu.cn/
或git://aosp.tuna.tsinghua.edu.cn/aosp/ 代替即可

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 git://aosp.tuna.tsinghua.edu.cn/aosp//platform/manifest -b android-2.2.2_r1

$ repo sync

下载内核goldfish源码清单

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

cd goldfish查看分支

git branch -a



git checkout -b remotes/origin/android-goldfish-2.6.29
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: