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 

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐