windows Linux子系统下载Android 源码
安装Linux子系统,下载git python,repo
sudo apt-get install git python2.7-dev
curl http://git-repo.googlecode.com/files/repo-1.13 > ~/bin/repo
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
repo sync
常见问题解决
discarding commits
python2.7 repo.py forall -c 'git reset --hard;git clean -f -d -x'
源码分支切换
cd .repo/manifests
#查看分支
git branch -a
#返回到前面目录
repo init -b "android_r_9.0.0_44"