blob: 7a120b8d9221d6face61e6e1410160145ea84b84 [file] [log] [blame] [view]
Skyler Kaufman44436912011-04-07 15:11:52 -07001<!--
Conley Owens68ef9842011-04-22 13:51:20 -07002 Copyright 2010 The Android Open Source Project
Skyler Kaufman44436912011-04-07 15:11:52 -07003
Conley Owens68ef9842011-04-22 13:51:20 -07004 Licensed under the Apache License, Version 2.0 (the "License");
Skyler Kaufman44436912011-04-07 15:11:52 -07005 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
Jean-Baptiste Queru1a229522011-06-14 10:49:47 -070032 $ curl https://android.git.kernel.org/repo > ~/bin/repo
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070033 $ chmod a+x ~/bin/repo
34
Jean-Baptiste Queru1a229522011-06-14 10:49:47 -070035 - The MD5 checksum for repo is bbf05a064c4d184550d71595a662e098
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070036
37## Initializing a Repo client ##
38
39After installing Repo, set up your client to access the android source repository:
40
41 - Create an empty directory to hold your working files:
42
43 $ mkdir WORKING_DIRECTORY
44 $ cd WORKING_DIRECTORY
45
46 - 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.
47
48 $ repo init -u git://android.git.kernel.org/platform/manifest.git
49
50 To check out a branch other than "master", specify it with -b:
51
52 $ repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo
53
54 - 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.
55
56A 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.
57
58
59
60## Getting the files ##
61
62To pull down files to your working directory from the repositories as specified in the default manifest, run
63
64 $ repo sync
65
Skyler Kaufman44436912011-04-07 15:11:52 -070066The 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 -070067
68
69## Verifying Git Tags ##
70
71Load the following public key into your GnuPG key database. The key is used to sign annotated tags that represent releases.
72
73 $ gpg --import
74
75Copy and paste the key(s) below, then enter EOF (Ctrl-D) to end the input and process the keys.
76
Conley Owens68ef9842011-04-22 13:51:20 -070077 -----BEGIN PGP PUBLIC KEY BLOCK-----
78 Version: GnuPG v1.4.2.2 (GNU/Linux)
Jean-Baptiste Queru6a64a5b2011-05-25 09:07:50 -070079
Conley Owens68ef9842011-04-22 13:51:20 -070080 mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
81 lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
82 8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
83 u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
84 wNj96SA8BL+a1OoEUUfpMhiHyLuQSftx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0408sEBxiMior6b8LrZrAhkqDjA
101 vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
102 G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
103 hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
104 EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
105 =Wi5D
106 -----END PGP PUBLIC KEY BLOCK-----
Skyler Kaufman991ae4d2011-04-07 12:30:41 -0700107
Conley Owens68ef9842011-04-22 13:51:20 -0700108After importing the keys, you can verify any tag with
109
Skyler Kaufman991ae4d2011-04-07 12:30:41 -0700110 $ git tag -v TAG_NAME
111
112
113# Next: Build the code #
114
115You now have a complete local copy of the Android codebase. Continue on to [building](building.html)....