Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 1 | <!-- |
Conley Owens | 68ef984 | 2011-04-22 13:51:20 -0700 | [diff] [blame] | 2 | Copyright 2010 The Android Open Source Project |
Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 3 | |
Conley Owens | 68ef984 | 2011-04-22 13:51:20 -0700 | [diff] [blame] | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 17 | # Downloading the Source Tree # |
| 18 | |
| 19 | ## Installing Repo ## |
| 20 | |
Skyler Kaufman | 4443691 | 2011-04-07 15:11:52 -0700 | [diff] [blame] | 21 | 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](version-control.html). |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 22 | |
| 23 | To install, initialize, and configure Repo, follow these steps: |
| 24 | |
| 25 | - Make sure you have a bin/ directory in your home directory, and that it is included in your path: |
| 26 | |
| 27 | $ mkdir ~/bin |
| 28 | $ PATH=~/bin:$PATH |
| 29 | |
| 30 | - Download the Repo script and ensure it is executable: |
| 31 | |
Jean-Baptiste Queru | be48f61 | 2011-10-06 14:20:51 -0700 | [diff] [blame] | 32 | $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 33 | $ chmod a+x ~/bin/repo |
| 34 | |
Jean-Baptiste Queru | be48f61 | 2011-10-06 14:20:51 -0700 | [diff] [blame] | 35 | - The SHA-1 checksum for repo is e1fd3bef059d152edf4d0522590725d317bc637f |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 36 | |
| 37 | ## Initializing a Repo client ## |
| 38 | |
| 39 | After installing Repo, set up your client to access the android source repository: |
| 40 | |
Jean-Baptiste Queru | be48f61 | 2011-10-06 14:20:51 -0700 | [diff] [blame] | 41 | - Create an empty directory to hold your working files. |
Jean-Baptiste Queru | 64175aa | 2011-11-08 17:25:08 -0800 | [diff] [blame] | 42 | If you're using MacOS, this has to be on a case-sensitive filesystem. |
Jean-Baptiste Queru | be48f61 | 2011-10-06 14:20:51 -0700 | [diff] [blame] | 43 | Give it any name you like: |
| 44 | |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 45 | |
| 46 | $ mkdir WORKING_DIRECTORY |
| 47 | $ cd WORKING_DIRECTORY |
| 48 | |
| 49 | - 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. |
| 50 | |
Jean-Baptiste Queru | be48f61 | 2011-10-06 14:20:51 -0700 | [diff] [blame] | 51 | $ repo init -u https://android.googlesource.com/platform/manifest |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 52 | |
| 53 | To check out a branch other than "master", specify it with -b: |
| 54 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 55 | $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 56 | |
| 57 | - 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. |
| 58 | |
| 59 | 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. |
| 60 | |
| 61 | |
| 62 | |
| 63 | ## Getting the files ## |
| 64 | |
| 65 | To pull down files to your working directory from the repositories as specified in the default manifest, run |
| 66 | |
| 67 | $ repo sync |
| 68 | |
Jean-Baptiste Queru | be48f61 | 2011-10-06 14:20:51 -0700 | [diff] [blame] | 69 | The Android source files will be located in your working directory |
| 70 | under their project names. The initial sync operation will take |
| 71 | an hour or more to complete. For more about `repo sync` and other |
| 72 | Repo commands, see [Version Control](version-control.html). |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 73 | |
| 74 | |
| 75 | ## Verifying Git Tags ## |
| 76 | |
| 77 | Load the following public key into your GnuPG key database. The key is used to sign annotated tags that represent releases. |
| 78 | |
| 79 | $ gpg --import |
| 80 | |
| 81 | Copy and paste the key(s) below, then enter EOF (Ctrl-D) to end the input and process the keys. |
| 82 | |
Conley Owens | 68ef984 | 2011-04-22 13:51:20 -0700 | [diff] [blame] | 83 | -----BEGIN PGP PUBLIC KEY BLOCK----- |
| 84 | Version: GnuPG v1.4.2.2 (GNU/Linux) |
Jean-Baptiste Queru | 6a64a5b | 2011-05-25 09:07:50 -0700 | [diff] [blame] | 85 | |
Conley Owens | 68ef984 | 2011-04-22 13:51:20 -0700 | [diff] [blame] | 86 | mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV |
| 87 | lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7 |
| 88 | 8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD |
| 89 | u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0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1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s |
| 105 | KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb |
| 106 | N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA |
| 107 | vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo |
| 108 | G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ |
| 109 | hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l |
| 110 | EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM= |
| 111 | =Wi5D |
| 112 | -----END PGP PUBLIC KEY BLOCK----- |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 113 | |
Conley Owens | 68ef984 | 2011-04-22 13:51:20 -0700 | [diff] [blame] | 114 | After importing the keys, you can verify any tag with |
| 115 | |
Skyler Kaufman | 991ae4d | 2011-04-07 12:30:41 -0700 | [diff] [blame] | 116 | $ git tag -v TAG_NAME |
| 117 | |
| 118 | |
| 119 | # Next: Build the code # |
| 120 | |
| 121 | You now have a complete local copy of the Android codebase. Continue on to [building](building.html).... |