使用Repo进行下载
如果需要学习Android源码的话,一定得需要了解Repo这个版本管理工具。
Repo工具的使用
https://source.android.com/source/using-repo
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
# 下载Repo
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
/******
// curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o ~/bin/repo
// sudo chmod a+x ~/bin/repo
// export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
/******
cd WORKING_DIRECTORY
# 初始化Repo
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
# 进入Repo目录,查看所有分支
cd .repo/manifests
git branch -a
# 下载某个特定的分支
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-7.1.0_r7
# 也可以这样切换其他分支
repo init -b android-6.0.1_r63
# 同步Repo代码
repo sync
AOSP各版本和分支的关系