Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame^] | 1 | # Downloading the Source Tree # |
| 2 | |
| 3 | ## Installing Repo ## |
| 4 | |
| 5 | Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see <a href="{@docRoot}source/git-repo.html">Using Repo and Git</a>.</p> |
| 6 | |
| 7 | To install, initialize, and configure Repo, follow these steps: |
| 8 | |
| 9 | - Make sure you have a bin/ directory in your home directory, and that it is included in your path: |
| 10 | |
| 11 | $ mkdir ~/bin |
| 12 | $ PATH=~/bin:$PATH |
| 13 | |
| 14 | - Download the Repo script and ensure it is executable: |
| 15 | |
| 16 | $ curl http://android.git.kernel.org/repo > ~/bin/repo |
| 17 | $ chmod a+x ~/bin/repo |
| 18 | |
| 19 | |
| 20 | ## Initializing a Repo client ## |
| 21 | |
| 22 | After installing Repo, set up your client to access the android source repository: |
| 23 | |
| 24 | - Create an empty directory to hold your working files: |
| 25 | |
| 26 | $ mkdir WORKING_DIRECTORY |
| 27 | $ cd WORKING_DIRECTORY |
| 28 | |
| 29 | - 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. |
| 30 | |
| 31 | $ repo init -u git://android.git.kernel.org/platform/manifest.git |
| 32 | |
| 33 | To check out a branch other than "master", specify it with -b: |
| 34 | |
| 35 | $ repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo |
| 36 | |
| 37 | - 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](http://www.google.com/accounts). 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. |
| 38 | |
| 39 | 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. |
| 40 | |
| 41 | |
| 42 | |
| 43 | ## Getting the files ## |
| 44 | |
| 45 | To pull down files to your working directory from the repositories as specified in the default manifest, run |
| 46 | |
| 47 | $ repo sync |
| 48 | |
| 49 | The Android source files will be located in your working directory under their project names. The initial sync operation will take several minutes to complete. For more about `repo sync` and other Repo commands, see [Using Repo and Git](git-repo.html). |
| 50 | |
| 51 | |
| 52 | ## Verifying Git Tags ## |
| 53 | |
| 54 | Load the following public key into your GnuPG key database. The key is used to sign annotated tags that represent releases. |
| 55 | |
| 56 | $ gpg --import |
| 57 | |
| 58 | Copy and paste the key(s) below, then enter EOF (Ctrl-D) to end the input and process the keys. |
| 59 | |
| 60 | -----BEGIN PGP PUBLIC KEY BLOCK----- |
| 61 | Version: GnuPG v1.4.2.2 (GNU/Linux) |
| 62 | mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV |
| 63 | lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7 |
| 64 | 8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD |
| 65 | u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z |
| 66 | wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq |
| 67 | /HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5 |
| 68 | jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4 |
| 69 | MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9 |
| 70 | b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv |
| 71 | aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k |
| 72 | cm9pZC5jb20+iGAEExECACAFA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|
| 89 | |
| 90 | After importing the keys, you can verify any tag with |
| 91 | |
| 92 | $ git tag -v TAG_NAME |
| 93 | |
| 94 | |
| 95 | # Next: Build the code # |
| 96 | |
| 97 | You now have a complete local copy of the Android codebase. Continue on to [building](building.html).... |