1、mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2、vim ~/.bashrc
增加export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
vim ~/bin/repo
替换
REPO_URL = ‘https://gerrit-google.tuna.tsinghua.edu.cn/git-repo’
3、repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-9.0.0_r3 --depth=1 拉去指定的android-9.0.0_r3版本,不要拉 Fetch日志
4、repo sync -j8 -c,-current-branch --no-tags ,启用8个线程操作,获取当前新分支,不要tags信息
大小在20G内,耗时在小小时内