development
リビジョン | 28cd530b279d8e3d78ace980cdbf8e34d90751b0 (tree) |
---|---|
日時 | 2011-01-26 03:53:15 |
作者 | Jean-Baptiste Queru <jbq@goog...> |
コミッター | Android Git Automerger |
am ad72b961: merge 6d0d0d64 from gingerbread-plus-aosp
* commit 'ad72b96188d0a29b0669545f712e189411661bb8':
@@ -1,276 +1,202 @@ | ||
1 | 1 | page.title=Get Android Source Code |
2 | 2 | doc.type=source |
3 | 3 | @jd:body |
4 | + | |
4 | 5 | <div> |
5 | -<div><br>This document describes how to set up your local work environment, how to use Repo to get the Android files, and how to build the files on your machine.<br><br>Related reading:<br></div> | |
6 | -<ul><li>For an overview of the entire code-review and code-update process, see | |
7 | -<a href="{@docRoot}source/life-of-a-patch.html">Life of a Patch</a> | |
8 | -.</li> | |
9 | -<li>For reference details about Repo, see <a href="{@docRoot}source/git-repo.html">Using Repo and Git</a> | |
10 | -.<br></li> | |
11 | -</ul> | |
12 | -<h2> | |
13 | -What's in the source?</h2> | |
14 | -<div>To see snapshots and histories of the files available in the public Android repositories, visit the <a href="http://android.git.kernel.org/">GitWeb</a> | |
15 | -web interface.</div> | |
16 | -<div></div> | |
17 | -<div>The source is approximately 2.1GB in size. You will need 6GB free to complete the build.<br><br></div> | |
18 | -<h2> | |
19 | -Setting up your machine</h2> | |
20 | -<div>To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.</div> | |
21 | -<div><br></div> | |
22 | -<h3> | |
23 | -Linux</h3> | |
24 | -The Android build is routinely tested on recent versions of Ubuntu (6.06 and later), but reports of successes or failures on other distributions are welcome.<br><h4> | |
25 | -Ubuntu Linux (32-bit x86)</h4> | |
26 | -<div>To set up your Linux development environment, make sure you have the following:</div> | |
27 | -<div><ul><li>Required Packages:</li> | |
28 | -<ul><li>Git 1.5.4 or newer <span>and the GNU Privacy Guard.<br></span> | |
29 | -</li> | |
30 | -</ul> | |
31 | -</ul> | |
6 | + <p>This document describes how to set up your local work environment, how to use Repo to get the Android files, and how to build the files on your machine.</p> | |
7 | + <p>Related reading: | |
8 | + <ul> | |
9 | + <li>For an overview of the entire code-review and code-update process, see | |
10 | +<a href="{@docRoot}source/life-of-a-patch.html">Life of a Patch</a>.</li> | |
11 | + <li>For reference details about Repo, see <a href="{@docRoot}source/git-repo.html">Using Repo and Git</a>.</li> | |
12 | + </ul> | |
13 | + </p> | |
32 | 14 | </div> |
33 | -<div><ul><ul><li>JDK 5.0, update 12 or higher.Java 6 is not supported, because of incompatibilities with @Override.<br></li> | |
34 | -</ul> | |
35 | -</ul> | |
36 | -</div> | |
37 | -<div><ul><ul><li><span>flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev (optional), build-essential, zip, curl.</span> | |
38 | -</li> | |
39 | -</ul> | |
40 | -</ul> | |
41 | -</div> | |
42 | -<blockquote><span>$ sudo apt-get install</span> | |
43 | -<span>git-core gnupg</span> | |
44 | -<span>sun-java5-jdk</span> | |
45 | -<span>flex bison gperf <span>libsdl-dev libesd0-dev</span> | |
46 | -libwxgtk2.6-dev build-essential zip <span>curl libncurses5-dev zlib1g-dev <br></span> | |
47 | -</span> | |
48 | -</blockquote> | |
49 | -<div><ul><li><span><span>You might also want Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.</span> | |
50 | -</span> | |
51 | -</li> | |
52 | -</ul> | |
15 | + | |
16 | +<div> | |
17 | + <h2>What's in the source?</h2> | |
18 | + <p>To see snapshots and histories of the files available in the public Android repositories, visit the <a href="http://android.git.kernel.org/">GitWeb</a> web interface.</p> | |
19 | + <p>The source is approximately 2.6GB in size. You will need 6GB free to complete the build.</p> | |
53 | 20 | </div> |
54 | -<blockquote><div><span>$ sudo apt-get install valgrind <br></span> | |
21 | + | |
22 | +<div> | |
23 | + <h2>Setting up your machine</h2> | |
24 | + <p>To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.</p> | |
25 | + | |
26 | + <h3>Linux</h3> | |
27 | + <p>The Android build is routinely tested in house on recent versions of Ubuntu (10.04 and later), but most distributions should have the required build tools available. Reports of successes or failures on other distributions are welcome.</p> | |
28 | + <p>In general you will need: | |
29 | + <ul> | |
30 | + <li>Python 2.4, which you can download from <a href="http://www.python.org/download/">python.org</a>.</li> | |
31 | + <li>JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download either from <a href="http://java.sun.com/javase/downloads/">java.sun.com</a>.</li> | |
32 | + <li>Git 1.5.4 or newer. You can find it at <a href="http://git.or.cz/">http://git.or.cz/</a>.</li> | |
33 | + </ul> | |
34 | + </p> | |
35 | + | |
36 | + <h4>Ubuntu Linux (64-bit)</h4> | |
37 | + <p>The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used. | |
38 | + <p>Java 6: for Gingerbread and newer | |
39 | + <div class=code>sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"<br/> | |
40 | + sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"<br/> | |
41 | + sudo apt-get update<br/> | |
42 | + sudo apt-get install sun-java6-jdk<br/> | |
43 | + sudo update-java-alternatives -s java-6-sun | |
44 | + </div> | |
45 | + </p> | |
46 | + <p>Java 5: for Froyo and older | |
47 | + <div class=code>sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper main multiverse"<br/> | |
48 | + sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper-updates main multiverse"<br/> | |
49 | + sudo apt-get update<br/> | |
50 | + sudo apt-get install sun-java5-jdk<br/> | |
51 | + sudo update-java-alternatives -s java-1.5.0-sun | |
52 | + </div> | |
53 | + </p> | |
54 | + </p> | |
55 | + <p>To set up your development environment, install the following required packages: | |
56 | + <div class=code>$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev</div> | |
57 | + </p> | |
58 | + <p>You might also want Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.</p> | |
59 | + | |
60 | + <h4>Running Linux in a virtual machine</h4> | |
61 | +If you are running Linux in a virtual machine, you will need at least 1.5GB of RAM and 10GB or more of disk space in order to build the Android tree.<br> | |
62 | +</div> | |
63 | + | |
64 | +<div> | |
65 | + <h3>Mac OS X</h3> | |
66 | + <p>To build the Android files in a Mac OS environment, you need an Intel/x86 machine running MacOS 10.4 (Tiger), 10.5 (Leopard), or 10.6 (Snow Leopard). The Android build system and tools do not support the obsolete PowerPC architecture.</p> | |
67 | + <p>Android must be built on a case-sensitive file system because the sources contain files that differ only in case. We recommend that you build Android on a partition that has been formatted with the journaled file system HFS+. HFS+ is required to successfully build Mac OS applications such as the Android Emulator for OS X.</p> | |
68 | + <div> | |
69 | + <h4>Creating a case sensitive disk image</h4> | |
70 | + <p>If you want to avoid partitioning/formatting your hard drive, you can use a case-sensitive disk image instead. To create the image, launch Disk Utility and select "New Image". A size of 8 GB is sufficient, or more if you prefer. Be sure to select "case sensitive, journaled" as the volume format.</p> | |
71 | + <p>This will create a .dmg file which, once mounted, acts as a drive with the required formatting for Android development. For a disk image named "android.dmg" stored in your home directory, you can add the following to your <tt>~/.bash_profile</tt> to mount the image when you execute "mountAndroid": | |
72 | + <div class=code># mount the android file image<br/> | |
73 | + function mountAndroid{ hdiutil attach ~/android.dmg-mountpoint /Volumes/android; }</div> | |
74 | + Once mounted, you'll do all your work in the "android" volume. You can eject it (unmount it) just like you would with an external drive.</p> | |
75 | + </div> | |
76 | + | |
77 | + <p>To set up your Mac OS development environment, follow these steps: | |
78 | + <ol> | |
79 | + <li>Install XCode from <a href="http://developer.apple.com/">http://developer.apple.com</a>. We recommend version 3.0 or newer. If you are not already registered as an Apple developer, you will have to create an Apple ID in order to download.</li> | |
80 | + <li>Install MacPorts from <a href="http://www.macports.org/install.php">http://www.macports.org/</a>.</li> | |
81 | + <li>Make sure that /opt/local/bin appears in your path BEFORE /usr/bin. If not, add | |
82 | + <div class=code>export PATH=/opt/local/bin:$PATH</div> | |
83 | + to your <tt>~/.bash_profile</tt>.</li> | |
84 | + <li>Get make, git, and GPG packages from port: | |
85 | + <div class=code>$ POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg</div> | |
86 | + If using Mac OS 10.4, also install bison: | |
87 | + <div class=code>$ POSIXLY_CORRECT=1 sudo port install bison</div> | |
88 | + </li> | |
89 | + <li>Temporary step: There is a bug in gmake 3.82 that prevents android from building. You can install version 3.81 using MacPorts by taking the following steps: | |
90 | + <p>Edit <tt>/opt/local/etc/macports/sources.conf</tt> and a line that says <div class=code>file:///Users/Shared/dports</div> above the rsync line. Then create this directory: <div class=code>$ mkdir /Users/Shared/dports</div> | |
91 | + In the new <tt>dports</tt> directory, run <div class=code>$ svn co --revision 50980 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake/ devel/gmake/</div> | |
92 | + Create a port index for your new local repository: <div class=code>$ portindex /Users/Shared/dports</div> | |
93 | + Finally, install the old version of gmake with <div class=code>$ sudo port install gmake @3.81</div> | |
94 | + </p> | |
95 | + </li> | |
96 | + <li>Set an appropriate per-process file descriptor limit. To do this, add the following lines to your <tt>~/.bash_profile</tt>: <div class=code># set the number of open files to be 1024<br/> | |
97 | + ulimit -S -n 1024</div> | |
98 | + </li> | |
99 | + </ol> | |
100 | + </p> | |
55 | 101 | </div> |
56 | -</blockquote> | |
57 | -<ul><li><span><span>Intrepid (</span> | |
58 | -</span> | |
59 | -8.10) users may need a newer version of libreadline:</li> | |
60 | -</ul> | |
61 | -<div>$ sudo apt-get install lib32readline5-dev <br></div> | |
62 | -<div><h4> | |
63 | -Ubuntu Linux (64-bit x86)</h4> | |
64 | -This has not been as well tested. Please send success or failure reports to <a href="mailto:android-porting@googlegroups.com">android-porting@googlegroups.com</a> | |
65 | -.</div> | |
66 | -<div><br></div> | |
67 | -<div>The Android build requires a 32-bit build environment as well as some other tools:<br></div> | |
68 | -<div><ul><li>Required Packages:</li> | |
69 | -<ul><li>Git, JDK, flex, and the other packages as listed above in the i386 instructions:<span><br></span> | |
70 | -</li> | |
71 | -<li>JDK 5.0, update 12 or higher.Java 6 is not supported, because of incompatibilities with @Override.</li> | |
72 | -<li>Pieces from the 32-bit cross-building environment</li> | |
73 | -<li>X11 development <br></li> | |
74 | -</ul> | |
75 | -</ul> | |
102 | + | |
103 | + | |
104 | +<div> | |
105 | + <h2>Installing Repo</h2> | |
106 | + <p>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> | |
107 | + <p>To install, initialize, and configure Repo, follow these steps: | |
108 | + <ol> | |
109 | + <li>Make sure you have a bin/ directory in your home directory, and that it is included in your path: | |
110 | + <div class=code>$ mkdir ~/bin<br/> | |
111 | + $ PATH=~/bin:$PATH</div> | |
112 | + </li> | |
113 | + <li>Download the Repo script and ensure it is executable: | |
114 | + <div class=code>$ curl http://android.git.kernel.org/repo > ~/bin/repo<br/> | |
115 | + $ chmod a+x ~/bin/repo</div> | |
116 | + </li> | |
117 | + </ol> | |
76 | 118 | </div> |
77 | -<blockquote><span><span>$</span> | |
78 | -sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl</span> | |
79 | -sun-java5-jdk <span><span>zlib1g-dev</span> | |
80 | -</span> | |
81 | -gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev</blockquote> | |
82 | -<ul><li>Set the system to use the right version of java by default:<br><br>$ sudo update-java-alternatives -s java-1.5.0-sun <br></li> | |
83 | -</ul> | |
84 | -<ul><li>X11: Ubuntu doesn't have packages for the X11 libraries, but that can be worked around with the following command:<br><br>$ sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so <br><br></li> | |
85 | -</ul> | |
86 | -<div><h4> | |
87 | -Running Linux in a virtual machine</h4> | |
88 | -If you are running Linux in a virtual machine, you will need at least 1.5GB of RAM and 10GB or more of disk space in order to build the Android tree.<br><h4> | |
89 | -Other Linux</h4> | |
90 | -<p>There's no reason why Android cannot be built on non-Ubuntu systems. Please send any success or failure reports to <a href="mailto:android-porting@googlegroups.com">android-porting@googlegroups.com</a> | |
91 | -<span>. In general you will need:</span> | |
92 | -</p> | |
93 | -<ul><li>Python 2.4, which you can <a href="http://www.python.org/download/">download from python.org</a>.</li> | |
94 | -<li>JDK 5.0, update 12 or higher, which you can <a href="http://java.sun.com/javase/downloads/">download from java.sun.com</a>. Java 6 is not supported, because of incompatibilities with @Override.</li> | |
95 | -<li>Git 1.5.4 or newer. You can find it at <a href="http://git.or.cz/">http://git.or.cz/</a>.</li> | |
96 | -</ul> | |
97 | -<p>Anything missing from this list? Please let us know!</p> | |
98 | -<h4> | |
99 | -<span><br></span> | |
100 | -</h4> | |
119 | + | |
120 | +<div> | |
121 | + <h2>Initializing a Repo client</h2> | |
122 | + <p>After installing Repo, set up your client to access the android source repository: | |
123 | + <ol> | |
124 | + <li>Create an empty directory to hold your working files: | |
125 | + <div class=code>$ mkdir <i>directory</i><br/> | |
126 | + $ cd <i>directory</i></div> | |
127 | + </li> | |
128 | + <li>Run <tt>repo init</tt> 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. | |
129 | + <div class=code>$ repo init -u git://android.git.kernel.org/platform/manifest.git</div> | |
130 | + To check out a branch other than "master", specify it with -b: | |
131 | + <div class=code>$ repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake</div> | |
132 | + </li> | |
133 | + <li>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 <a href="http://www.google.com/accounts">registered Google account</a>. 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. | |
134 | + </li> | |
135 | + </ol> | |
136 | + A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a <tt>.repo</tt> directory where files such as the manifest will be kept.</p> | |
101 | 137 | </div> |
102 | -<div><h3> | |
103 | -Mac OS <br></h3> | |
138 | + | |
139 | +<div> | |
140 | + <h2>Getting the files</h2> | |
141 | + <p>To pull down files to your working directory from the repositories as specified in the default manifest, run | |
142 | + <div class=code>$ repo sync</div> | |
143 | + For more about <tt>repo sync</tt> and other Repo commands, see <a href="{@docRoot}source/git-repo.html">Using Repo and Git</a>.</span> | |
144 | + <p>The Android source files will be located in your working directory under their project names.</p> | |
104 | 145 | </div> |
105 | -<div><p><span>Requirements:</span> | |
106 | -</p> | |
107 | -<ul><li><span>To build the Android files in a Mac OS environment, you need an Intel/x86 machine running MacOS 10.4 ("Tiger") or 10.5 ("Leopard"). At the moment MacOS 10.6 ("Snow Leopard") is not supported. The Android build system and tools do not support the obsolete PowerPC architecture.</span> | |
108 | -</li> | |
109 | -<li><span>Android must be built on a case-sensitive file system.<br></span> | |
110 | -</li> | |
111 | -<ul><li>We recommend that you build Android on a partition that has been formatted with the "Case-sensitive Journaled HFS+" file system:</li> | |
112 | -<ul><li>A case-sensitive file system is required because the sources contain files that differ only in case.</li> | |
113 | -<li>Journaled systems are more robust. (This is optional, but recommended.)</li> | |
114 | -<li>HFS+ is required to successfully build Mac OS applications such as the Android Emulator for OS X.</li> | |
115 | -</ul> | |
116 | -<li>If you want to avoid partitioning/formatting your hard drive, you can use a case-sensitive disk image instead.</li> | |
117 | -<ul><li>To create the image:<br><ul><li>launch /Applications/Utilities/Disk Utility</li> | |
118 | -<li>select "New Image"</li> | |
119 | -<li>size: 8 GB (this will work, but you can choose more if you want to)</li> | |
120 | -<li>volume format: case sensitive, journaled</li> | |
121 | -</ul> | |
122 | -</li> | |
123 | -<li>This will create a .dmg file which, once mounted, acts as a drive with the required formatting for Android development. For a disk image named "android.dmg" stored in your home directory, you can add the following to your ~/.bash_profile to mount the image when you execute "mountAndroid":<br><br><div># command to mount the android file image <br>function mountAndroid { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; }<br></div> | |
124 | -<br>Once mounted, you'll do all your work in the "android" volume. You can eject it (unmount it) just like you would with an external drive.</li> | |
125 | -</ul> | |
126 | -</ul> | |
127 | -</ul> | |
128 | -<ul></ul> | |
129 | -To set up your Mac OS development environment, follow these steps:<br> | |
130 | -<ol><li>Install the XCode version 2.4 or later from <a href="http://developer.apple.com/">http://developer.apple.com</a>. We recommend version 3.0 or newer.<br></li> | |
131 | -<li>Install MacPorts. To do this:</li> | |
132 | -<ol> | |
133 | - <li>Download and run the installer from <a href="http://www.macports.org/install.php">http://www.macports.org/install.php</a></li> | |
134 | - <li>Make sure that <code>/opt/local/bin</code> is in your path before <code>/usr/bin</code> by running | |
135 | - <div><code>$ echo $PATH</code></div> | |
136 | - <div> If you don't see /opt/local/bin, edit <code>$HOME/.bash_profile</code> and add the line <code>export PATH=/opt/local/bin:$PATH</code> | |
137 | - after any other PATH-related lines. To verify that your path is now correct, open a new terminal and run <code>echo $PATH</code> again.</div> | |
138 | - </li> | |
139 | -</ol> | |
140 | -<li>Get the following packages from port:<br>$ <span>POSIXLY_CORRECT=1</span> | |
141 | -sudo port install gmake libsdl git-core gnupg <br><span>If using Mac OS 10.4, also install:<br>$ <span>POSIXLY_CORRECT=1</span> | |
142 | -sudo port install bison <br></span> | |
143 | -</li> | |
144 | -<li>Upgrade GNU make to 3.81 or later by running the following command. (Mac OS doesn't come with a recent enough version.)<br>$ sudo ln -s gmake /opt/local/bin/make <br></li> | |
145 | -<li>Set an appropriate per-process file descriptor limit. To do this, add the following lines to your <i><span>.bash_profile</span> | |
146 | -</i> | |
147 | -file:<br># set the number of open files to be 1024<br>$ <span>ulimit -S -n 1024</span><br> | |
148 | -Note that this may not be necessary; on some systems, the output of "ulimit -S" will show "unlimited". In this case, there is no need to set the limit to 1024.</li> | |
149 | -</ol> | |
146 | + | |
147 | +<div> | |
148 | + <h2>Verifying Git Tags</h2> | |
149 | + <p>Load the following public key into your GnuPG key database. The key is used to sign annotated tags that represent releases. | |
150 | + <div class=code>$ gpg --import</div> | |
151 | + Copy and paste the key(s) below, then enter EOF (Ctrl-D) to end the input and process the keys. | |
152 | + <div class=code>-----BEGIN PGP PUBLIC KEY BLOCK-----<br> | |
153 | + Version: GnuPG v1.4.2.2 (GNU/Linux)<br><br> | |
154 | + mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV <br> | |
155 | + lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7<br> | |
156 | + 8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD <br> | |
157 | + u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z <br> | |
158 | + wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq <br> | |
159 | + /HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5<br> | |
160 | + jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4<br> | |
161 | + MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9<br> | |
162 | + b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv <br> | |
163 | + aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k <br> | |
164 | + cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX <br> | |
165 | + gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI <br> | |
166 | + 2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl <br> | |
167 | + QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up <br> | |
168 | + hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk <br> | |
169 | + C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX <br> | |
170 | + LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+<br> | |
171 | + OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M <br> | |
172 | + pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s <br> | |
173 | + KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb <br> | |
174 | + N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA <br> | |
175 | + vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo <br> | |
176 | + G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ <br> | |
177 | + hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l <br> | |
178 | + EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=<br> | |
179 | + =Wi5D <br> | |
180 | + -----END PGP PUBLIC KEY BLOCK----- | |
181 | + </div> | |
182 | + After importing the keys, you can verify any tag with <div class=code>$ git tag -v <i>tagname</i></div> | |
183 | + </p> | |
150 | 184 | </div> |
151 | -<div><br></div> | |
152 | -<h2> | |
153 | -Installing Repo <br></h2> | |
154 | -<div><p>Repo is a tool that makes it easier to work with Git in the context of | |
155 | -Android. For more information about Repo, see <a | |
156 | -href="{@docRoot}source/git-repo.html">Using Repo and Git</a> | |
157 | -.<br></p> | |
158 | -To install, initialize, and configure Repo, follow these steps:<br><br></div> | |
159 | -<ol><li><span>Make sure you have a~/bindirectory in your home directory, and check to be sure that this bin directory is in your path:</span> | |
160 | -<br>$ cd ~<br><span><span>$ mkdir bin <br>$ echo $PATH <br></span> | |
161 | -</span> | |
162 | -</li> | |
163 | -<li><span>Download thereposcript and make sure it is executable:</span> | |
164 | -<br>$ curl http://android.git.kernel.org/repo >~/bin/repo <div>$ chmod a+x ~/bin/repo</div> | |
165 | -</li> | |
166 | -</ol> | |
167 | -<div><p><br></p> | |
168 | -<h2> | |
169 | -Initializing a Repo client <br></h2> | |
185 | + | |
186 | +<div> | |
187 | + <h2>Building the code</h2> | |
188 | + <p>To build the files, run envsetup, lunch, and make from within your working directory: | |
189 | + <div class=code>$ cd ~/<i>directory</i><br/> | |
190 | + $ source build/envsetup.sh<br/> | |
191 | + $ lunch<br/> | |
192 | + $ make<br/> | |
193 | + </div> | |
194 | + If your build fails because of a missing <tt>run-java-tool</tt>, try setting the <tt>ANDROID_JAVA_HOME</tt> environment variable before making. | |
195 | + <div class=code>$ export ANDROID_JAVA_HOME=$JAVA_HOME</div> | |
196 | + </p> | |
170 | 197 | </div> |
171 | -<div><ol><li><span>Create an empty directory to hold your working files:</span> | |
172 | -<span><br></span> | |
173 | -<span>$ mkdir mydroid</span> | |
174 | -<br><span>$ cd mydroid</span> | |
175 | -<br></li> | |
176 | -<li><span>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:</span> | |
177 | -<br><span>$ repo init</span> | |
178 | --u git://android.git.kernel.org/platform/manifest.git</li> | |
179 | -<ul><li><span>If you would like to check out a branch other than "master", specify it with -b, like:</span> | |
180 | -<br><span>$ repo init</span> | |
181 | --u git://android.git.kernel.org/platform/manifest.git -b cupcake <br></li> | |
182 | -</ul> | |
183 | -<li><span>When prompted, configure Repo with your real name and email address. If you plan to submit code, use an email address that is associated with a <a href="https://www.google.com/accounts">Google account</a> | |
184 | -.</span> | |
185 | -<br></li> | |
186 | -</ol> | |
187 | -<span><span>A successful initialization will end with a message such as</span> | |
188 | -<br><span>repo</span> | |
189 | -initialized in /mydroid</span> | |
190 | -<br><span><span><br>Your client directory should now contain a.repodirectory where files such as the manifest will be kept.</span> | |
191 | -<br><br></span> | |
192 | -<span><span><b>What will my name and email be used for?</b> | |
193 | -<br></span> | |
194 | -<span><br>To use the Gerrit code-review tool,</span> | |
195 | -<span>you will need an email address that is connected with a <a href="http://www.google.com/accounts">registered Google account</a> | |
196 | -(which does not have to be a Gmail address). Make sure this is</span> | |
197 | -<span>a live address</span> | |
198 | -<span>at which you can receive messages</span> | |
199 | -<span>.</span> | |
200 | -<span>The real name that you provide here will show up in attributions for your code submissions.</span> | |
201 | -</span> | |
202 | -<br></div> | |
203 | -<span><p><b>What is a manifest file?</b> | |
204 | -</p> | |
205 | -<p><span>The Android source files are divided among a number of different repositories.</span> | |
206 | -<span>A manifest</span> | |
207 | -<span>file contains a mapping of where the files from these repositories will be placed within your working directory w</span> | |
208 | -<span>hen you synchronize your files.<br></span> | |
209 | -</p> | |
210 | -<p><span><br></span> | |
211 | -</p> | |
212 | -</span> | |
213 | -<h2> | |
214 | -Getting the files</h2> | |
215 | -<div><span><span>To pull down files to your working directory from the repositories as specified in the default manifest, run</span> | |
216 | -<br><br>$ repo sync <i><br></i> | |
217 | -<br><span>For more about "repo sync" and other Repo commands, see</span> | |
218 | -<a href="{@docRoot}source/git-repo.html">Using Repo and Git</a> | |
219 | -<span>.</span> | |
220 | -<br><br><span>The Android source files will be located in your working | |
221 | -directory under their project names.</span> | |
222 | -</span> | |
223 | -<br></div> | |
224 | -<h2> | |
225 | -Verifying Git Tags</h2> | |
226 | -<span>Load the following public key into your GnuPG key database.The key is used to sign annotated tags that represent releases.</span> | |
227 | -<br><br></span> | |
228 | -<span>$ gpg --import <br><br></span> | |
229 | -<span><span>then paste the key(s) below, and press Control-D to end the input and process the keys.</span> | |
230 | -After importing the keys, you can verify any tag with <br><br></span> | |
231 | -<span>$ git tag -v <i>tagname</i> | |
232 | -</span> | |
233 | -<span><br><br><b><u>key 9AB10E78: "The Android Open Source Projectinitial-contribution@android.com"</u> | |
234 | -</b> | |
235 | -<br></span> | |
236 | -<pre>-----BEGIN PGP PUBLIC KEY BLOCK-----<br>Version: GnuPG v1.4.2.2 (GNU/Linux)<br><br>mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV <br>lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7<br>8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD <br>u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z <br>wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq <br>/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5<br>jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4<br>MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9<br>b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv <br>aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k <br>cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX <br>gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI <br>2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl <br>QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up <br>hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk <br>C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX <br>LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+<br>OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M <br>pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s <br>KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb <br>N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA <br>vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo <br>G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ <br>hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l <br>EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=<br>=Wi5D <br>-----END PGP PUBLIC KEY BLOCK-----<br></pre> | |
237 | -<span><br><h2> | |
238 | -Building the code</h2> | |
239 | -<span>To build the files, run make from within your working directory:</span> | |
240 | -<br><span>$ cd ~/mydroid</span> | |
241 | -<span><br>$ source build/envsetup.sh</span> | |
242 | -<span><br>$ lunch</span> | |
243 | -<span><br>$ make</span> | |
244 | -<br></span> | |
245 | -<p>If your build fails, complaining about a missing "run-java-tool", try setting the ANDROID_JAVA_HOME env var to $JAVA_HOME before making. E.g.,</p> | |
246 | -<p>$ export ANDROID_JAVA_HOME=$JAVA_HOME</p> | |
247 | -<h2> | |
248 | -Using an IDE</h2> | |
249 | -<ul><li><a href="{@docRoot}source/using-eclipse.html">Using Eclipse</a> | |
250 | -for Android platform development <br></li> | |
251 | -</ul> | |
252 | -<h2> | |
253 | -Troubleshooting</h2> | |
254 | -<p><span><b>ImportError: No module na</b> | |
255 | -<span><b>med</b> | |
256 | -</span> | |
257 | -<span><b>readline</b> | |
258 | -</span> | |
259 | -<b><br></b> | |
260 | -</span> | |
261 | -</p> | |
262 | -<p><span>Mac users getting this should install Python 2.5.2.</span> | |
263 | -</p> | |
264 | -<p><span>Linux users that installed Python from source, make sure the dependencies for libreadline are installed, and rebuild Python.</span> | |
265 | -</p> | |
266 | -<span><h2> | |
267 | -What's next?</h2> | |
268 | -</span> | |
269 | -<span>To learn about reporting an issue and searching previously reported issues,</span> | |
270 | -<span>see</span> | |
271 | -<a href="{@docRoot}source/report-bugs.html">Report bugs</a> | |
272 | -<span>.</span> | |
273 | -<span>For information about editing the files and uploading changes to the | |
274 | -code-review server, see <a href="{@docRoot}source/submit-patches.html">Contribute</a> | |
275 | -.</span> | |
198 | + | |
199 | +<div> | |
200 | + <h2>What's next?</h2> | |
201 | + <p>See <a href="{@docRoot}source/using-eclipse.html">Using Eclipse</a> for instructions on how to use an IDE for Android platform development. To learn about reporting an issue and searching previously reported issues, see <a href="{@docRoot}source/report-bugs.html">Report bugs</a>. For information about editing the files and uploading changes to the code-review server, see <a href="{@docRoot}source/submit-patches.html">Contribute</a>. | |
276 | 202 | </div> |