ubuntu18.04
1 安装所需依赖
sudo apt-get install git curl
sudo apt-get install python
git config --global user.email xxxx
git config --global user.name xxxxx
git config --list 查看配置正确与否
2 repo下载
AOSP | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
更新 REPO_URL 默认是google的
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
代码目录
mkdir android
cd android
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest
或 git clone https://mirrors.ustc.edu.cn/aosp/platform/manifest.git
查看分支
repo branches
no branch
cd .repo/manifest.git
git branch -a
下载 7.0.0_r1分支
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-7.0.0_r1
repo sync -j4 根据cpu 核数目 同步代码

大约 100多个G
本文详细介绍了在Ubuntu 18.04环境下如何安装依赖、配置Git、下载并同步AOSP平台manifest,适用于想要从源码构建Android 7.0.0_r1的开发者。步骤包括设置git配置、使用repo工具克隆和同步代码,适合技术背景的读者。
Aosp 下载&spm=1001.2101.3001.5002&articleId=123386087&d=1&t=3&u=c1d70b3c9af74f39be55bbc8408d4820)
905

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



