Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 1 | page.title=Building for devices |
| 2 | @jd:body |
| 3 | |
| 4 | <!-- |
Clay Murphy | 768b82a | 2013-11-12 11:32:41 -0800 | [diff] [blame] | 5 | Copyright 2013 The Android Open Source Project |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 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-running.html">Building and Running</a> with |
| 29 | information that is specific to individual devices.</p> |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 30 | |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 31 | <p>With the current release, it is possible to build for |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 32 | Nexus 4, Nexus 7, and for some variants of Galaxy Nexus. |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 33 | The exact level of functionality for each device depends on the availability |
| 34 | of the relevant proprietary hardware-specific binaries.</p> |
Jean-Baptiste Queru | 3b41843 | 2013-07-11 15:44:44 -0700 | [diff] [blame] | 35 | <p>For Nexus 4 and Nexus 7, all configurations can be used, |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 36 | and all the hardware is functional. |
| 37 | Due to hardware differences, do not use 4.1.1 on a Nexus 7 that |
| 38 | was originally sold with 4.1.2 or newer.</p> |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 39 | <p>All configurations of Nexus 10 "manta" can be used with 4.2.2. |
| 40 | On those devices, graphics, audio, |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 41 | Wi-Fi, Bluetooth, camera, NFC, GPS and orientation sensors are functional.</p> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 42 | <p>The variants of Galaxy Nexus that can be used are the GSM/HSPA+ configuration |
| 43 | "maguro" (only if it was originally sold with a "yakju" or "takju" operating |
| 44 | system) and the VZW CDMA/LTE configuration "toro". On those devices, graphics |
| 45 | and audio are functional, as well as Wi-Fi, Bluetooth, and access to the |
| 46 | respective cellular networks. NFC and the orientation sensors are functional.</p> |
| 47 | <p>The Sprint CDMA/LTE configuration "toroplus" of Galaxy Nexus is supported |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 48 | experimentally, in the jb-mr1-dev-plus-aosp branch. On that configuration, |
| 49 | the cellular network is not functional, |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 50 | and the other peripherals work like they do on "toro".</p> |
| 51 | <p>The Motorola Xoom can be used in the Wi-Fi configuration "wingray" |
| 52 | sold in the USA, with Android 4.1.2. Graphics and audio are functional |
| 53 | as well as Wi-Fi and Bluetooth and the orientation sensors.</p> |
| 54 | <p>All configurations of Nexus S and Nexus S 4G can be used with Android 4.1.2. |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 55 | On those devices all the hardware is functional.</p> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 56 | <p>In addition, <a href="http://pandaboard.org">PandaBoard</a> a.k.a. "panda" can be used |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 57 | in the jb-mr1-dev-plus-aosp branch, but is considered experimental. |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 58 | The specific details to use a PandaBoard with the Android Open-Source Project |
| 59 | are in the file <code>device/ti/panda/README</code> in the source tree.</p> |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 60 | |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 61 | <h2 id="building-fastboot-and-adb">Building fastboot and adb</h2> |
| 62 | <p>If you don't already have those tools, fastboot and adb can be built with |
| 63 | the regular build system. Follow the instructions on the page about |
| 64 | <a href="building-running.html">Building and Running</a>, and replace the main <code>make</code> command with</p> |
| 65 | <pre><code>$ make fastboot adb |
| 66 | </code></pre> |
| 67 | <h2 id="booting-into-fastboot-mode">Booting into fastboot mode</h2> |
| 68 | <p>During a cold boot, the following key combinations can be used to boot into fastboot mode, |
| 69 | which is a mode in the bootloader that can be used to flash the devices:</p> |
| 70 | <table> |
| 71 | <thead> |
| 72 | <tr> |
| 73 | <th>Device</th> |
| 74 | <th>Keys</th> |
| 75 | </tr> |
| 76 | </thead> |
| 77 | <tbody> |
| 78 | <tr> |
Clay Murphy | e75e3fe | 2013-11-06 17:15:35 -0800 | [diff] [blame] | 79 | <td>hammerhead</td> |
| 80 | <td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press |
| 81 | and hold <em>Power</em></td> |
| 82 | </tr> |
| 83 | <tr> |
Jean-Baptiste Queru | 3b41843 | 2013-07-11 15:44:44 -0700 | [diff] [blame] | 84 | <td>flo</td> |
| 85 | <td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> |
| 86 | </tr> |
| 87 | <tr> |
| 88 | <td>deb</td> |
| 89 | <td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> |
| 90 | </tr> |
| 91 | <tr> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 92 | <td>manta</td> |
| 93 | <td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press and hold <em>Power</em></td> |
| 94 | </tr> |
| 95 | <tr> |
| 96 | <td>mako</td> |
| 97 | <td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> |
| 98 | </tr> |
| 99 | <tr> |
| 100 | <td>grouper</td> |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 101 | <td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 102 | </tr> |
| 103 | <tr> |
| 104 | <td>tilapia</td> |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 105 | <td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 106 | </tr> |
| 107 | <tr> |
| 108 | <td>phantasm</td> |
| 109 | <td>Power the device, cover it with one hand after the LEDs light up and until they turn red</td> |
| 110 | </tr> |
| 111 | <tr> |
| 112 | <td>maguro</td> |
| 113 | <td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press and hold <em>Power</em></td> |
| 114 | </tr> |
| 115 | <tr> |
| 116 | <td>toro</td> |
| 117 | <td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press and hold <em>Power</em></td> |
| 118 | </tr> |
| 119 | <tr> |
| 120 | <td>toroplus</td> |
| 121 | <td>Press and hold both <em>Volume Up</em> and <em>Volume Down</em>, then press and hold <em>Power</em></td> |
| 122 | </tr> |
| 123 | <tr> |
| 124 | <td>panda</td> |
| 125 | <td>Press and hold <em>Input</em>, then press <em>Power</em></td> |
| 126 | </tr> |
| 127 | <tr> |
| 128 | <td>wingray</td> |
| 129 | <td>Press and hold <em>Volume Down</em>, then press and hold <em>Power</em></td> |
| 130 | </tr> |
| 131 | <tr> |
| 132 | <td>crespo</td> |
| 133 | <td>Press and hold <em>Volume Up</em>, then press and hold <em>Power</em></td> |
| 134 | </tr> |
| 135 | <tr> |
| 136 | <td>crespo4g</td> |
| 137 | <td>Press and hold <em>Volume Up</em>, then press and hold <em>Power</em></td> |
| 138 | </tr> |
| 139 | </tbody> |
| 140 | </table> |
| 141 | <p>Also, the command <code>adb reboot bootloader</code> can be used to reboot from |
| 142 | Android directly into the bootloader with no key combinations.</p> |
| 143 | <h2 id="unlocking-the-bootloader">Unlocking the bootloader</h2> |
| 144 | <p>It's only possible to flash a custom system if the bootloader allows it.</p> |
| 145 | <p>The bootloader is locked by default. With the device in fastboot mode, the |
| 146 | bootloader is unlocked with</p> |
| 147 | <pre><code>$ fastboot oem unlock |
| 148 | </code></pre> |
| 149 | <p>The procedure must be confirmed on-screen, and deletes the user data for |
| 150 | privacy reasons. It only needs to be run once.</p> |
| 151 | <p>All data on the phone is erased, i.e. both the applications' private data |
| 152 | and the shared data that is accessible over USB, including photos and |
| 153 | movies. Be sure to make a backup of any precious files you have before |
| 154 | unlocking the bootloader.</p> |
| 155 | <p>On Nexus 10, after unlocking the bootloader, the internal storage is |
| 156 | left unformatted and must be formatted with</p> |
| 157 | <pre><code>$ fastboot format cache |
| 158 | $ fastboot format userdata |
| 159 | </code></pre> |
| 160 | <p>The bootloader can be locked back with</p> |
| 161 | <pre><code>$ fastboot oem lock |
| 162 | </code></pre> |
| 163 | <p>Note that this erases user data on Xoom (including the shared USB data).</p> |
| 164 | <h2 id="obtaining-proprietary-binaries">Obtaining proprietary binaries</h2> |
| 165 | <p>The Android Open-Source Project can't be used |
| 166 | from pure source code only, and requires additional hardware-related proprietary |
| 167 | libraries to run, specifically for hardware graphics acceleration.</p> |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 168 | <p>Official binaries for the supported devices can be downloaded from |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 169 | <a href="https://developers.google.com/android/nexus/drivers">Google's Nexus driver page</a>, |
| 170 | which add access to additional hardware capabilities with non-Open-Source code.</p> |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 171 | <p>When building the master branch for a device, the binaries for the most |
| 172 | recent numbered release or with the most recent date |
| 173 | are the ones that should be used.</p> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 174 | <h3 id="extracting-the-proprietary-binaries">Extracting the proprietary binaries</h3> |
| 175 | <p>Each set of binaries comes as a self-extracting script in a compressed archive. |
| 176 | After uncompressing each archive, run the included self-extracting script |
| 177 | from the root of the source tree, confirm that you agree to the terms of the |
| 178 | enclosed license agreement, and the binaries and their matching makefiles |
| 179 | will get installed in the <code>vendor/</code> hierarchy of the source tree.</p> |
| 180 | <h3 id="cleaning-up-when-adding-proprietary-binaries">Cleaning up when adding proprietary binaries</h3> |
| 181 | <p>In order to make sure that the newly installed binaries are properly |
| 182 | taken into account after being extracted, the existing output of any previous |
| 183 | build needs to be deleted with</p> |
| 184 | <pre><code>$ make clobber |
| 185 | </code></pre> |
| 186 | <h2 id="picking-and-building-the-configuration-that-matches-a-device">Picking and building the configuration that matches a device</h2> |
| 187 | <p>The steps to configure and build the Android Open-Source Project |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 188 | are described in the page about <a href="building.html">Building</a>.</p> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 189 | <p>The recommended builds for the various devices are available through |
| 190 | the lunch menu, accessed when running the <code>lunch</code> command with no arguments:</p> |
| 191 | <table> |
| 192 | <thead> |
| 193 | <tr> |
| 194 | <th>Device</th> |
| 195 | <th>Branch</th> |
| 196 | <th>Build configuration</th> |
| 197 | </tr> |
| 198 | </thead> |
| 199 | <tbody> |
| 200 | <tr> |
Clay Murphy | e75e3fe | 2013-11-06 17:15:35 -0800 | [diff] [blame] | 201 | <td>hammerhead</td> |
| 202 | <td>android-4.4_r1</td> |
| 203 | <td>aosp_hammerhead-userdebug</td> |
| 204 | </tr> |
| 205 | <tr> |
Jean-Baptiste Queru | 3b41843 | 2013-07-11 15:44:44 -0700 | [diff] [blame] | 206 | <td>flo</td> |
Clay Murphy | 2cda7c1 | 2013-09-23 11:51:15 -0700 | [diff] [blame] | 207 | <td>android-4.3_r2.3</td> |
Jean-Baptiste Queru | 3b41843 | 2013-07-11 15:44:44 -0700 | [diff] [blame] | 208 | <td>aosp_flo-userdebug</td> |
| 209 | </tr> |
| 210 | <tr> |
| 211 | <td>deb</td> |
The Android Open Source Project | 4f0728f | 2013-10-08 13:56:29 -0700 | [diff] [blame] | 212 | <td>android-4.3.1_r1</td> |
Jean-Baptiste Queru | 3b41843 | 2013-07-11 15:44:44 -0700 | [diff] [blame] | 213 | <td>aosp_deb-userdebug</td> |
| 214 | </tr> |
| 215 | <tr> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 216 | <td>manta</td> |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 217 | <td>android-4.2.2_r1</td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 218 | <td>full_manta-userdebug</td> |
| 219 | </tr> |
| 220 | <tr> |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 221 | <td>mako</td> |
Clay Murphy | c0fff38 | 2013-09-23 11:08:07 -0700 | [diff] [blame] | 222 | <td>android-4.3_r1.1</td> |
| 223 | <td>full_mako-userdebug</td> |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 224 | </tr> |
| 225 | <tr> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 226 | <td>grouper</td> |
Clay Murphy | c0fff38 | 2013-09-23 11:08:07 -0700 | [diff] [blame] | 227 | <td>android-4.3_r1.1</td> |
| 228 | <td>full_grouper-userdebug</td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 229 | </tr> |
| 230 | <tr> |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 231 | <td>tilapia</td> |
Clay Murphy | c0fff38 | 2013-09-23 11:08:07 -0700 | [diff] [blame] | 232 | <td>android-4.3_r1.1</td> |
| 233 | <td>full_tilapia-userdebug</td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 234 | </tr> |
| 235 | <tr> |
| 236 | <td>maguro</td> |
Clay Murphy | c0fff38 | 2013-09-23 11:08:07 -0700 | [diff] [blame] | 237 | <td>android-4.3_r1.1</td> |
| 238 | <td>full_maguro-userdebug</td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 239 | </tr> |
| 240 | <tr> |
| 241 | <td>toro</td> |
Jean-Baptiste Queru | 125a986 | 2013-07-22 11:42:59 -0700 | [diff] [blame] | 242 | <td>android-4.3_r1 or master</td> |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 243 | <td>aosp_toro-userdebug</td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 244 | </tr> |
| 245 | <tr> |
| 246 | <td>toroplus</td> |
| 247 | <td>master</td> |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 248 | <td>aosp_toroplus-userdebug</td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 249 | </tr> |
| 250 | <tr> |
| 251 | <td>panda</td> |
| 252 | <td>master</td> |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 253 | <td>aosp_panda-userdebug</td> |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 254 | </tr> |
| 255 | <tr> |
| 256 | <td>wingray</td> |
| 257 | <td>android-4.1.2_r1</td> |
| 258 | <td>full_wingray-userdebug</td> |
| 259 | </tr> |
| 260 | <tr> |
| 261 | <td>crespo</td> |
| 262 | <td>android-4.1.2_r1</td> |
| 263 | <td>full_crespo-userdebug</td> |
| 264 | </tr> |
| 265 | <tr> |
| 266 | <td>crespo4g</td> |
| 267 | <td>android-4.1.2_r1</td> |
| 268 | <td>full_crespo4g-userdebug</td> |
| 269 | </tr> |
| 270 | </tbody> |
| 271 | </table> |
| 272 | <p>Do not use 4.1.1 on a Nexus 7 that was originally sold with 4.1.2 |
| 273 | or newer.</p> |
| 274 | <h2 id="flashing-a-device">Flashing a device</h2> |
| 275 | <p>Set the device in fastboot mode if necessary (see above).</p> |
| 276 | <p>An entire Android system can be flashed in a single command: this writes |
| 277 | the boot, recovery and system partitions together after verifying that the |
| 278 | system being flashed is compatible with the installed bootloader and radio, |
| 279 | and reboots the system. This also erases all the user data, similarly to |
| 280 | <code>fastboot oem unlock</code> mentioned earlier.</p> |
| 281 | <pre><code>$ fastboot -w flashall |
| 282 | </code></pre> |
| 283 | <p>Note that filesystems created via fastboot on Motorola Xoom aren't working |
| 284 | optimally, and it is strongly recommended to re-create them through recovery</p> |
| 285 | <pre><code>$ adb reboot recovery |
| 286 | </code></pre> |
| 287 | <p>Once in recovery, open the menu (press Power + Volume Up), wipe the cache |
| 288 | partition, then wipe data.</p> |
| 289 | <h2 id="restoring-a-device-to-its-original-factory-state">Restoring a device to its original factory state</h2> |
| 290 | <p>Factory images |
| 291 | for Nexus 10, |
| 292 | for Nexus 4, |
| 293 | for Nexus Q, |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 294 | for Nexus 7, |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 295 | for Galaxy Nexus (GSM/HSPA+ "yakju" and "takju", |
| 296 | and CDMA/LTE "mysid" and "mysidspr"), |
| 297 | and |
Robert Ly | 40e3b6d | 2013-04-17 18:12:10 -0700 | [diff] [blame] | 298 | for Nexus S and Nexus S 4G |
Robert Ly | 35f2fda | 2013-01-29 16:27:05 -0800 | [diff] [blame] | 299 | are available from |
| 300 | <a href="https://developers.google.com/android/nexus/images">Google's factory image page</a>.</p> |
Jean-Baptiste Queru | d8fbf20 | 2013-06-18 14:51:12 -0700 | [diff] [blame] | 301 | <p>Factory images for the Motorola Xoom are distributed directly by Motorola.</p> |