国内镜像下载Android源码

转自: http://m.blog.csdn.net/blog/xm379303813/45126101

编译环境

为了编译安卓源码,首先需要一个Linux,本次采用Ubuntu Kylin14.04,内核版本3.13。装在四核、4G内存、120G硬盘的虚拟机上(光源码60G,所以一定要多些硬盘)。虚拟机安装较为简单,不再整理。 
查看内核版本号:

<code class="language-bash hljs "><span class="hljs-variable" style="padding:0px; margin:0px">$uname</span> -all</code>

清华镜像地址

清华镜像站的速度还是比较快的,地址: 
git://aosp.tuna.tsinghua.edu.cn/android/

使用浏览器访问:

http://aosp.tuna.tsinghua.edu.cn/android/

下载

  1. 下载 repo 
    $git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/

  2. 修改repo 
    $vi /git-repo.git/repo 
    google的地址 
    REPO_URL = ‘https://gerrit.googlesource.com/git-repo’ 
    改为清华大学的地址 
    REPO_URL = ‘git://aosp.tuna.tsinghua.edu.cn/android/git-repo’

  3. 下载 manifest 
    google 的地址 
    $ repo init -u https://android.googlesource.com/platform/manifest 
    改为清华大学的地址 
    $ repo init -u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest 
    如果需要设置版本,加入参数-b 安卓源码版本号即可。
  4. 同步源码 
    $repo sync [-j4] 
    后面-j4表示4个线程进行下载,清华镜像允许最多4线程下载,不要超过4个。 
    如果中间发现断掉了或者报错了,不要紧张,重新运行一下。源码大小
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值