blob: 5275435ee333f326ca6e1927b037f58035f56d4f [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 Queru3e466b02011-10-06 14:34:00 -070022The only supported phone with the current release is the GSM/HSPA+ Galaxy
23Nexus, a.k.a. "maguro".
24GSM/HSPA+ Galaxy Nexus is currently the recommended device to use with the
25Android Open-Source Project.
26
27In addition, [PandaBoard](http://pandaboard.org) a.k.a. "panda" is supported
28in the master branch only, but is currently considered experimental.
29The specific details to use a PandaBoard with the Android Open-Source Project
30are in the file `device/ti/panda/README` in the source tree.
31
32Nexus S, a.k.a. "crespo", and Nexus S 4G, a.k.a. "crespo4g", are supported with
33gingerbread, but can't currently be used with newer versions of the Android
34Open-Source Project.
35
36Nexus One a.k.a. "passion" is obsolete, was experimental in gingerbread and
37unsupported, and can't be used with newer versions of the Android Open-Source
38Project.
39
40Android Developer Phones (ADP1 and ADP2, a.k.a. "dream" and "sapphire") are
41obsolete, were experimental and unsupported in froyo, and can't be used with
42newer versions of the Android Open-Source Project.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070043
44## Building fastboot and adb ##
45
46If you don't already have those tools, fastboot and adb can be built with
47the 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
54During a cold boot, the following key combinations can be used to boot into fastboot mode,
55which is a mode in the bootloader that can be used to flash the devices:
56
57Device | Keys
58---------|------
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070059maguro | Press and hold both *Volume Up* and *Volume Down*, then press and hold *Power*
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070060crespo | Press and hold *Volume Up*, then press and hold *Power*
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -070061crespo4g | Press and hold *Volume Up*, then press and hold *Power*
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070062passion | Press and hold the trackball, then press *Power*
63sapphire | Press and hold *Back*, then press *Power*
64dream | Press and hold *Back*, then press *Power*
65
66Also, on devices running froyo or later where adb is enabled,
67the command `adb reboot bootloader` can be used to reboot from
68Android directly into the bootloader with no key combinations.
69
70## Unlocking the bootloader ##
71
72It's only possible to flash a custom system if the bootloader allows it.
73
74This is the default setup on ADP1 and ADP2.
75
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070076On Nexus One, Nexus S, Nexus S 4G, and Galaxy Nexus, the bootloader is locked
77by default. With the device in fastboot mode, the bootloader is unlocked with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070078
79 $ fastboot oem unlock
80
81The procedure must be confirmed on-screen, and deletes the user data for
82privacy reasons. It only needs to be run once.
83
84On Nexus One, the operation voids the warranty and is irreversible.
85
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070086On Nexus S, Nexus S 4G, and Galaxy Nexus, the bootloader can be locked back with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070087
88 $ fastboot oem lock
89
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -070090## Obtaining proprietary binaries ##
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070091
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070092Starting with IceCreamSandwich, the Android Open-Source Project can't be used
93from pure source code only, and requires additional hardware-related proprietary
94libraries to run, specifically for hardware graphics acceleration.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070095
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070096Official binaries for Nexus S, Nexus S 4G, Galaxy Nexus, and PandaBoard can be
97downloaded from
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -070098[Google's Nexus driver page](http://code.google.com/android/nexus/drivers.html),
99which add access to additional hardware capabilities with non-Open-Source code.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700100
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700101There are no official binaries for Nexus One, ADP2 or ADP1.
102
103### Extracting the proprietary binaries ###
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700104
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700105Each set of binaries comes as a self-extracting script in a compressed archive.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700106After uncompressing each archive, run the included self-extracting script
107from the root of the source tree, confirm that you agree to the terms of the
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700108enclosed license agreement, and the binaries and their matching makefiles
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700109will get installed in the `vendor/` hierarchy of the source tree.
110
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700111There's an additional step on Nexus S 4G. Build the signapk tool with
112
113 $ make signapk
114
115Then reassemble the proprietary applicatons with
116
117 $ vendor/samsung/crespo4g/reassemble-apks.sh
118
119### Cleaning up when adding proprietary binaries ###
120
121In order to make sure that the newly installed binaries are properly
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700122taken into account after being extracted, the existing output of any previous
123build needs to be deleted with
124
125 $ make clobber
126
127## Picking and building the configuration that matches a device ##
128
129The steps to configure and build the Android Open-Source Project
130are described in the page about [Building](building.html).
131
132The recommended builds for the various devices are available through
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700133the lunch menu, accessed when running the `lunch` command with no arguments:
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700134
Jean-Baptiste Queru37234a52011-05-19 15:24:54 -0700135Device | Branch | Build configuration
136---------|------------------|------------------------
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700137maguro | android-4.0.1_r1 | full_maguro-userdebug
138panda | master | full_panda-eng
Jean-Baptiste Queru8b203372011-11-08 17:54:35 -0800139crespo | android-2.3.6_r1 | full_crespo-userdebug
140crespo4g | android-2.3.7_r1 | full_crespo4g-userdebug
141passion | android-2.3.6_r1 | full_passion-userdebug
Jean-Baptiste Queru37234a52011-05-19 15:24:54 -0700142sapphire | android-2.2.2_r1 | full_sapphire-userdebug
143dream | android-2.2.2_r1 | full_dream-userdebug
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700144
145## Flashing a device ##
146
147Set the device in fastboot mode if necessary (see above).
148
149Because user data is typically incompatible between builds of Android,
150it's typically better to delete it when flashing a new system.
151
152 $ fastboot erase cache
153 $ fastboot erase userdata
154
155An entire Android system can be flashed in a single command: this writes
Jean-Baptiste Queruccdda522011-05-19 10:47:27 -0700156the boot, recovery and system partitions together after verifying that the
Jean-Baptiste Queru61745ea2011-09-08 14:44:15 -0700157system being flashed is compatible with the installed bootloader and radio,
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700158and reboots the system.
159
160 $ fastboot flashall
161
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700162On maguro, panda, crespo, crespo4g, sapphire and dream (but not on passion),
163the commands above can be replaced with a single command
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700164
165 $ fastboot -w flashall
166
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700167### Nexus S, Nexus S 4G and Galaxy Nexus Bootloader and Cell Radio compatibility ###
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700168
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700169On Nexus S, Nexus S 4G, and Galaxy Nexus, each version of Android has only
170been thoroughly tested with on specific version of the underlying bootloader
171and cell radio software.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700172However, no compatibility issues are expected when running newer systems
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700173with older bootloaders and radio images according to the following tables.
174
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700175Nexus S (worldwide version "XX"):
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700176
177Android Version | Preferred Bootloader | Preferred Radio | Also possible
178----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07001792.3 (GRH55) | I9020XXJK1 | I9020XXJK8
1802.3.1 (GRH78) | I9020XXJK1 | I9020XXJK8
1812.3.2 (GRH78C) | I9020XXJK1 | I9020XXJK8
1822.3.3 (GRI40) | I9020XXKA3 | I9020XXKB1 | All previous versions
1832.3.4 (GRJ22) | I9020XXKA3 | I9020XXKD1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07001842.3.5 (GRJ90) | I9020XXKA3 | I9020XXKF1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07001852.3.6 (GRK39F) | I9020XXKA3 | I9020XXKF1 | All previous versions
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700186
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700187Nexus S (850MHz version "UC"):
188
189Android Version | Preferred Bootloader | Preferred Radio | Also possible
190----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07001912.3.3 (GRI54) | I9020XXKA3 | I9020UCKB2
1922.3.4 (GRJ22) | I9020XXKA3 | I9020UCKD1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07001932.3.5 (GRJ90) | I9020XXKA3 | I9020UCKF1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07001942.3.6 (GRK39C) | I9020XXKA3 | I9020UCKF1 | All previous versions
1952.3.6 (GRK39F) | I9020XXKA3 | I9020UCKF1 | All previous versions
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700196
197Nexus S (Korea version "KR"):
198
199Android Version | Preferred Bootloader | Preferred Radio | Also possible
200----------------|----------------------|-----------------|--------------
Jean-Baptiste Querucd9c6932011-06-21 07:55:12 -07002012.3.3 (GRI54) | I9020XXKA3 | I9020KRKB3
2022.3.4 (GRJ22) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002032.3.5 (GRJ90) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07002042.3.6 (GRK39F) | I9020XXKA3 | M200KRKC1 | All previous versions
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700205
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700206Nexus S 4G:
207
208Android Version | Preferred Bootloader | Preferred Radio | Also possible
209----------------|----------------------|-----------------|--------------
2102.3.4 (GRJ06D) | D720SPRKC5 | D720SPRKC9
2112.3.4 (GRJ22) | D720SPRKC5 | D720SPRKD8 | All previous versions
Jean-Baptiste Queru623cc2f2011-07-30 18:43:45 -07002122.3.5 (GRJ90) | D720SPRKC5 | D720SPRKE5 | All previous versions
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -07002132.3.7 (GWK74) | D720SPRKE1 | D720SPRKH1 (*) | All previous versions
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700214
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700215Galaxy Nexus (GSM/HSPA+):
216
217Android Version | Preferred Bootloader | Preferred Radio | Also possible
218----------------|----------------------|-----------------|--------------
2194.0.1 (ITL41D) | PRIMEKJ10 | I9250XXKK1
220
221If you're building a new version of Android, if your Nexus S, Nexus S 4G or
222Galaxy Nexus has
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700223an older bootloader and radio image that is marked as being also possible in
Jean-Baptiste Querua5dca362011-05-18 10:39:08 -0700224the table above but is not recognized by fastboot, you can locally
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700225delete the `version-bootloader` and `version-baseband` lines in
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700226`device/samsung/crespo/board-info.txt` or
227`device/samsung/crespo4g/board-info.txt` or
228`device/samsung/maguro/board-info.txt`
Jean-Baptiste Querucac01c12011-09-28 17:26:00 -0700229
230(*) As a note, radio version D720SPRKH1 for Nexus S 4G sometimes erroneously
231reports version D720SPRKE1. If this is the case for your Nexus S 4G, you can
232locally modify the version-baseband line in
233`device/samsung/crespo4g/board-info.txt` accordingly.