Android 源代码下载(Ubuntu)

        在《安卓系统级深入开发》一书中,开发环境构建由于时间原因出现差错。

        Android源代码地址换为:http://source.android.com/source/downloading.html

在Ubuntu12.04中首先安装repo,

        

  1. Make sure you have a bin/ directory in your home directory and that it is included in your path:

    $ mkdir ~/bin
    $ PATH=~/bin:$PATH 
  2. Download the Repo tool and ensure that it is executable:

    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo

然后新建工作文件夹,cd进去,repo初始化:

repo init -u https://android.googlesource.com/platform/manifest
选择相应版本代码,-b后面带的参数就是版本,可以根据需要修改。
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
 接下来就可以同步代码了,漫长的一个过程。。。:
$ repo sync
重复多次,就可以把代码全部下下来。

可以用脚本写一个循环,方便下载。

$?=1; 
while [ $? -ne 0 ] ; 
do  repo sync ; 
done


转载于:https://my.oschina.net/NBLY/blog/145076

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值