blob: 3faaa6b5371b1ff26adbabf97a6cb469080a0d36 [file] [log] [blame] [view]
Skyler Kaufman44436912011-04-07 15:11:52 -07001<!--
2 Copyright 2010 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
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 Kaufman991ae4d2011-04-07 12:30:41 -070017# Downloading the Source Tree #
18
19## Installing Repo ##
20
Skyler Kaufman44436912011-04-07 15:11:52 -070021Repo 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 Kaufman991ae4d2011-04-07 12:30:41 -070022
23To 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
32 $ curl http://android.git.kernel.org/repo > ~/bin/repo
33 $ chmod a+x ~/bin/repo
34
35
36## Initializing a Repo client ##
37
38After installing Repo, set up your client to access the android source repository:
39
40 - Create an empty directory to hold your working files:
41
42 $ mkdir WORKING_DIRECTORY
43 $ cd WORKING_DIRECTORY
44
45 - 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.
46
47 $ repo init -u git://android.git.kernel.org/platform/manifest.git
48
49 To check out a branch other than "master", specify it with -b:
50
51 $ repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo
52
53 - 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.
54
55A 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.
56
57
58
59## Getting the files ##
60
61To pull down files to your working directory from the repositories as specified in the default manifest, run
62
63 $ repo sync
64
Skyler Kaufman44436912011-04-07 15:11:52 -070065The 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 [Version Control](version-control.html).
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070066
67
68## Verifying Git Tags ##
69
70Load the following public key into your GnuPG key database. The key is used to sign annotated tags that represent releases.
71
72 $ gpg --import
73
74Copy and paste the key(s) below, then enter EOF (Ctrl-D) to end the input and process the keys.
75
76 -----BEGIN PGP PUBLIC KEY BLOCK-----
77 Version: GnuPG v1.4.2.2 (GNU/Linux)
78 mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
79 lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
80 8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
81 u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
82 wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
83 /HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
84 jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
85 MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
86 b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
87 aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
88 cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
89 gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
90 2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
91 QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
92 hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
93 C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
94 LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
95 OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
96 pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
97 KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
98 N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
99 vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
100 G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
101 hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
102 EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
103 =Wi5D
104 -----END PGP PUBLIC KEY BLOCK-----
105
106After importing the keys, you can verify any tag with
107
108 $ git tag -v TAG_NAME
109
110
111# Next: Build the code #
112
113You now have a complete local copy of the Android codebase. Continue on to [building](building.html)....