您的位置:首页 > 移动开发 > Android开发

ububtu下android源码下载详解

2012-07-12 17:45 405 查看
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[/code] 
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: