国内下载android源码
快捷键
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
创建下载目录
mkdir android6.0
cd android6.0
设置用户名和邮箱
git config --global user.name "test"
git config --global user.email "test@163.com"
更换源
清华源,支持4线程,所以选择更换清华的源,或者直接修改repo文件中的REPO_URL
export REPO_URL="https://aosp.tuna.tsinghua.edu.cn/android/git-repo"
选择下载android6.0源码
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-6.0.1_r1
多线程同步源,速度更快
repo sync -j4