$ curl https://android.git.kernel.org/repo > ~/bin/repo
curl: (6) Couldn't resolve host 'android.git.kernel.org'
原因是因为android.git.kernel.org网站被黑了,所以无法从该网站下载repo和android源代码了。
因此我们只能想办法从其他地方下载了.
我们可以从https://www.codeaurora.org/网站下载android源码。
具体方法如下:
下载repo并设置环境变量
$ curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo"> ~/bin/repo$ chmod a+x ~/bin/repo
$ PATH=~/bin:$PATH
下载android源码
$ mkdir WORKING_DIRECTORY
$cd WORKING_DIRECTORY
$ repo init -u git://codeaurora.org/platform/manifest.git -b gingerbread
$ repo sync