ububtu下android源码下载详解

Google的官网上对此已经有了流程介绍。以下是经过我实践过的下载过程,并配有翻译。


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

(建立bin目录,关联path)

$ mkdir ~/bin
$ PATH=~/bin:$PATH

2.Download the Repo script and ensure it is executable:

(下载repo,并修改权限)

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

3.Create an empty directory to hold your working files.

(建立下载目录,并进入到目录中)

$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY

4.Run repo init to bring down the latest version of Repo with all its most recent bug fixes.. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.

(执行repo init获取android版本列表)

$ repo init -u https://android.googlesource.com/platform/manifest

http://source.android.com/source/build-numbers.html


5.To check out a branch other than "master", specify it with -b:

(初始化下载对应版本)

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

6.To pull down files to your working directory from the repositories as specified in the default manifest, run

(开始下载)

$ repo sync



源码的编译可以参考:

http://blog.supra.tw/?p=47

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值