该博客是已经配置成熟的编译环境,用于快速的下载新代码参照,如果没有配置编译环境,请参照我的另一篇博客链接

(1)切换Python至version3.6+:
sudo update-alternatives --config python
有问题,请参照我的另一篇博客链接

(2)初始化源码仓库,这里将repo文件中的google的REPO_URL改成清华的url:
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest

(3)查看repo库上分支版本,找到想要的分支:
git --git-dir=.repo/manifests/.git/ branch -a

(4)指定分支后,重新初始化源码仓库:
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-10.0.0_r47

(5)下载源码:
repo sync

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐