近期在下载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. Gap year | 最好金龟换酒

    Gap year | 最好金龟换酒 Gap year Posted on February 8, 2009 by 真 后.90后相比,说是虽然形成背景不同,但有很多特征相似,比如离经叛道,比如信仰缺失 ...

  2. if/else 条件

    if...else...和if语句是不同的运行方式: public class MyFirstApp{ public static void main(String[] args){ int x=3; ...

  3. Html A标签中 href 和 onclick用法、区别、优先级别

    原文:Html A标签中 href 和 onclick用法.区别.优先级别 如果不设置 href属性在IE6下面会不响应hover.双击后会选中标签的父容器而非这个一a标签(IE下都存在这一问题). ...

  4. 成为JAVA软件开发工程师要学哪些东西

    2010-04-22 15:34 提问者采纳 Java EE(旧称j2ee)   第一阶段:Java基础,包括java语法,面向对象特征,常见API,集合框架: *第二阶段:java界面编程,包括AW ...

  5. java该HashTable,HashMap和HashSet

    同一时候我们也对HashSet和HashMap的核心方法hashcode进行了具体解释,见<探索equals()和hashCode()方法>. 万事俱备,那么以下我们就对基于hash算法的 ...

  6. 最简单的历史Hibernate获得短暂的

    其实Hibernate本身就是一个单独的帧,不管它不需要web server或application server支持. 然而,最Hibernate简介已经加入了非常多的非Hibernate事,例: ...

  7. Codeforces 32E Hide-and-Seek 乞讨2关于镜面反射点 计算几何

    主题链接:点击打开链接 必须指出的是,反射镜和2个人共线是不是障碍,但根据该壁其他情况 #include<cstdio> #include<iostream> #include ...

  8. “AIR SDK 0.0: AIR SDK location “...\devsdks\AIRSDK\Win” does not exist.”问题解决~

    原文同步至:http://www.waylau.com/air-sdk-0-0-air-sdk-location-does-not-exist-address/ 导入AS3项目时提示“AIR SDK ...

  9. [Django](1093, &quot;You can&#39;t specify target table &#39;fee_details_invoices&#39; for update in FROM clause&quot;) 错误

    dele_id = Fee_details_invoices.objects.filter(fee_detail_id__in=fee_id_list, return_type='2').values ...

  10. Java 中泛型的全面解析(转)

    Java泛型(generics) 是JDK 5中引入的一个新特性,允许在定义类和接口的时候使用类型参数(type parameter).声明的类型参数在使用时用具体的类型来替换.泛型最主要的应用是在J ...