1page.title=Running Builds 2@jd:body 3 4<!-- 5 Copyright 2015 The Android Open Source Project 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18--> 19<div id="qv-wrapper"> 20 <div id="qv"> 21 <h2>In this document</h2> 22 <ol id="auto-toc"> 23 </ol> 24 </div> 25</div> 26 27<p>This page complements the main page about 28<a href="building.html">Building the System</a> with 29information that is specific to individual devices.</p> 30 31<h2 class="nexus-devices">Nexus devices</h2> 32<p> 33It is possible to build for Nexus devices using the AOSP 34builds and the relevant hardware-specific binaries. 35For a list of available Android builds and the Nexus devices 36they can be installed on, see <a 37href="build-numbers.html#source-code-tags-and-builds">Source 38Code, Tags, and Builds</a>. 39</p> 40 41<p class="note"> 42<b>Note:</b> Due to hardware differences, do not use 4.1.1 on a Nexus 7 that 43was originally sold with 4.1.2 or newer.</p> 44 45<h2 class="other-devices">Other devices</h2> 46<p>The Motorola Xoom can be used in the Wi-Fi configuration "wingray" 47sold in the USA, with Android 4.1.2. Graphics and audio are functional 48as well as Wi-Fi and Bluetooth and the orientation sensors.</p> 49<p>In addition, <a href="http://pandaboard.org">PandaBoard</a> a.k.a. "panda" can be used 50in the jb-mr1-dev-plus-aosp branch, but is considered experimental. 51The specific details to use a PandaBoard with the Android Open-Source Project 52are in the file <code>device/ti/panda/README</code> in the source tree.</p> 53 54<h2 id="building-fastboot-and-adb">Building fastboot and adb</h2> 55<p>If you don't already have those tools, fastboot and adb can be built with 56the regular build system. Follow the instructions on the page about 57<a href="building.html">Building a System</a>, and replace the main 58<code>make</code> command with:</p> 59<pre><code>$ make fastboot adb 60</code></pre> 61 62<h2 id="booting-into-fastboot-mode">Booting into fastboot mode</h2> 63<p>During a cold boot, the following key combinations can be used to boot into fastboot mode, 64which is a mode in the bootloader that can be used to flash the devices:</p> 65<table> 66<thead> 67<tr> 68<th>Device</th> 69<th>Keys</th> 70</tr> 71</thead> 72<tbody> 73<tr> 74<td>angler</td> 75<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 76</tr> 77<tr> 78<td>bullhead</td> 79<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 80</tr> 81<tr> 82<td>shamu</td> 83<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 84</tr> 85<tr> 86<td>fugu</td> 87<td>Press and hold <em>Power</em></td> 88</tr> 89<tr> 90<td>volantis</td> 91<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 92</tr> 93<tr> 94<td>hammerhead</td> 95<td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press 96and hold <em>Power</em></td> 97</tr> 98<tr> 99<td>flo</td> 100<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 101</tr> 102<tr> 103<td>deb</td> 104<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 105</tr> 106<tr> 107<td>manta</td> 108<td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press and hold <em>Power</em></td> 109</tr> 110<tr> 111<td>mako</td> 112<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 113</tr> 114<tr> 115<td>grouper</td> 116<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 117</tr> 118<tr> 119<td>tilapia</td> 120<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 121</tr> 122<tr> 123<td>phantasm</td> 124<td>Power the device, cover it with one hand after the LEDs light up and until they turn red</td> 125</tr> 126<tr> 127<td>maguro</td> 128<td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press and hold <em>Power</em></td> 129</tr> 130<tr> 131<td>toro</td> 132<td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press and hold <em>Power</em></td> 133</tr> 134<tr> 135<td>toroplus</td> 136<td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press and hold <em>Power</em></td> 137</tr> 138<tr> 139<td>panda</td> 140<td>Press and hold <em>Input</em>, then press <em>Power</em></td> 141</tr> 142<tr> 143<td>wingray</td> 144<td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> 145</tr> 146<tr> 147<td>crespo</td> 148<td>Press and hold <em>Volume Up</em>, then press and hold <em>Power</em></td> 149</tr> 150<tr> 151<td>crespo4g</td> 152<td>Press and hold <em>Volume Up</em>, then press and hold <em>Power</em></td> 153</tr> 154</tbody> 155</table> 156<p>Also, the command <code>adb reboot bootloader</code> can be used to reboot from 157Android directly into the bootloader with no key combinations.</p> 158<h2 id="unlocking-the-bootloader">Unlocking the bootloader</h2> 159<p>It's only possible to flash a custom system if the bootloader allows it.</p> 160<p>The bootloader is locked by default. With the device in fastboot mode, the 161bootloader is unlocked with</p> 162<pre><code>$ fastboot oem unlock 163</code></pre> 164<p>The procedure must be confirmed on-screen, and deletes the user data for 165privacy reasons. It only needs to be run once.</p> 166<p>All data on the phone is erased, i.e. both the applications' private data 167and the shared data that is accessible over USB, including photos and 168movies. Be sure to make a backup of any precious files you have before 169unlocking the bootloader.</p> 170<p>On Nexus 10, after unlocking the bootloader, the internal storage is 171left unformatted and must be formatted with</p> 172<pre><code>$ fastboot format cache 173$ fastboot format userdata 174</code></pre> 175<p>The bootloader can be locked back with</p> 176<pre><code>$ fastboot oem lock 177</code></pre> 178<p>Note that this erases user data on Xoom (including the shared USB data).</p> 179<h2 id="obtaining-proprietary-binaries">Obtaining proprietary binaries</h2> 180<p>The Android Open-Source Project can't be used 181from pure source code only, and requires additional hardware-related proprietary 182libraries to run, specifically for hardware graphics acceleration.</p> 183<p>Official binaries for the supported devices running tagged AOSP release 184branches can be downloaded from <a 185href="https://developers.google.com/android/nexus/drivers">Google's Nexus 186driver page</a>. These add access to additional hardware capabilities with 187non-open source code. To instead build the AOSP master branch, use the <a 188href="https://developers.google.com/android/nexus/blobs-preview">Binaries 189Preview for Nexus Devices</a>.</p> 190<p>When building the master branch for a device, the binaries for the most 191recent numbered release or with the most recent date are the ones that should 192be used.</p> 193<h3 id="extracting-the-proprietary-binaries">Extracting the proprietary binaries</h3> 194<p>Each set of binaries comes as a self-extracting script in a compressed archive. 195After uncompressing each archive, run the included self-extracting script 196from the root of the source tree, confirm that you agree to the terms of the 197enclosed license agreement, and the binaries and their matching makefiles 198will get installed in the <code>vendor/</code> hierarchy of the source tree.</p> 199<h3 id="cleaning-up-when-adding-proprietary-binaries">Cleaning up when adding proprietary binaries</h3> 200<p>In order to make sure that the newly installed binaries are properly 201taken into account after being extracted, the existing output of any previous 202build needs to be deleted with</p> 203<pre><code>$ make clobber 204</code></pre> 205<h2 id="picking-and-building-the-configuration-that-matches-a-device">Picking and building the configuration that matches a device</h2> 206<p>The recommended builds for the various devices are available through 207the lunch menu, accessed when running the <code>lunch</code> command with no arguments. Factory images and binaries for Nexus devices can be downloaded from:</p> 208<p><a href="https://developers.google.com/android/nexus/images">https://developers.google.com/android/nexus/images</a></p> 209<p><a href="https://developers.google.com/android/nexus/drivers">https://developers.google.com/android/nexus/drivers</a></p> 210<table> 211<thead> 212<tr> 213 <th>Device</th> 214<th>Code name</th> 215<th>Build configuration</th> 216</tr> 217</thead> 218<tbody> 219<tr> 220 <td>Nexus 6P</td> 221<td>angler</td> 222<td>aosp_angler-userdebug</td> 223</tr> 224<tr> 225 <td>Nexus 5X</td> 226<td>bullhead</td> 227<td>aosp_bullhead-userdebug</td> 228</tr> 229<tr> 230 <td>Nexus 6</td> 231<td>shamu</td> 232<td>aosp_shamu-userdebug</td> 233</tr> 234<tr> 235 <td>Nexus Player</td> 236<td>fugu</td> 237<td>aosp_fugu-userdebug</td> 238</tr> 239<tr> 240 <td>Nexus 9</td> 241<td>volantis (flounder)</td> 242<td>aosp_flounder-userdebug</td> 243</tr> 244<tr> 245 <td>Nexus 5 (GSM/LTE)</td> 246<td>hammerhead</td> 247<td>aosp_hammerhead-userdebug</td> 248</tr> 249<tr> 250 <td>Nexus 7 (Wi-Fi)</td> 251<td>razor (flo)</td> 252<td>aosp_flo-userdebug</td> 253</tr> 254<tr> 255 <td>Nexus 7 (Mobile)</td> 256<td>razorg (deb)</td> 257<td>aosp_deb-userdebug</td> 258</tr> 259<tr> 260 <td>Nexus 10</td> 261<td>mantaray (manta)</td> 262<td>full_manta-userdebug</td> 263</tr> 264<tr> 265 <td>Nexus 4</td> 266<td>occam (mako)</td> 267<td>full_mako-userdebug</td> 268</tr> 269<tr> 270 <td>Nexus 7 (Wi-Fi)</td> 271<td>nakasi (grouper)</td> 272<td>full_grouper-userdebug</td> 273</tr> 274<tr> 275 <td>Nexus 7 (Mobile)</td> 276<td>nakasig (tilapia)</td> 277<td>full_tilapia-userdebug</td> 278</tr> 279<tr> 280 <td>Galaxy Nexus (GSM/HSPA+)</td> 281<td>yakju (maguro)</td> 282<td>full_maguro-userdebug</td> 283</tr> 284<tr> 285 <td>Galaxy Nexus (Verizon)</td> 286<td>mysid (toro)</td> 287<td>aosp_toro-userdebug</td> 288</tr> 289<tr> 290 <td>Galaxy Nexus (Experimental)</td> 291<td>mysidspr (toroplus)</td> 292<td>aosp_toroplus-userdebug</td> 293</tr> 294<tr> 295 <td>PandaBoard (Archived)</td> 296<td>panda</td> 297<td>aosp_panda-userdebug</td> 298</tr> 299<tr> 300 <td>Motorola Xoom (U.S. Wi-Fi)</td> 301<td>wingray</td> 302<td>full_wingray-userdebug</td> 303</tr> 304<tr> 305 <td>Nexus S</td> 306<td>soju (crespo)</td> 307<td>full_crespo-userdebug</td> 308</tr> 309<tr> 310 <td>Nexus S 4G</td> 311<td>sojus (crespo4g)</td> 312<td>full_crespo4g-userdebug</td> 313</tr> 314</tbody> 315</table> 316<p>Do not use 4.1.1 on a Nexus 7 that was originally sold with 4.1.2 317or newer.</p> 318<h2 id="flashing-a-device">Flashing a device</h2> 319<p>Set the device in fastboot mode if necessary (see above).</p> 320<p>An entire Android system can be flashed in a single command: this writes 321the boot, recovery and system partitions together after verifying that the 322system being flashed is compatible with the installed bootloader and radio, 323and reboots the system. This also erases all the user data, similarly to 324<code>fastboot oem unlock</code> mentioned earlier.</p> 325<pre><code>$ fastboot -w flashall 326</code></pre> 327<p>Note that filesystems created via fastboot on Motorola Xoom aren't working 328optimally, and it is strongly recommended to re-create them through recovery</p> 329<pre><code>$ adb reboot recovery 330</code></pre> 331<p>Once in recovery, open the menu (press Power + Volume Up), wipe the cache 332partition, then wipe data.</p> 333<h2 id="restoring-a-device-to-its-original-factory-state">Restoring a device to 334its original factory state</h2> 335<p>Factory images for Nexus 5, Nexus 10, Nexus 4, Nexus Q, Nexus 7, Galaxy 336Nexus (GSM/HSPA+ "yakju" and "takju", 337and CDMA/LTE "mysid" and "mysidspr"), Nexus S, and Nexus S 4G are available 338from <a href="https://developers.google.com/android/nexus/images">Google's 339factory image</a> page.</p> 340<p>Factory images for the Motorola Xoom are distributed directly by Motorola.</p> 341