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

Android-Android系统源码下载2

2015-11-30 12:28 441 查看
1.下载源码时候的工具

A Linux or Mac OS system. It is also possible to build Android in a virtual machine on unsupported systems such as Windows. If you are running Linux in a virtual machine, you need at least 16GB of
RAM/swap and 100GB or more of disk space in order to build the Android tree. See disk size requirements below.
A 64-bit environment is required for Gingerbread (2.3.x) and newer versions, including the master branch. You can compile older versions on 32-bit systems.
At least 100GB of free disk space for a checkout, 150GB for a single build, and 200GB or more for multiple builds. If you employ ccache, you will need even more space.

Python 2.6 -- 2.7, which you can download from python.org.

GNU Make 3.81 -- 3.82, which you can download from gnu.org,

JDK 7 to build the master branch of Android in the Android Open Source Project (AOSP);
JDK 6 to build Gingerbread through KitKat; JDK 5 for Cupcake through Froyo. See Initializing a Build Environment for installation
instructions by operating system.

Git 1.7 or newer. You can find it at git-scm.com.

分析如下:1你得有Linux系统或者苹果系统 其实Windows系统也是可以的就是麻烦点 2.JDK GNU Git等软件 3.卧槽还要100G的磁盘空间 好吧 我基本要放弃了


Downloading the Source


IN THIS DOCUMENT

Installing
Repo
Initializing
a Repo client
Downloading
the Android Source Tree
Using
Authentication
Troubleshooting
network issues
Using
a local mirror
Verifying
Git Tags

The Android source tree is located in a Git repository hosted by Google. This document describes how to download the source tree for a specific Android code-line.


Installing Repo

Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see theDeveloping section.
To install Repo:

Make sure you have a bin/ directory in your home directory and that it is included in your path:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
[/code]

Download the Repo tool and ensure that it is executable:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo


For version 1.17, the SHA-1 checksum for repo is ddd79b6d5a7807e911b524cb223bc3544b661c28
For version 1.19, the SHA-1 checksum for repo is 92cbad8c880f697b58ed83e348d06619f8098e6c
For version 1.20, the SHA-1 checksum for repo is e197cb48ff4ddda4d11f23940d316e323b29671c
For version 1.21, the SHA-1 checksum for repo is b8bd1804f432ecf1bab730949c82b93b0fc5fede
For version 1.22, the SHA-1 checksum for repo is da0514e484f74648a890c0467d61ca415379f791


Initializing a Repo client

After installing Repo, set up your client to access the Android source repository:

Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY


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 -u https://android.googlesource.com/platform/manifest[/code] To check out a branch other than "master", specify it with 
-b
. For a list of branches, seeSource
Code Tags and Builds.
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1


When prompted, configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered
Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.

A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a 
.repo
 directory
where files such as the manifest will be kept.


Downloading the Android Source Tree

To pull down the Android source tree to your working directory from the repositories as specified in the default manifest, run
$ repo sync

The Android source files will be located in your working directory under their project names. The initial sync operation will take an hour or more to complete. For more about 
repo
sync
 and other Repo commands, see the Developing section.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: