1. 下载repo
- 确保你的主目录中有一个 bin/ 目录,并且它包含在你的路径中
mkdir ~/bin
PATH=~/bin:$PATH
- 下载 Repo 启动器,赋予可执行权限:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2. 下载源码
mkdir android11
cd android11
repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r17
repo sync -c --no-tags