近期在下载android4.0的代码,下列操作
下载Repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

创建源代码文件夹:

$ mkdir ANDROID_SOURCE
$ cd ANDROID_SOURCE
 获取git上的android源代码版本号
$ repo init -u https://android.googlesource.com/platform/manifest
我们下载最新版
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.3_r1
$ repo sync
可加參数: -jx x代表开启多少个线程来下载源代码

依照 google 的官网设置会出如今下载的时候产生错误 从而不能下载,之前Android的代码是在Linux kernel(android.git.kernel.org)管理,被Kernel踢出来之后,Android源代码如今直接由Google(android.googlesource.com)管理。

用repo/git下载源代码时

发现有错误:

DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out>

在源代码站点 http://source.android.com/source/downloading.html能够了解信息:

Using authentication

By default, access to the Android source code is anonymous. To protect theservers against excessive usage, each IP address is associated with a quota.

When sharing an IP address with other users (e.g. when accessing the sourcerepositories from beyond a NAT firewall), the quotas can trigger even forregular usage patterns (e.g. if many users sync new clients from the same IPaddress within a short period).

In that case, it is possible to use authenticated access, which then usesa separate quota for each user, regardless of the IP address.

The first step is to create a password fromthe password generator andto save it in~/.netrc according to the instructions on that page.

The second step is to force authenticated access, by using the followingmanifest URI:https://android.googlesource.com/a/platform/manifest. Noticehow the/a/ directory prefix triggers mandatory authentication. You canconvert an existing
client to use mandatory authentication with the followingcommand:

$ repo init -u https://android.googlesource.com/a/platform/manifest
 

登录https://android.googlesource.com/new-password 用自己注冊邮箱登录,点击网页上的“同意訪问”,得到类似

 machine android.googlesource.com login git-<userName>.gmail.com password <password>
 machine android-review.googlesource.com login git-<userName>.gmail.com password <password>
把上面那段信息追加到~/.netrc文件结尾(请检查当前用户的权限, 假设不存在此文件则自己新建一个)
下载地址的URI更改为https://android.googlesource.com/a/platform/manifest(中间加上了“/a”)。
 repo init -u https://android.googlesource.com/a/platform/manifest -b android-4.0.3_r1
 repo sync -j10

android4.0下载问题的更多相关文章

  1. 深入浅出-Android系统移植与平台开发(一)- Android4.0系统的下载与编译

    作者:唐老师,华清远见嵌入式学院讲师. 一.Android4.0系统的下载与编译 Android系统的下载与编译,Google的官方网站上已经给出了详细的说明,请参照Android的官方网址: htt ...

  2. ubuntu13.04下载android4.0.1源码过程

    最初我参考的是老罗的博客http://blog.csdn.net/luoshengyang/article/details/6559955 进行下载安装的,但弄着弄着就发现不太对劲了.这里记录下详细过 ...

  3. 【转】如何下载并编译Android4.0内核源码goldfish(图文)

    原文网址:http://blog.csdn.net/flydream0/article/details/7070392 关于如何下载Android4.0源码,请查看我的博客内另一篇文章(同样是图文教程 ...

  4. Ubuntu12.04下载Android4.0.1源码全过程,附若干问题解决[转]

    学校里一直在做应用层开发,考虑到日后就业问题,这次决定研究源码和驱动,并进行编译.没想到就下载源码这一步折腾了我整整两天,期间遇到很多问题,哎,记录于此,希望日后再下源码的人不要再走无谓的弯路了.事实 ...

  5. 如何下载和编译Android4.0内核源代码goldfish(图像)

    如何下载Android4.0源代码.请参阅我的博客文章中有(同样是图文教程): http://blog.csdn.net/flydream0/article/details/7036156 怎样编译A ...

  6. 怎样下载并编译Android4.0内核源代码goldfish(图文)

    关于怎样下载Android4.0源代码,请查看我的博客内还有一篇文章(相同是图文教程): http://blog.csdn.net/flydream0/article/details/7036156 ...

  7. [2013.7.5新鲜出炉] Ubuntu12.04下载Android4.0.1源码全过程----------------折腾两天,终于下好,附若干问题解决

    本文转至 http://blog.csdn.net/yanzi1225627/article/details/9255457 下载源码这一步折腾了我整整两天,期间遇到很多问题,哎,记录于此,希望日后再 ...

  8. 精通Android4.0开发视频【张泽华】-完整版下载

    观看须知: 本视频教程为黑马程序员 张泽华老师历经2年时间整理 适合有JavaWeb基础同学学习,教程采用的AVI方式发布,所以看起来很流畅. 视频概括: 1. 本套视频不同于市面上任何一套andro ...

  9. 转载: ubuntu13.04下载android4.0.1源码过程

    转自:http://blog.csdn.net/zhanglongit/article/details/9263009,中间有些不行的地方进行了些小修改. 最初我参考的是老罗的博客http://blo ...

随机推荐

  1. 全栈JavaScript之路(十八)HTML5 自己定义数据属性

    HTML5 规范规定,用户能够为元素 自己定义非标准属性, 可是要加入 data- 前缀. 目的是为元素提供与页面渲染无关的信息.或者语义信息.这些属性名能够任意加入,仅仅要带上前缀 data- 开头 ...

  2. Eclipse插件基础篇一

    名词翻译 有一些名词在翻译的过程中可能会出现歧义,在这里统一一下. アーキテクチャ=architecture=架构 プラットフォーム=platform=平台 コンポーネント=component=组件 ...

  3. maven项目建立pom.xml报无法解析org.apache.maven.plugins:maven-resources-plugin:2.4.3

    一.发现问题 建立maven项目后,pom.xml在显示红叉.鼠标放上去,显示Executiondefault-testResources of goalorg.apache.maven.plugin ...

  4. WPF实现无窗体鼠标跟随

    原文:WPF实现无窗体鼠标跟随 上次的弹力模拟动画实现后,我觉得可以把这个弄得更好玩一些,我们可以让小球实时跟随着鼠标,并且还可以让窗口完全消失,让小球在桌面上飞来飞去. 这只需要一些简单的修改就可以 ...

  5. .NET 单点登录

    <appSettings>     <!--是否启用单点登录接口-->     <add key="IsStartCas" value="f ...

  6. Windows Server 架设VPN要点

    PPTP 为给客户端连接的VPN用户帐户设置“允许拨入”属性. VPN服务端与客户端都无需安装任何证书. L2TP/IPSEC VPN服务器与客户端分别需要在自己的“本地计算机帐户>个人”(而非 ...

  7. 编C语言单元测试框架CUnit方法库

    /*********************************************************************  * Author  : Samson  * Date   ...

  8. coco2dx c++ HTTP实现

    coco2dx c++ HTTP实现 达到的结果如下面的 iPhone截图 android 日志截图 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdnBp ...

  9. Spring MVC helloWorld中遇到的问题及解决办法

    1.java.io.FileNotFoundException: Could not open ServletContext resource不能加载ServletContext的用法是配置到web. ...

  10. CentOS6.5 Nginx优化编译配置[续]

    继续上文CentOS6.5 Nginx优化编译配置本文记录有关Nginx系统环境的一些细节设置,有关Nginx性能调整除了配置文件吻合服务器硬件之前就是关闭不必要的服务.磁盘操作.文件描述符.内核调整 ...