近期在下载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. 后台使用oracle前台使用easyui分页机制

    前台easyui 的datagrid中设置分页属性: pagination:true,//显示分页 pagePosition:'bottom',//分页栏位置 both 上下 bottom.top p ...

  2. HDU 1253-大逃亡(裸-DBFS)

    G - 胜利大逃亡 Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit St ...

  3. CSharp Oracle 登陆

    =======后台Oracle存储过程================ 1.创建表 --判读表存在先删除begin    EXECUTE IMMEDIATE 'DROP TABLE student'; ...

  4. 《JavaScript设计模式与开发实践》读书笔记之享元模式

    1. 享元模式 享元模式是一种用于性能优化的模式,享元模式的核心是运用共享技术来有效支持大量细粒度的对象 1.1 传统的文件上传方法 以文件上传为例,文件上传功能可以选择依照队列,一个一个的排队上传, ...

  5. java中取得上下文路径的方法

    1.request.getContextPath(); 获得web根的上下文环境 如 /tree tree是web项目的root context 2.可以在servlet的init方法里 String ...

  6. 百度经纬度和google经纬度互转

    原文:百度经纬度和google经纬度互转 百度地图的坐标转换,由于百度地图在GCJ02协议的基础上又做了一次处理,变为 BD09协议的坐标,以下是坐标的转化方式,可以方便和其他平台转化 private ...

  7. UVa 988 - Many Paths, One Destination

    称号:生命是非常多的选择.现在给你一些选择(0~n-1),和其他选项后,分支数每一次选择,选择共求. 分析:dp,图论.假设一个状态也许是选择的数量0一个是,代表死亡,计数的路径数将达到所有死亡可以去 ...

  8. MySQL 批量Dll操作(转)

    概述 本章节介绍使用游标来批量进行表操作,包括批量添加索引.批量添加字段等.如果对存储过程.变量定义.预处理还不是很熟悉先阅读我前面写过的关于这三个概念的文章,只有先了解了这三个概念才能更好的理解这篇 ...

  9. Quick Tip: How to Add Syntax Highlighting to Any Project

    Quick Tip: How to Add Syntax Highlighting to Any Projectpublic String showAllArticleForPage() throws ...

  10. oj 小黑熊偷玉米

    Description 小黑熊的邻居bob 家里种很多玉米,玉米被布置在一条线上 .小黑熊贪心要偷玉米.但bob家是太多了玉米,所以小黑熊决定选择时间间隔[l,r]偷.因为小黑熊的幸运号码是k,的区间 ...