第一次使用,写的不好。
1、环境准备:ubuntu-14.04.2-desktop-amd64.iso + VMware Vorkstation 11.1.0
2、工具准备:git和curl,通过一下命令获取
sudo apt-get install git-core curl
3、配置git环境
git config --global user.email “test@test.com”
git config --global user.name “test”
其中test@test.com为你自己的邮箱,也可以随便写。
4、下载repo
mkdir ~/bin
PATH=~/bin:$PATH
curl -sSL 'https://gerrit-googlesource.proxy.ustclug.org/git-repo/+/master/repo?format=TEXT' |base64 -d > ~/bin/repo
chmod a+x ~/bin/repo
5、新建一个源码目录
mkdir android_source
cd android_source
6、vi ~/bin/repo
修改REPO_URL改为’https://gerrit-googlesource.proxy.ustclug.org/git-repo’
7、初始化仓库也可以指定Android版本
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-6.0.1_r81
8、同步源码树
repo sync
Android版本:http://mirrors.ustc.edu.cn/aosp/platform/manifest.git/refs/heads/
参考文档:
Android国内源码下载——亲测成功
https://blog.csdn.net/sinat_34677820/article/details/78328708
自己动手编译Android源码(超详细)
https://blog.csdn.net/weixin_34327223/article/details/85878256
AOSP(Android) 镜像使用帮助
https://lug.ustc.edu.cn/wiki/mirrors/help/aosp