一:准备
需要安装git,repo,curl
命令:
git和curl的安装
sudo apt-get install +对应的工具名
repo工具的安装和配置
mkdir ~/bin
PATH=~/bin:$PATH
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/’ > ~/bin/repo 这里需要换成清华的镜像
chmod a+x ~/bin/repo
二:使用repo工具下载git库
export REPO_URL=‘https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/’
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest 初始化并指定版本
三:同步代码
repo sync