第1步:安装git和curl
$ sudo apt-get install git-core curl
第2步:安装repo脚本
$ curl http://android.git.kernel.org/repo >~/repo
第3步:给repo可执行权限
$ chmod a+x ~/repo
第4步:新建一个目录mydroid , 进入目录
$ mkdir mydroid
$ cd mydroid
第5步:repo初始化
$ repo init -u git://android.git.kernel.org/platform/manifest.git
ps:可以修改check out的版本
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
第6步:repo同步
$ repo sync
因为文件比较大,所以请耐心等待吧~~
最后你看到了这样一句 Syncing work tree: 100% ,done 表示下载完毕。