blob: 3045e655c327a376afe3abd0d8882304c7a02350 [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 Querube48f612011-10-06 14:20:51 -070032 $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070033 $ chmod a+x ~/bin/repo
34
Jean-Baptiste Querube48f612011-10-06 14:20:51 -070035 - The SHA-1 checksum for repo is e1fd3bef059d152edf4d0522590725d317bc637f
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
Jean-Baptiste Querube48f612011-10-06 14:20:51 -070041 - Create an empty directory to hold your working files.
Jean-Baptiste Queru64175aa2011-11-08 17:25:08 -080042 If you're using MacOS, this has to be on a case-sensitive filesystem.
Jean-Baptiste Querube48f612011-10-06 14:20:51 -070043 Give it any name you like:
44
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070045
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 Querube48f612011-10-06 14:20:51 -070051 $ repo init -u https://android.googlesource.com/platform/manifest
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070052
53 To check out a branch other than "master", specify it with -b:
54
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070055 $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070056
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
59A 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
65To pull down files to your working directory from the repositories as specified in the default manifest, run
66
67 $ repo sync
68
Jean-Baptiste Querube48f612011-10-06 14:20:51 -070069The Android source files will be located in your working directory
70under their project names. The initial sync operation will take
71an hour or more to complete. For more about `repo sync` and other
72Repo commands, see [Version Control](version-control.html).
Skyler Kaufman991ae4d2011-04-07 12:30:41 -070073
74
75## Verifying Git Tags ##
76
77Load 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
81Copy and paste the key(s) below, then enter EOF (Ctrl-D) to end the input and process the keys.
82
Conley Owens68ef9842011-04-22 13:51:20 -070083 -----BEGIN PGP PUBLIC KEY BLOCK-----
84 Version: GnuPG v1.4.2.2 (GNU/Linux)
Jean-Baptiste Queru6a64a5b2011-05-25 09:07:50 -070085
Conley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E411aMAN3qnAHBBMZzKMX
102 LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
103 OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
104 pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
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 Kaufman991ae4d2011-04-07 12:30:41 -0700113
Conley Owens68ef9842011-04-22 13:51:20 -0700114After importing the keys, you can verify any tag with
115
Skyler Kaufman991ae4d2011-04-07 12:30:41 -0700116 $ git tag -v TAG_NAME
117
118
119# Next: Build the code #
120
121You now have a complete local copy of the Android codebase. Continue on to [building](building.html)....