如果文章无法浏览或图片失效 直接前往原文地址浏览
点击这里前往原文
几个核心地址
https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/ 清华Git Repo 镜像使用帮助
https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/ 清华Android 镜像使用帮助
一些相关资料地址
本人环境 全新的ubuntu18
下载整体步骤
1.安装repo
2.安装全局repo 配置文件 repo
3.设更新镜像 3.1
4.新建工作目录 使用 repo init 初始化仓库
5.同步拉下来源码文件 repo sync
6.安装编译环境 包括JDK等一系列的东西
1.安装repo
sudo apt install repo
一路下来就行
2.全局repo文件
按照清华文档来
如果没有curl记得安装一下
sudo apt-get install curl
mkdir ~/bin
PATH=~/bin:$PATH
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
chmod a+x ~/bin/repo
这里修改为清华镜像 下载的更快
3.设置更新镜像地址
sudo gedit ~/.bashrc
新增代码
# repo
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
配置生效
source ~/.bashrc
4.新建工作目录 开始初始化仓库
我们目标明确 是 android8.0_r2 所以直接
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/man