=======================首先要翻墙==========================
1.下载和配置repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
2.创建源码目录以及初始化repo
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.0_r1
其他分支名称:http://source.android.com/source/build-numbers.html#source-code-tags-and-builds
3.下载代码:
repo sync
1.下载和配置repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
2.创建源码目录以及初始化repo
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.0_r1
其他分支名称:http://source.android.com/source/build-numbers.html#source-code-tags-and-builds
3.下载代码:
repo sync
或者 repo sync -c --no-tags 此处不会下载git仓的tag
在下载中由于网络原因可能会错误致使某些仓拉不下来,从而导致终止下载,可以使用 repo sync -f 或 repo sync -f -c --no-tags 来跳过下载失败的仓。下载完成之后 ,再用repo sync 多次重试