blob: a147b68cdd7318ce6264a9db49c256147028096a [file] [log] [blame] [view]
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -07001<!--
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 Queru3e466b02011-10-06 14:34:00 -070019This page complements the main page about [Building](building.html) with
20information that is specific to individual devices.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070021
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080022The supported devices with the current release are the Galaxy Nexus, Motorola
23Xoom, and Nexus S.
24
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -080025Galaxy Nexus is supported only in GSM/HSPA+ configuration "maguro" and only
Jean-Baptiste Queruf7fd0e82012-04-24 10:20:20 -070026if it was originally sold with a "yakju" or "takju" operating system.
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080027
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -080028The Motorola Xoom is supported in the Wi-fi configuration "wingray"
29sold in the USA.
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080030
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -080031Nexus S is supported in the GSM configuration "crespo".
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070032
33In addition, [PandaBoard](http://pandaboard.org) a.k.a. "panda" is supported
34in the master branch only, but is currently considered experimental.
35The specific details to use a PandaBoard with the Android Open-Source Project
36are in the file `device/ti/panda/README` in the source tree.
37
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070038Nexus One a.k.a. "passion" is obsolete, was experimental in gingerbread and
39unsupported, and can't be used with newer versions of the Android Open-Source
40Project.
41
42Android Developer Phones (ADP1 and ADP2, a.k.a. "dream" and "sapphire") are
43obsolete, were experimental and unsupported in froyo, and can't be used with
44newer versions of the Android Open-Source Project.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070045
Jean-Baptiste Queru388b7af2012-02-03 13:04:37 -080046No CDMA devices are supported in the Android Open-Source Project.
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -080047
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070048## Building fastboot and adb ##
49
50If you don't already have those tools, fastboot and adb can be built with
51the regular build system. Follow the instructions on the page about
52[building](building.html), and replace the main `make` command with
53
54 $ make fastboot adb
55
56## Booting into fastboot mode ##
57
58During a cold boot, the following key combinations can be used to boot into fastboot mode,
59which is a mode in the bootloader that can be used to flash the devices:
60
61Device | Keys
62---------|------
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070063maguro | Press and hold both *Volume Up* and *Volume Down*, then press and hold *Power*
Conley Owens9aaa52a2012-02-03 14:13:27 -080064panda | Press and hold *Input*, then press *Power*
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080065wingray | Press and hold *Volume Down*, then press and hold *Power*
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070066crespo | Press and hold *Volume Up*, then press and hold *Power*
67passion | Press and hold the trackball, then press *Power*
68sapphire | Press and hold *Back*, then press *Power*
69dream | Press and hold *Back*, then press *Power*
70
71Also, on devices running froyo or later where adb is enabled,
72the command `adb reboot bootloader` can be used to reboot from
73Android directly into the bootloader with no key combinations.
74
75## Unlocking the bootloader ##
76
77It's only possible to flash a custom system if the bootloader allows it.
78
79This is the default setup on ADP1 and ADP2.
80
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -080081On Nexus One, Nexus S, Xoom, and Galaxy Nexus,
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080082the bootloader is locked by default. With the device in fastboot mode, the
83bootloader is unlocked with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070084
85 $ fastboot oem unlock
86
87The procedure must be confirmed on-screen, and deletes the user data for
88privacy reasons. It only needs to be run once.
89
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -080090Note that on the Nexus S, Motorola Xoom and on Galaxy Nexus,
Jean-Baptiste Queru93afea92011-12-16 18:25:07 -080091all data on the phone is erased, i.e. both the applications' private data
92and the shared data that is accessible over USB, including photos and
93movies. Be sure to make a backup of any precious files you have before
94unlocking the bootloader.
95
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070096On Nexus One, the operation voids the warranty and is irreversible.
97
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -080098On Nexus S, Xoom, and Galaxy Nexus,
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080099the bootloader can be locked back with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700100
101 $ fastboot oem lock
102
Jean-Baptiste Queru93afea92011-12-16 18:25:07 -0800103Note that this erases user data on Xoom (including the shared USB data).
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800104
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700105## Obtaining proprietary binaries ##
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700106
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700107Starting with IceCreamSandwich, the Android Open-Source Project can't be used
108from pure source code only, and requires additional hardware-related proprietary
109libraries to run, specifically for hardware graphics acceleration.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700110
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -0800111Official binaries for Nexus S, Galaxy Nexus, and PandaBoard can be
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700112downloaded from
Jean-Baptiste Queru66426b32012-04-20 07:14:05 -0700113[Google's Nexus driver page](https://developers.google.com/android/nexus/drivers),
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700114which add access to additional hardware capabilities with non-Open-Source code.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700115
Jean-Baptiste Queru993d0b82012-04-19 17:24:35 -0700116When a device is suppoted in the master branch, the binaries for the most
117recent numbered release are the ones that should be used in the master
118branch.
119
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700120There are no official binaries for Nexus One, ADP2 or ADP1.
121
122### Extracting the proprietary binaries ###
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700123
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700124Each set of binaries comes as a self-extracting script in a compressed archive.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700125After uncompressing each archive, run the included self-extracting script
126from the root of the source tree, confirm that you agree to the terms of the
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700127enclosed license agreement, and the binaries and their matching makefiles
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700128will get installed in the `vendor/` hierarchy of the source tree.
129
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700130### Cleaning up when adding proprietary binaries ###
131
132In order to make sure that the newly installed binaries are properly
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700133taken into account after being extracted, the existing output of any previous
134build needs to be deleted with
135
136 $ make clobber
137
138## Picking and building the configuration that matches a device ##
139
140The steps to configure and build the Android Open-Source Project
141are described in the page about [Building](building.html).
142
143The recommended builds for the various devices are available through
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700144the lunch menu, accessed when running the `lunch` command with no arguments:
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700145
Jean-Baptiste Queru993d0b82012-04-19 17:24:35 -0700146Device | Branch | Build configuration
147---------|------------------------------|------------------------
148maguro | android-4.0.4_r1.1 or master | full_maguro-userdebug
149panda | master | full_panda-userdebug
150wingray | android-4.0.4_r1.1 or master | full_wingray-userdebug
151crespo | android-4.0.4_r1.1 or master | full_crespo-userdebug
152passion | android-2.3.7_r1 | full_passion-userdebug
153sapphire | android-2.2.3_r1 | full_sapphire-userdebug
154dream | android-2.2.3_r1 | full_dream-userdebug
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700155
156## Flashing a device ##
157
158Set the device in fastboot mode if necessary (see above).
159
160Because user data is typically incompatible between builds of Android,
161it's typically better to delete it when flashing a new system.
162
163 $ fastboot erase cache
164 $ fastboot erase userdata
165
166An entire Android system can be flashed in a single command: this writes
Jean-Baptiste Queruccdda522011-05-19 10:47:27 -0700167the boot, recovery and system partitions together after verifying that the
Jean-Baptiste Queru61745ea2011-09-08 14:44:15 -0700168system being flashed is compatible with the installed bootloader and radio,
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700169and reboots the system.
170
171 $ fastboot flashall
172
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800173On all devices except passion,
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700174the commands above can be replaced with a single command
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700175
176 $ fastboot -w flashall
177
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800178Note that filesystems created via fastboot on Motorola Xoom aren't working
179optimally, and it is strongly recommended to re-create them through recovery
180
181 $ adb reboot recovery
182
183Once in recovery, open the menu (press Power + Volume Up), wipe the cache
184partition, then wipe data.
185
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -0800186### Nexus S and Galaxy Nexus Bootloader and Cell Radio compatibility ###
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700187
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -0800188On Nexus S, and Galaxy Nexus, each version of Android has only
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700189been thoroughly tested with on specific version of the underlying bootloader
190and cell radio software.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700191However, no compatibility issues are expected when running newer systems
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700192with older bootloaders and radio images according to the following tables.
193
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700194Nexus S (worldwide version "XX"):
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700195
196Android Version | Preferred Bootloader | Preferred Radio | Also possible
197----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07001982.3 (GRH55) | I9020XXJK1 | I9020XXJK8
1992.3.1 (GRH78) | I9020XXJK1 | I9020XXJK8
2002.3.2 (GRH78C) | I9020XXJK1 | I9020XXJK8
2012.3.3 (GRI40) | I9020XXKA3 | I9020XXKB1 | All previous versions
2022.3.4 (GRJ22) | I9020XXKA3 | I9020XXKD1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002032.3.5 (GRJ90) | I9020XXKA3 | I9020XXKF1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07002042.3.6 (GRK39F) | I9020XXKA3 | I9020XXKF1 | All previous versions
Jean-Baptiste Queruc95d7e62011-12-16 09:57:16 -08002054.0.3 (IML74K) | I9020XXKL1 | I9020XXKI1 | All previous versions
Jean-Baptiste Queruaa73c4f2012-03-27 16:03:08 -07002064.0.4 (IMM76D) | I9020XXKL1 | I9020XXKI1
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700207
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700208Nexus S (850MHz version "UC"):
209
210Android Version | Preferred Bootloader | Preferred Radio | Also possible
211----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07002122.3.3 (GRI54) | I9020XXKA3 | I9020UCKB2
2132.3.4 (GRJ22) | I9020XXKA3 | I9020UCKD1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002142.3.5 (GRJ90) | I9020XXKA3 | I9020UCKF1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07002152.3.6 (GRK39C) | I9020XXKA3 | I9020UCKF1 | All previous versions
2162.3.6 (GRK39F) | I9020XXKA3 | I9020UCKF1 | All previous versions
Jean-Baptiste Queruc95d7e62011-12-16 09:57:16 -08002174.0.3 (IML74K) | I9020XXKL1 | I9020UCKF1 | All previous versions
Jean-Baptiste Queruaa73c4f2012-03-27 16:03:08 -07002184.0.4 (IMM76D) | I9020XXKL1 | I9020UCKJ1 | All previous versions
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700219
220Nexus S (Korea version "KR"):
221
222Android Version | Preferred Bootloader | Preferred Radio | Also possible
223----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07002242.3.3 (GRI54) | I9020XXKA3 | I9020KRKB3
2252.3.4 (GRJ22) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002262.3.5 (GRJ90) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07002272.3.6 (GRK39F) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Queruc95d7e62011-12-16 09:57:16 -08002284.0.3 (IML74K) | I9020XXKL1 | M200KRKC1 | All previous versions
Jean-Baptiste Queruaa73c4f2012-03-27 16:03:08 -07002294.0.4 (IMM76D) | I9020XXKL1 | M200KRKC1 | All previous versions
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700230
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700231Galaxy Nexus (GSM/HSPA+):
232
233Android Version | Preferred Bootloader | Preferred Radio | Also possible
234----------------|----------------------|-----------------|--------------
2354.0.1 (ITL41D) | PRIMEKJ10 | I9250XXKK1
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -08002364.0.2 (ICL53F) | PRIMEKK15 | I9250XXKK6 | All previous versions
Jean-Baptiste Queruc95d7e62011-12-16 09:57:16 -08002374.0.3 (IML74K) | PRIMEKL01 | I9250XXKK6 | All previous versions
Jean-Baptiste Queruaa73c4f2012-03-27 16:03:08 -07002384.0.4 (IMM76D) | PRIMEKL03 | I9250XXLA02 | Versions from 4.0.2
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800239
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -0800240If you're building a new version of Android, if your Nexus S or
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700241Galaxy Nexus has
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700242an older bootloader and radio image that is marked as being also possible in
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700243the table above but is not recognized by fastboot, you can locally
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700244delete the `version-bootloader` and `version-baseband` lines in
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700245`device/samsung/crespo/board-info.txt` or
Jean-Baptiste Querueca69c02012-01-26 14:31:26 -0800246`device/samsung/maguro/board-info.txt`
Jean-Baptiste Queru93afea92011-12-16 18:25:07 -0800247
248## Restoring a device to its original factory state ##
249
Jean-Baptiste Queru0318a192012-04-05 08:13:08 -0700250Factory images
Jean-Baptiste Queruf7fd0e82012-04-24 10:20:20 -0700251for Galaxy Nexus (GSM/HSPA+ "yakju" and "takju", and CDMA/LTE "mysid")
Jean-Baptiste Queru0318a192012-04-05 08:13:08 -0700252and
253for Nexus S (all variants)
254are available from
Jean-Baptiste Queru66426b32012-04-20 07:14:05 -0700255[Google's factory image page](https://developers.google.com/android/nexus/images).
Jean-Baptiste Queru93afea92011-12-16 18:25:07 -0800256
257Factory images for the Motorola Xoom are distributed directly by Motorola.
258
Jean-Baptiste Queru0318a192012-04-05 08:13:08 -0700259No factory images are available for Nexus One.