Android 4.0 Ice Cream Sandwich Source Code
Downloading the Source Tree
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 Version Control.
To install, initialize, and configure Repo, follow these steps:
- Make sure you have a bin/ directory in your home directory, and that it is included in your path:
$ mkdir ~/bin $ PATH=~/bin:$PATH
- Download the Repo script and ensure it is executable:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo
- The SHA-1 checksum for repo is e1fd3bef059d152edf4d0522590725d317bc637f
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
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
- When prompted, please 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.
Getting the files
To pull down files 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 Version Control.
Verifying Git Tags
Load the following public key into your GnuPG key database. The key is used to sign annotated tags that represent releases.
$ gpg --import
Copy and paste the key(s) below, then enter EOF (Ctrl-D) to end the input and process the keys.
-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.2.2 (GNU/Linux) mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dv
Ox6/t43LPPIxeJ8eX9WB+8LLuROSV lFhpHawsVAcFlmi7f7jdSRF+Ovt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B/M pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfN
UKiQZ6esoAWtDgpqt7Y7s KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb N8bTyOJo856q
g4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp
9ILz8jEGqmUtkBszwo G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ hN0DlsIw8hqJc0WI
SQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4
KLM= =Wi5D -----END PGP PUBLIC KEY BLOCK-----
After importing the keys, you can verify any tag with
$ git tag -v TAG_NAME
Next: Build the code
You now have a complete local copy of the Android codebase. Continue on to building….
Complete source code download http://source.android.com/source/downloading.html will release at 2011/11/17
trek
2011 年 12 月 6 日 上午 11:19
The SHA-1 checksum for repo is e1fd3bef059d152edf4d0522590725d317bc637f
这个不一致怎么办?
x
2012 年 4 月 4 日 下午 10:24
您好,兄弟在curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo下载repo的时候怎么都下载不下来,敢问兄台有啥好办法,可不可以麻烦把repo文件发给我啊?我的邮箱x.c.z@foxmail.com