参考https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/ 和https://lug.ustc.edu.cn/wiki/mirrors/help/aosp/
https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/
一.下载 repo 工具:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod a+x ~/bin/repo
二. 下载
1.月更新包
下载更新包
wget -c https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar
解压更新包
tar -xf aosp-latest.tar
cd aosp-latest
同步代码
repo sync
2.传统方法:
新建源代码存放目录
mkdir workdirectory
cd workdirectory
初始化仓库
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest
初始化制定版本:
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-11.0.0_r2
同步代码
repo sync
博客提供了AOSP代码下载的参考链接,详细介绍了下载步骤。首先需下载repo工具,之后有两种下载方式:一是下载月更新包,包括下载、解压更新包并同步代码;二是传统方法,新建目录、初始化仓库,可指定版本,最后同步代码。
197

被折叠的 条评论
为什么被折叠?



