Windows XP SP2下获取Android 4.0的源代码

1. 安装Cygwin

    从http://www.cygwin.com/下载setup.exe,来安装Cygwin。

    安装Cygwin的过程中,需要选择安装的包如下:

            Net -> curl

            Devel -> git* (git, git-completion, git-gui, gitk)

            Libs -> libreadline6, libiconv2

            Editors -> vim,Python -> python。

2. 启动Cygwin

    输入 echo $HOME 查看HOME路径中是否包含中文。若包含中文,则需要修改路径,使其不包含中文。

    修改方法:打开Cygwin目录下的Cygwin.bat文件,在启动bash之前加入一句话来修改HOME路径:set HOME=..\home\YourEnglishName

3. 下载repo脚本

    $ cd ~  (进入HOME目录)

    $ mkdir bin (创建bin目录,用于保存repo文件)

    $ curlhttps://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo(下载repo)

    $ chmod a+x ~/bin/repo (设置repo脚本执行权限)

     然后,将~/bin目录加入到环境变量PATH中:打开HOME目录下的.bashrc文件,在最后一行加入:export PATH=~/bin:$PATH

4. 利用repo脚本下载Android 4.0的源代码

    $ cd E:/Android/Android4.0 (保存Android4.0源代码的目录,空目录,大概需要nG的空间)

    $ ~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1(repo init初始化Ice Cream Sandwich 的代码分支)

    $ ~/bin/repo sync (repo sync下载代码,若出现错误,重复执行~/bin/repo sync

    (中间过程提示输入用户名和用户邮箱时,输入一个邮箱名和地址即可,其他的确认都选y)

    获取源代码时若cygwin出错,提示Resource temporarily unavailable,退出cygwin,找到cygwin/bin目录下的ash.exe,双击运行。

    输入/bin/rebaseall执行该shell命令,执行完毕,重新进入cygwin,重新repo init和repo sync即可。 

问题1:

我现在按照http://source.android.com/source/downloading.html的方法,还是无法下载:
[android_new]$ repo init -u https://android.googlesource.com/platform/manifest
warning: gpg (GnuPG) is not available.
warning: Installing it is strongly encouraged.

Get https://android.googlesource.com/tools/repo
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://android.googlesource.com
s/repo/info/refs

fatal: HTTP request failed

解决:

在cygwin中输入
git config --global http.sslVerify false
再次
repo init -u https://android.googlesource.com/platform/manifest
即可


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值