blob: 5c20bd3225bd578fb30dfa611c73600555c76cb0 [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
25Galaxy Nexus is supported both in GSM/HSPA+ configuration "maguro" and in
26CDMA/LTE configuration "toro". The GSM/HSPA+ configuration is only supported
27if it was originally sold with a "yakju" operating system.
28
29The Motorola Xoom is supported in the configurations sold in the USA,
30in both variants: Wi-Fi only "wingray" and CDMA or CDMA/LTE "stingray".
31
32Nexus S is supported, both in the GSM configuration "crespo" and in the
33CDMA/WiMAX configuration "crespo4g".
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070034
35In addition, [PandaBoard](http://pandaboard.org) a.k.a. "panda" is supported
36in the master branch only, but is currently considered experimental.
37The specific details to use a PandaBoard with the Android Open-Source Project
38are in the file `device/ti/panda/README` in the source tree.
39
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070040Nexus One a.k.a. "passion" is obsolete, was experimental in gingerbread and
41unsupported, and can't be used with newer versions of the Android Open-Source
42Project.
43
44Android Developer Phones (ADP1 and ADP2, a.k.a. "dream" and "sapphire") are
45obsolete, were experimental and unsupported in froyo, and can't be used with
46newer versions of the Android Open-Source Project.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070047
48## 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*
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080064toro | Press and hold both *Volume Up* and *Volume Down*, then press and hold *Power*
65wingray | Press and hold *Volume Down*, then press and hold *Power*
66stingray | Press and hold *Volume Down*, then press and hold *Power*
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070067crespo | Press and hold *Volume Up*, then press and hold *Power*
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -070068crespo4g | Press and hold *Volume Up*, then press and hold *Power*
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070069passion | Press and hold the trackball, then press *Power*
70sapphire | Press and hold *Back*, then press *Power*
71dream | Press and hold *Back*, then press *Power*
72
73Also, on devices running froyo or later where adb is enabled,
74the command `adb reboot bootloader` can be used to reboot from
75Android directly into the bootloader with no key combinations.
76
77## Unlocking the bootloader ##
78
79It's only possible to flash a custom system if the bootloader allows it.
80
81This is the default setup on ADP1 and ADP2.
82
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080083On Nexus One, Nexus S, Nexus S 4G, Xoom, and Galaxy Nexus,
84the bootloader is locked by default. With the device in fastboot mode, the
85bootloader is unlocked with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070086
87 $ fastboot oem unlock
88
89The procedure must be confirmed on-screen, and deletes the user data for
90privacy reasons. It only needs to be run once.
91
92On Nexus One, the operation voids the warranty and is irreversible.
93
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080094On Nexus S, Nexus S 4G, Xoom, and Galaxy Nexus,
95the bootloader can be locked back with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070096
97 $ fastboot oem lock
98
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080099Note that this erases user data on Xoom.
100
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700101## Obtaining proprietary binaries ##
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700102
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700103Starting with IceCreamSandwich, the Android Open-Source Project can't be used
104from pure source code only, and requires additional hardware-related proprietary
105libraries to run, specifically for hardware graphics acceleration.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700106
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700107Official binaries for Nexus S, Nexus S 4G, Galaxy Nexus, and PandaBoard can be
108downloaded from
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700109[Google's Nexus driver page](http://code.google.com/android/nexus/drivers.html),
110which add access to additional hardware capabilities with non-Open-Source code.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700111
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700112There are no official binaries for Nexus One, ADP2 or ADP1.
113
114### Extracting the proprietary binaries ###
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700115
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700116Each set of binaries comes as a self-extracting script in a compressed archive.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700117After uncompressing each archive, run the included self-extracting script
118from the root of the source tree, confirm that you agree to the terms of the
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700119enclosed license agreement, and the binaries and their matching makefiles
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700120will get installed in the `vendor/` hierarchy of the source tree.
121
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700122There's an additional step on Nexus S 4G. Build the signapk tool with
123
124 $ make signapk
125
126Then reassemble the proprietary applicatons with
127
128 $ vendor/samsung/crespo4g/reassemble-apks.sh
129
130### 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 Queru37234a52011-05-19 15:24:54 -0700146Device | Branch | Build configuration
147---------|------------------|------------------------
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800148maguro | android-4.0.3_r1 | full_maguro-userdebug
149toro | android-4.0.3_r1 | full_toro-userdebug
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700150panda | master | full_panda-eng
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800151wingray | android-4.0.3_r1 | full_wingray-userdebug
152stingray | android-4.0.3_r1 | full_stingray-userdebug
153crespo | android-4.0.3_r1 | full_crespo-userdebug
154crespo4g | android-4.0.3_r1 | full_crespo4g-userdebug
Jean-Baptiste Queru8b203372011-11-08 17:54:35 -0800155passion | android-2.3.6_r1 | full_passion-userdebug
Jean-Baptiste Queru37234a52011-05-19 15:24:54 -0700156sapphire | android-2.2.2_r1 | full_sapphire-userdebug
157dream | android-2.2.2_r1 | full_dream-userdebug
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700158
159## Flashing a device ##
160
161Set the device in fastboot mode if necessary (see above).
162
163Because user data is typically incompatible between builds of Android,
164it's typically better to delete it when flashing a new system.
165
166 $ fastboot erase cache
167 $ fastboot erase userdata
168
169An entire Android system can be flashed in a single command: this writes
Jean-Baptiste Queruccdda522011-05-19 10:47:27 -0700170the boot, recovery and system partitions together after verifying that the
Jean-Baptiste Queru61745ea2011-09-08 14:44:15 -0700171system being flashed is compatible with the installed bootloader and radio,
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700172and reboots the system.
173
174 $ fastboot flashall
175
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800176On all devices except passion,
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700177the commands above can be replaced with a single command
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700178
179 $ fastboot -w flashall
180
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800181Note that filesystems created via fastboot on Motorola Xoom aren't working
182optimally, and it is strongly recommended to re-create them through recovery
183
184 $ adb reboot recovery
185
186Once in recovery, open the menu (press Power + Volume Up), wipe the cache
187partition, then wipe data.
188
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700189### Nexus S, Nexus S 4G and Galaxy Nexus Bootloader and Cell Radio compatibility ###
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700190
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700191On Nexus S, Nexus S 4G, and Galaxy Nexus, each version of Android has only
192been thoroughly tested with on specific version of the underlying bootloader
193and cell radio software.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700194However, no compatibility issues are expected when running newer systems
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700195with older bootloaders and radio images according to the following tables.
196
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700197Nexus S (worldwide version "XX"):
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700198
199Android Version | Preferred Bootloader | Preferred Radio | Also possible
200----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07002012.3 (GRH55) | I9020XXJK1 | I9020XXJK8
2022.3.1 (GRH78) | I9020XXJK1 | I9020XXJK8
2032.3.2 (GRH78C) | I9020XXJK1 | I9020XXJK8
2042.3.3 (GRI40) | I9020XXKA3 | I9020XXKB1 | All previous versions
2052.3.4 (GRJ22) | I9020XXKA3 | I9020XXKD1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002062.3.5 (GRJ90) | I9020XXKA3 | I9020XXKF1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07002072.3.6 (GRK39F) | I9020XXKA3 | I9020XXKF1 | All previous versions
Jean-Baptiste Queruf34289f2011-12-14 14:34:27 -08002084.0.3 (IML74E) | I9020XXKL1 | I9020XXKI1 | All previous versions
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700209
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700210Nexus S (850MHz version "UC"):
211
212Android Version | Preferred Bootloader | Preferred Radio | Also possible
213----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07002142.3.3 (GRI54) | I9020XXKA3 | I9020UCKB2
2152.3.4 (GRJ22) | I9020XXKA3 | I9020UCKD1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002162.3.5 (GRJ90) | I9020XXKA3 | I9020UCKF1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07002172.3.6 (GRK39C) | I9020XXKA3 | I9020UCKF1 | All previous versions
2182.3.6 (GRK39F) | I9020XXKA3 | I9020UCKF1 | All previous versions
Jean-Baptiste Queruf34289f2011-12-14 14:34:27 -08002194.0.3 (IML74E) | I9020XXKL1 | I9020UCKF1 | All previous versions
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700220
221Nexus S (Korea version "KR"):
222
223Android Version | Preferred Bootloader | Preferred Radio | Also possible
224----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07002252.3.3 (GRI54) | I9020XXKA3 | I9020KRKB3
2262.3.4 (GRJ22) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002272.3.5 (GRJ90) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07002282.3.6 (GRK39F) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Queruf34289f2011-12-14 14:34:27 -08002294.0.3 (IML74E) | I9020XXKL1 | M200KRKC1 | All previous versions
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700230
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700231Nexus S 4G:
232
233Android Version | Preferred Bootloader | Preferred Radio | Also possible
234----------------|----------------------|-----------------|--------------
2352.3.4 (GRJ06D) | D720SPRKC5 | D720SPRKC9
2362.3.4 (GRJ22) | D720SPRKC5 | D720SPRKD8 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002372.3.5 (GRJ90) | D720SPRKC5 | D720SPRKE5 | All previous versions
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -08002382.3.7 (GWK74) | D720SPRKE1 (*) | D720SPRKH1 | All previous versions
Jean-Baptiste Queruf34289f2011-12-14 14:34:27 -08002394.0.3 (IML74E) | D720SPRKE1 (*) | D720SPRKL1 | All previous versions
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700240
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700241Galaxy Nexus (GSM/HSPA+):
242
243Android Version | Preferred Bootloader | Preferred Radio | Also possible
244----------------|----------------------|-----------------|--------------
2454.0.1 (ITL41D) | PRIMEKJ10 | I9250XXKK1
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -08002464.0.2 (ICL53F) | PRIMEKK15 | I9250XXKK6 | All previous versions
Jean-Baptiste Queruf34289f2011-12-14 14:34:27 -08002474.0.3 (IML74E) | PRIMEKL01 | I9250XXKK6 | All previous versions
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800248
249Galaxy Nexus (CDMA/LTE):
250
251Android Version | Preferred Bootloader | Preferred Radio | Preferred CDMA Radio | Also possible
252----------------|----------------------|-----------------|----------------------|--------------
2534.0.1 (ITL41D) | PRIMEKJ10 | I515.EK02 | I515.EK01
2544.0.2 (ICL53F) | PRIMEKK15 | I515.EK02 | I515.EK05 | All previous versions
Jean-Baptiste Queruf34289f2011-12-14 14:34:27 -08002554.0.3 (IML74E) | PRIMEKL01 | I515.EK04 | I515.EK06 | All previous versions
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700256
257If you're building a new version of Android, if your Nexus S, Nexus S 4G or
258Galaxy Nexus has
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700259an older bootloader and radio image that is marked as being also possible in
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700260the table above but is not recognized by fastboot, you can locally
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700261delete the `version-bootloader` and `version-baseband` lines in
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700262`device/samsung/crespo/board-info.txt` or
263`device/samsung/crespo4g/board-info.txt` or
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800264`device/samsung/maguro/board-info.txt` or
265`device/samsung/toro/board-info.txt`
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -0700266
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800267(*) As a note, bootloader version D720SPRKE1 for Nexus S 4G erroneously
268reports version D720SPRKE1 as the baseband version instead of the true baseband
269version after flashing a new baseband firmware. To make it report the proper
270version again, the phone needs to be powered down, then booted all the way to
271Android, then rebooted to the bootloader.
272
273## Activating the CDMA radio ##
274
275On the CDMA variant of the Motorola Xoom, the CDMA radio needs to be
276manually re-activated after each factory reset.
277
278 $ adb shell su root radiooptions 8 *22899