135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lypage.title=Building the System
235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly@jd:body
335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<!--
5768b82a9dfbdd8504eae2736d283a60a37c7a547Clay Murphy    Copyright 2013 The Android Open Source Project
635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    Licensed under the Apache License, Version 2.0 (the "License");
835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    you may not use this file except in compliance with the License.
935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    You may obtain a copy of the License at
1035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
1135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly        http://www.apache.org/licenses/LICENSE-2.0
1235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
1335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    Unless required by applicable law or agreed to in writing, software
1435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    distributed under the License is distributed on an "AS IS" BASIS,
1535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    See the License for the specific language governing permissions and
1735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    limitations under the License.
1835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly-->
1935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<div id="qv-wrapper">
2035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly  <div id="qv">
2135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    <h2>In this document</h2>
2235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    <ol id="auto-toc">
2335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    </ol>
2435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly  </div>
2535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</div>
2635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
2735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyThe following instructions to build the Android source tree apply to all branches, including master. 
2835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
2935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<h2 id="choosing-a-branch">Choosing a Branch</h2>
3035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Some of the requirements for your build environment are determined by which
3135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lyversion of the source code you plan to compile. See
3235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<a href="build-numbers.html">Codenames, Tags, and Build Numbers</a> for a full listing of branches you may
3335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lychoose from. You may also choose to download and build the latest source code
3435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly(called "master"), in which case you will simply omit the branch specification
3535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lywhen you initialize the repository.</p>
3635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Once you have selected a branch, follow the appropriate instructions below to
3735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lyset up your build environment.</p>
3835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
3935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
4035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>The basic sequence of build commands is as follows:</p>
4135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<h2 id="initialize">Initialize</h2>
4235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Initialize the environment with the <code>envsetup.sh</code> script. Note
4335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lythat replacing "source" with a single dot saves a few characters,
4435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lyand the short form is more commonly used in documentation.</p>
4535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ source build/envsetup.sh
4635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
4735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>or</p>
4835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ . build/envsetup.sh
4935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
5035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<h2 id="choose-a-target">Choose a Target</h2>
5135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Choose which target to build with <code>lunch</code>.  The exact configuration can be passed as
5235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lyan argument, e.g. </p>
53d8fbf20170094f7e914296371a87cfdb57dc6999Jean-Baptiste Queru<pre><code>$ lunch aosp_arm-eng
5435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
5535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>The example above refers to a complete build for the emulator, with all debugging enabled.</p>
5635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>If run with no arguments <code>lunch</code> will prompt you to choose a target from the menu. </p>
5735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>All build targets take the form BUILD-BUILDTYPE, where the BUILD is a codename
5835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lyreferring to the particular feature combination. Here's a partial list:</p>
5935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<table>
6035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<thead>
6135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tr>
6235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<th>Build name</th>
6335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<th>Device</th>
6435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<th>Notes</th>
6535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tr>
6635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</thead>
6735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tbody>
6835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tr>
69d8fbf20170094f7e914296371a87cfdb57dc6999Jean-Baptiste Queru<td>aosp_arm</td>
70d8fbf20170094f7e914296371a87cfdb57dc6999Jean-Baptiste Queru<td>ARM emulator</td>
71d8fbf20170094f7e914296371a87cfdb57dc6999Jean-Baptiste Queru<td>AOSP, fully configured with all languages, apps, input methods</td>
7235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tr>
7335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tr>
74d8fbf20170094f7e914296371a87cfdb57dc6999Jean-Baptiste Queru<td>aosp_maguro</td>
7535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<td>maguro</td>
76d8fbf20170094f7e914296371a87cfdb57dc6999Jean-Baptiste Queru<td>AOSP, running on Galaxy Nexus GSM/HSPA+ ("maguro")</td>
7735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tr>
7835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tr>
79d8fbf20170094f7e914296371a87cfdb57dc6999Jean-Baptiste Queru<td>aosp_panda</td>
8035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<td>panda</td>
81d8fbf20170094f7e914296371a87cfdb57dc6999Jean-Baptiste Queru<td>AOSP, running on PandaBoard ("panda")</td>
8235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tr>
8335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tbody>
8435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</table>
8535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>and the BUILDTYPE is one of the following:</p>
8635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<table>
8735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<thead>
8835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tr>
8935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<th>Buildtype</th>
9035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<th>Use</th>
9135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tr>
9235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</thead>
9335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tbody>
9435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tr>
9535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<td>user</td>
9635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<td>limited access; suited for production</td>
9735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tr>
9835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tr>
9935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<td>userdebug</td>
10035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<td>like "user" but with root access and debuggability; preferred for debugging</td>
10135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tr>
10235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<tr>
10335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<td>eng</td>
10435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<td>development configuration with additional debugging tools</td>
10535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tr>
10635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</tbody>
10735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</table>
10835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>For more information about building for and running on actual hardware, see
10935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<a href="building-devices.html">Building for Devices</a>.</p>
11035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<h2 id="build-the-code">Build the Code</h2>
11135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Build everything with <code>make</code>. GNU make can handle parallel
11235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lytasks with a <code>-jN</code> argument, and it's common to use a number of
11335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lytasks N that's between 1 and 2 times the number of hardware
11435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lythreads on the computer being used for the build. E.g. on a
11535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lydual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core),
11635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lythe fastest builds are made with commands between <code>make -j16</code> and
11735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<code>make -j32</code>.</p>
11835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ make -j4
11935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
12035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<h2 id="run-it">Run It!</h2>
12135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>You can either run your build on an emulator or flash it on a device. Please note that you have already selected your build target with <code>lunch</code>, and it is unlikely at best to run on a different target than it was built for.</p>
12235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<h3 id="flash-a-device">Flash a Device</h3>
12335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>To flash a device, you will need to use <code>fastboot</code>, which should be included in your path after a successful build. Place the device in fastboot mode either manually by holding the appropriate key combination at boot, or from the shell with</p>
12435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ adb reboot bootloader
12535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
12635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Once the device is in fastboot mode, run </p>
12735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ fastboot flashall -w
12835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
12935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>The <code>-w</code> option wipes the <code>/data</code> partition on the device; this is useful for your first time flashing a particular device, but is otherwise unnecessary.</p>
13035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>For more information about building for and running on actual hardware, see
13135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<a href="building-devices.html">Building for Devices.</a></p>
13235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<h3 id="emulate-an-android-device">Emulate an Android Device</h3>
13335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>The emulator is added to your path automatically by the build process. To run the emulator, type</p>
13435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ emulator
13535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
136be488c451eaea60cf5b9559b4ed477abcd65897fClay Murphy<h2 id="using-ccache">Using ccache</h2>
13735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>ccache is a compiler cache for C and C++ that can help make builds faster.
13835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyIn the root of the source tree, do the following:</p>
13935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ export USE_CCACHE=1
14035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly$ export CCACHE_DIR=/&lt;path_of_your_choice&gt;/.ccache
14135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly$ prebuilts/misc/linux-x86/ccache/ccache -M 50G
14235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
14335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>The suggested cache size is 50-100G.</p>
14435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>You can watch ccache being used by doing the following:</p>
14535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s
14635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
14735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>On OSX, you should replace <code>linux-x86</code> with <code>darwin-x86</code>.</p>
14835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>When using Ice Cream Sandwich (4.0.x) or older, you should replace
14935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<code>prebuilts/misc</code> with <code>prebuilt</code>.</p>
150be488c451eaea60cf5b9559b4ed477abcd65897fClay Murphy<h2 id="troubleshooting-common-build-errors">Troubleshooting Common Build Errors</h2>
151be488c451eaea60cf5b9559b4ed477abcd65897fClay Murphy<h3 id="wrong-java-version">Wrong Java Version</h3>
152be488c451eaea60cf5b9559b4ed477abcd65897fClay Murphy<p>If you are attempting to build a version of Android inconsistent with your
153be488c451eaea60cf5b9559b4ed477abcd65897fClay Murphyversion of Java, <code>make</code> will abort with a message such as</p>
15435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>************************************************************
15535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyYou are attempting to build with the incorrect version
15635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lyof java.
15735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
15835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyYour version is: WRONG_VERSION.
15935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyThe correct version is: RIGHT_VERSION.
16035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly
16135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyPlease follow the machine setup instructions at
16235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly    https://source.android.com/source/download.html
16335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly************************************************************
16435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
165ad4d7f64b426563f8ec33dfe15e6218ed44b4b55Clay Murphy<p>This may be caused by:</p>
16635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<ul>
16735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li>
168ad4d7f64b426563f8ec33dfe15e6218ed44b4b55Clay Murphy<p>Failing to install the correct JDK as specified in <a href="initializing.html">Initializing the Build Environment</a>.</p>
16935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li>
17035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li>
171ad4d7f64b426563f8ec33dfe15e6218ed44b4b55Clay Murphy<p>Another JDK previously installed appearing in your path. Prepend the correct JDK to the beginning of your PATH or remove the problematic JDK.</p>
17235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li>
17335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</ul>
174be488c451eaea60cf5b9559b4ed477abcd65897fClay Murphy<h3 id="python-version-3">Python Version 3</h3>
17535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Repo is built on particular functionality from Python 2.x and is unfortunately incompatible with Python 3.  In order to use repo, please install Python 2.x:</p>
17635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>$ apt-get install python
17735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
178be488c451eaea60cf5b9559b4ed477abcd65897fClay Murphy<h3 id="case-insensitive-filesystem">Case Insensitive Filesystem</h3>
17935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>If you are building on an HFS filesystem on Mac OS X, you may encounter an error such as</p>
18035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<pre><code>************************************************************
18135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyYou are building on a case-insensitive filesystem.
18235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyPlease move your source tree to a case-sensitive filesystem.
18335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly************************************************************
18435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</code></pre>
18535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Please follow the instructions in <a href="initializing.html">Initializing the Build Environment</a> for creating a case-sensitive disk image.</p>
186be488c451eaea60cf5b9559b4ed477abcd65897fClay Murphy<h3 id="no-usb-permission">No USB Permission</h3>
18735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>On most Linux systems, unprivileged users cannot access USB ports by default. If you see a permission denied error, follow the instructions
18835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<a href="initializing.html">Initializing the Build Environment</a> for configuring USB access.  </p>
18935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>If adb was already running and cannot connect to the device after
19035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lygetting those rules set up, it can be killed with <code>adb kill-server</code>.
19135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert LyThat will cause adb to restart with the new configuration.</p>
192