Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright 2010 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | 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 | |
| 17 | # Building for devices # |
| 18 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 19 | This page complements the main page about [Building](building.html) with |
| 20 | information that is specific to individual devices. |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 21 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 22 | The only supported phone with the current release is the GSM/HSPA+ Galaxy |
| 23 | Nexus, a.k.a. "maguro". |
| 24 | GSM/HSPA+ Galaxy Nexus is currently the recommended device to use with the |
| 25 | Android Open-Source Project. |
| 26 | |
| 27 | In addition, [PandaBoard](http://pandaboard.org) a.k.a. "panda" is supported |
| 28 | in the master branch only, but is currently considered experimental. |
| 29 | The specific details to use a PandaBoard with the Android Open-Source Project |
| 30 | are in the file `device/ti/panda/README` in the source tree. |
| 31 | |
| 32 | Nexus S, a.k.a. "crespo", and Nexus S 4G, a.k.a. "crespo4g", are supported with |
| 33 | gingerbread, but can't currently be used with newer versions of the Android |
| 34 | Open-Source Project. |
| 35 | |
| 36 | Nexus One a.k.a. "passion" is obsolete, was experimental in gingerbread and |
| 37 | unsupported, and can't be used with newer versions of the Android Open-Source |
| 38 | Project. |
| 39 | |
| 40 | Android Developer Phones (ADP1 and ADP2, a.k.a. "dream" and "sapphire") are |
| 41 | obsolete, were experimental and unsupported in froyo, and can't be used with |
| 42 | newer versions of the Android Open-Source Project. |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 43 | |
| 44 | ## Building fastboot and adb ## |
| 45 | |
| 46 | If you don't already have those tools, fastboot and adb can be built with |
| 47 | the regular build system. Follow the instructions on the page about |
| 48 | [building](building.html), and replace the main `make` command with |
| 49 | |
| 50 | $ make fastboot adb |
| 51 | |
| 52 | ## Booting into fastboot mode ## |
| 53 | |
| 54 | During a cold boot, the following key combinations can be used to boot into fastboot mode, |
| 55 | which is a mode in the bootloader that can be used to flash the devices: |
| 56 | |
| 57 | Device | Keys |
| 58 | ---------|------ |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 59 | maguro | Press and hold both *Volume Up* and *Volume Down*, then press and hold *Power* |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 60 | crespo | Press and hold *Volume Up*, then press and hold *Power* |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 61 | crespo4g | Press and hold *Volume Up*, then press and hold *Power* |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 62 | passion | Press and hold the trackball, then press *Power* |
| 63 | sapphire | Press and hold *Back*, then press *Power* |
| 64 | dream | Press and hold *Back*, then press *Power* |
| 65 | |
| 66 | Also, on devices running froyo or later where adb is enabled, |
| 67 | the command `adb reboot bootloader` can be used to reboot from |
| 68 | Android directly into the bootloader with no key combinations. |
| 69 | |
| 70 | ## Unlocking the bootloader ## |
| 71 | |
| 72 | It's only possible to flash a custom system if the bootloader allows it. |
| 73 | |
| 74 | This is the default setup on ADP1 and ADP2. |
| 75 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 76 | On Nexus One, Nexus S, Nexus S 4G, and Galaxy Nexus, the bootloader is locked |
| 77 | by default. With the device in fastboot mode, the bootloader is unlocked with |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 78 | |
| 79 | $ fastboot oem unlock |
| 80 | |
| 81 | The procedure must be confirmed on-screen, and deletes the user data for |
| 82 | privacy reasons. It only needs to be run once. |
| 83 | |
| 84 | On Nexus One, the operation voids the warranty and is irreversible. |
| 85 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 86 | On Nexus S, Nexus S 4G, and Galaxy Nexus, the bootloader can be locked back with |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 87 | |
| 88 | $ fastboot oem lock |
| 89 | |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 90 | ## Obtaining proprietary binaries ## |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 91 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 92 | Starting with IceCreamSandwich, the Android Open-Source Project can't be used |
| 93 | from pure source code only, and requires additional hardware-related proprietary |
| 94 | libraries to run, specifically for hardware graphics acceleration. |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 95 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 96 | Official binaries for Nexus S, Nexus S 4G, Galaxy Nexus, and PandaBoard can be |
| 97 | downloaded from |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 98 | [Google's Nexus driver page](http://code.google.com/android/nexus/drivers.html), |
| 99 | which add access to additional hardware capabilities with non-Open-Source code. |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 100 | |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 101 | There are no official binaries for Nexus One, ADP2 or ADP1. |
| 102 | |
| 103 | ### Extracting the proprietary binaries ### |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 104 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 105 | Each set of binaries comes as a self-extracting script in a compressed archive. |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 106 | After uncompressing each archive, run the included self-extracting script |
| 107 | from the root of the source tree, confirm that you agree to the terms of the |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 108 | enclosed license agreement, and the binaries and their matching makefiles |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 109 | will get installed in the `vendor/` hierarchy of the source tree. |
| 110 | |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 111 | There's an additional step on Nexus S 4G. Build the signapk tool with |
| 112 | |
| 113 | $ make signapk |
| 114 | |
| 115 | Then reassemble the proprietary applicatons with |
| 116 | |
| 117 | $ vendor/samsung/crespo4g/reassemble-apks.sh |
| 118 | |
| 119 | ### Cleaning up when adding proprietary binaries ### |
| 120 | |
| 121 | In order to make sure that the newly installed binaries are properly |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 122 | taken into account after being extracted, the existing output of any previous |
| 123 | build needs to be deleted with |
| 124 | |
| 125 | $ make clobber |
| 126 | |
| 127 | ## Picking and building the configuration that matches a device ## |
| 128 | |
| 129 | The steps to configure and build the Android Open-Source Project |
| 130 | are described in the page about [Building](building.html). |
| 131 | |
| 132 | The recommended builds for the various devices are available through |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 133 | the lunch menu, accessed when running the `lunch` command with no arguments: |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 134 | |
Jean-Baptiste Queru | 37234a5 | 2011-05-19 15:24:54 -0700 | [diff] [blame] | 135 | Device | Branch | Build configuration |
| 136 | ---------|------------------|------------------------ |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 137 | maguro | android-4.0.1_r1 | full_maguro-userdebug |
| 138 | panda | master | full_panda-eng |
Jean-Baptiste Queru | 8b20337 | 2011-11-08 17:54:35 -0800 | [diff] [blame] | 139 | crespo | android-2.3.6_r1 | full_crespo-userdebug |
| 140 | crespo4g | android-2.3.7_r1 | full_crespo4g-userdebug |
| 141 | passion | android-2.3.6_r1 | full_passion-userdebug |
Jean-Baptiste Queru | 37234a5 | 2011-05-19 15:24:54 -0700 | [diff] [blame] | 142 | sapphire | android-2.2.2_r1 | full_sapphire-userdebug |
| 143 | dream | android-2.2.2_r1 | full_dream-userdebug |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 144 | |
| 145 | ## Flashing a device ## |
| 146 | |
| 147 | Set the device in fastboot mode if necessary (see above). |
| 148 | |
| 149 | Because user data is typically incompatible between builds of Android, |
| 150 | it's typically better to delete it when flashing a new system. |
| 151 | |
| 152 | $ fastboot erase cache |
| 153 | $ fastboot erase userdata |
| 154 | |
| 155 | An entire Android system can be flashed in a single command: this writes |
Jean-Baptiste Queru | ccdda52 | 2011-05-19 10:47:27 -0700 | [diff] [blame] | 156 | the boot, recovery and system partitions together after verifying that the |
Jean-Baptiste Queru | 61745ea | 2011-09-08 14:44:15 -0700 | [diff] [blame] | 157 | system being flashed is compatible with the installed bootloader and radio, |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 158 | and reboots the system. |
| 159 | |
| 160 | $ fastboot flashall |
| 161 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 162 | On maguro, panda, crespo, crespo4g, sapphire and dream (but not on passion), |
| 163 | the commands above can be replaced with a single command |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 164 | |
| 165 | $ fastboot -w flashall |
| 166 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 167 | ### Nexus S, Nexus S 4G and Galaxy Nexus Bootloader and Cell Radio compatibility ### |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 168 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 169 | On Nexus S, Nexus S 4G, and Galaxy Nexus, each version of Android has only |
| 170 | been thoroughly tested with on specific version of the underlying bootloader |
| 171 | and cell radio software. |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 172 | However, no compatibility issues are expected when running newer systems |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 173 | with older bootloaders and radio images according to the following tables. |
| 174 | |
Jean-Baptiste Queru | a5dca36 | 2011-05-18 10:39:08 -0700 | [diff] [blame] | 175 | Nexus S (worldwide version "XX"): |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 176 | |
| 177 | Android Version | Preferred Bootloader | Preferred Radio | Also possible |
| 178 | ----------------|----------------------|-----------------|-------------- |
Jean-Baptiste Queru | cd9c693 | 2011-06-21 07:55:12 -0700 | [diff] [blame] | 179 | 2.3 (GRH55) | I9020XXJK1 | I9020XXJK8 |
| 180 | 2.3.1 (GRH78) | I9020XXJK1 | I9020XXJK8 |
| 181 | 2.3.2 (GRH78C) | I9020XXJK1 | I9020XXJK8 |
| 182 | 2.3.3 (GRI40) | I9020XXKA3 | I9020XXKB1 | All previous versions |
| 183 | 2.3.4 (GRJ22) | I9020XXKA3 | I9020XXKD1 | All previous versions |
Jean-Baptiste Queru | 623cc2f | 2011-07-30 18:43:45 -0700 | [diff] [blame] | 184 | 2.3.5 (GRJ90) | I9020XXKA3 | I9020XXKF1 | All previous versions |
Jean-Baptiste Queru | cac01c1 | 2011-09-28 17:26:00 -0700 | [diff] [blame] | 185 | 2.3.6 (GRK39F) | I9020XXKA3 | I9020XXKF1 | All previous versions |
Jean-Baptiste Queru | b4d39b4 | 2011-04-11 13:53:58 -0700 | [diff] [blame] | 186 | |
Jean-Baptiste Queru | a5dca36 | 2011-05-18 10:39:08 -0700 | [diff] [blame] | 187 | Nexus S (850MHz version "UC"): |
| 188 | |
| 189 | Android Version | Preferred Bootloader | Preferred Radio | Also possible |
| 190 | ----------------|----------------------|-----------------|-------------- |
Jean-Baptiste Queru | cd9c693 | 2011-06-21 07:55:12 -0700 | [diff] [blame] | 191 | 2.3.3 (GRI54) | I9020XXKA3 | I9020UCKB2 |
| 192 | 2.3.4 (GRJ22) | I9020XXKA3 | I9020UCKD1 | All previous versions |
Jean-Baptiste Queru | 623cc2f | 2011-07-30 18:43:45 -0700 | [diff] [blame] | 193 | 2.3.5 (GRJ90) | I9020XXKA3 | I9020UCKF1 | All previous versions |
Jean-Baptiste Queru | cac01c1 | 2011-09-28 17:26:00 -0700 | [diff] [blame] | 194 | 2.3.6 (GRK39C) | I9020XXKA3 | I9020UCKF1 | All previous versions |
| 195 | 2.3.6 (GRK39F) | I9020XXKA3 | I9020UCKF1 | All previous versions |
Jean-Baptiste Queru | a5dca36 | 2011-05-18 10:39:08 -0700 | [diff] [blame] | 196 | |
| 197 | Nexus S (Korea version "KR"): |
| 198 | |
| 199 | Android Version | Preferred Bootloader | Preferred Radio | Also possible |
| 200 | ----------------|----------------------|-----------------|-------------- |
Jean-Baptiste Queru | cd9c693 | 2011-06-21 07:55:12 -0700 | [diff] [blame] | 201 | 2.3.3 (GRI54) | I9020XXKA3 | I9020KRKB3 |
| 202 | 2.3.4 (GRJ22) | I9020XXKA3 | M200KRKC1 | All previous versions |
Jean-Baptiste Queru | 623cc2f | 2011-07-30 18:43:45 -0700 | [diff] [blame] | 203 | 2.3.5 (GRJ90) | I9020XXKA3 | M200KRKC1 | All previous versions |
Jean-Baptiste Queru | cac01c1 | 2011-09-28 17:26:00 -0700 | [diff] [blame] | 204 | 2.3.6 (GRK39F) | I9020XXKA3 | M200KRKC1 | All previous versions |
Jean-Baptiste Queru | a5dca36 | 2011-05-18 10:39:08 -0700 | [diff] [blame] | 205 | |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 206 | Nexus S 4G: |
| 207 | |
| 208 | Android Version | Preferred Bootloader | Preferred Radio | Also possible |
| 209 | ----------------|----------------------|-----------------|-------------- |
| 210 | 2.3.4 (GRJ06D) | D720SPRKC5 | D720SPRKC9 |
| 211 | 2.3.4 (GRJ22) | D720SPRKC5 | D720SPRKD8 | All previous versions |
Jean-Baptiste Queru | 623cc2f | 2011-07-30 18:43:45 -0700 | [diff] [blame] | 212 | 2.3.5 (GRJ90) | D720SPRKC5 | D720SPRKE5 | All previous versions |
Jean-Baptiste Queru | cac01c1 | 2011-09-28 17:26:00 -0700 | [diff] [blame] | 213 | 2.3.7 (GWK74) | D720SPRKE1 | D720SPRKH1 (*) | All previous versions |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 214 | |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 215 | Galaxy Nexus (GSM/HSPA+): |
| 216 | |
| 217 | Android Version | Preferred Bootloader | Preferred Radio | Also possible |
| 218 | ----------------|----------------------|-----------------|-------------- |
| 219 | 4.0.1 (ITL41D) | PRIMEKJ10 | I9250XXKK1 |
| 220 | |
| 221 | If you're building a new version of Android, if your Nexus S, Nexus S 4G or |
| 222 | Galaxy Nexus has |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 223 | an older bootloader and radio image that is marked as being also possible in |
Jean-Baptiste Queru | a5dca36 | 2011-05-18 10:39:08 -0700 | [diff] [blame] | 224 | the table above but is not recognized by fastboot, you can locally |
Jean-Baptiste Queru | 5da7539 | 2011-05-17 14:32:56 -0700 | [diff] [blame] | 225 | delete the `version-bootloader` and `version-baseband` lines in |
Jean-Baptiste Queru | 3e466b0 | 2011-10-06 14:34:00 -0700 | [diff] [blame] | 226 | `device/samsung/crespo/board-info.txt` or |
| 227 | `device/samsung/crespo4g/board-info.txt` or |
| 228 | `device/samsung/maguro/board-info.txt` |
Jean-Baptiste Queru | cac01c1 | 2011-09-28 17:26:00 -0700 | [diff] [blame] | 229 | |
| 230 | (*) As a note, radio version D720SPRKH1 for Nexus S 4G sometimes erroneously |
| 231 | reports version D720SPRKE1. If this is the case for your Nexus S 4G, you can |
| 232 | locally modify the version-baseband line in |
| 233 | `device/samsung/crespo4g/board-info.txt` accordingly. |