-
参考清华源中aosp说明:https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
-
0. 环境准备
-
安装curl以下载repo
-
安装git以便同步代码
-
-
1. 下载repo工具
-
在用户目录下创建一个bin目录,以便保存用户自己的可执行文件,然后创建使用curl将repo下载到该目录
-
mkdir ~/bin PATH=~/bin:$PATH curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
-
因为google被墙,所以上述方式很大概率无法成功执行,因此使用清华源的repo-git镜像,将上面的google地址换为https://mirrors.tuna.tsinghua.edu.cn/git/git-repo
-
mkdir ~/bin PATH=~/bin:$PATH curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo chmod a+x ~/bin/repo
-
-
除此之外还需要将镜像源地址写入到~/.bashrc里,以便repo更新自己,同时将repo写入到PATH里,以便在任何目录下都可以使用该命令。
-
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/' export PATH=~/bin:$PATH
-
-
-
下载aosp代码
-
因为google无法访问的原因,aosp代码的下载还是使用清华源
-
传统代码下载方式:
-
创建工作目录
- <
-
-
AOSP代码下载及编译
最新推荐文章于 2024-04-09 14:04:30 发布