最近下载android源码报错误如下:


  1. curl:(7)couldn'tconnecttohost和

[text] view plain copy
  1. root@localhostWORKING_DIRECTORY]#reposync
  2. android.git.kernel.org[0:130.239.17.13]:errno=Connectionrefused
  3. android.git.kernel.org[0:199.6.1.173]:errno=Connectionrefused
  4. android.git.kernel.org[0:2001:6b0:e:4017:1972:112:1:0]:errno=Networkisunreachable
  5. android.git.kernel.org[0:2001:500:60:10:1972:112:1:0]:errno=Networkisunreachable
  6. fatal:unabletoconnectasocket(Networkisunreachable)
  7. error:Cannotfetchplatform/bionic

原因是Kernel.org hacked .所以提供下载方法

1.curl"http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo"> ~/bin/repo

chmod a+x ~/bin/repoPATH=~/bin:$PATH

mkdir WORKING_DIRECTORYcd WORKING_DIRECTORYrepo init -u git://codeaurora.org/platform/manifest.git -b gingerbreadrepo sync

请参考http://php.webtutor.pl/en/2011/09/05/kernel-org-hacked-how-to-get-android-repo/


As you may already know, kernel.org site which hosts the Android git repositoryhas been hacked. Because of this we can’t obtain the Android source code from its servers. All attempts to do so ultimately fail with the similar response:

[text] view plain copy
  1. [root@localhostWORKING_DIRECTORY]#reposync
  2. android.git.kernel.org[0:130.239.17.13]:errno=Connectionrefused
  3. android.git.kernel.org[0:199.6.1.173]:errno=Connectionrefused
  4. android.git.kernel.org[0:2001:6b0:e:4017:1972:112:1:0]:errno=Networkisunreachable
  5. android.git.kernel.org[0:2001:500:60:10:1972:112:1:0]:errno=Networkisunreachable
  6. fatal:unabletoconnectasocket(Networkisunreachable)
  7. error:Cannotfetchplatform/bionic

or:

[text] view plain copy
  1. [root@localhost~]#curlhttps://android.git.kernel.org/repo>~/bin/repo
  2. %Total%Received%XferdAverageSpeedTimeTimeTimeCurrent
  3. DloadUploadTotalSpentLeftSpeed
  4. 00000000--:--:--0:00:01--:--:--0
  5. curl:(7)couldn'tconnecttohost

I will describe another way to get the Android source codes if you hadn’t already cloned it’s repo before kernel.org servers went down.

Prepare the environment

First, you need to download “repo” script fromkernel.orgmy blog (please,enclose the URL address in double quotes):

curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repochmod a+x ~/bin/repoPATH=~/bin:$PATH

Download the Android repository

Now, you can safely download the repository, like so:

mkdir WORKING_DIRECTORYcd WORKING_DIRECTORYrepo init -u git://codeaurora.org/platform/manifest.git -b gingerbreadrepo sync

and start the development…

更多相关文章

  1. android技术开发例子,解析以及源码集锦
  2. android技术开发例子,解析以及源码集锦
  3. Android(安卓)Studio com.android.support:percent 导入错误
  4. android实例
  5. android技术开发例子,解析以及源码集锦
  6. 让Android(安卓)Studio支持系统签名
  7. [Android实例] Android网络收音机项目(内含源码)
  8. android 编译源码不生成odex
  9. Android(安卓)源码编译make的错误处理

随机推荐

  1. Android(安卓)只接读取压缩包里的内容(解
  2. Android(安卓)GPS架构分析(三)
  3. Android开发:在Android(安卓)apk中调用Ope
  4. Android(安卓)SQLite数据存储
  5. 【Android(安卓)Camera】之 Preview
  6. Android(安卓)调用堆栈跟踪
  7. Android事件拦截机制(一)
  8. Android拍照获得图片URI为空的处理方法
  9. Android(安卓)版本代号
  10. 【原创】Android仿新浪微博的“更多”页