1、下载repo
cd ~
mkdir bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2、 修改为国内的源,修改~/.bashrc文件,末尾添加如下代码
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
执行如下命令
source ~/.bashrc
3、下载源码
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-13.0.0_r7
repo sync -c -j8
完成后可以看到如下信息