blob: a34fefeba7a4ec82eeb687f81946476e5684c051 [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 Queru5955ba52012-11-09 10:59:40 -080022With the current release, it is possible to build for
Jean-Baptiste Queru66701fb2012-11-29 12:05:46 -080023Nexus 10, for Nexus 7 (Wi-Fi), and for some variants of Galaxy Nexus.
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -080024The exact level of functionality for each device depends on the availability
25of the relevant proprietary hardware-specific binaries.
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080026
Jean-Baptiste Queru71753982012-11-12 17:34:24 -080027All configurations of Nexus 10 can be used. On those devices, graphics, audio,
28Wi-Fi, Bluetooth, camera, NFC, GPS and orientation sensors are functional.
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -080029
Jean-Baptiste Querua4f6f9b2012-11-09 12:40:10 -080030The Wi-Fi variants of Nexus 7 can be used. On Nexus 7, graphics and audio are
31functional, as well as Wi-Fi and Bluetooth. Due to hardware differences, do
Jean-Baptiste Queruc6dd1022012-10-04 14:00:14 -070032not use 4.1.1 on a Nexus 7 that was originally sold with 4.1.2 or newer.
Jean-Baptiste Queru66701fb2012-11-29 12:05:46 -080033The Mobile variant is not supported.
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080034
Jean-Baptiste Queruc6dd1022012-10-04 14:00:14 -070035The variants of Galaxy Nexus that can be used are the GSM/HSPA+ configuration
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -070036"maguro" (only if it was originally sold with a "yakju" or "takju" operating
37system) and the VZW CDMA/LTE configuration "toro". On those devices, graphics
Jean-Baptiste Querua4f6f9b2012-11-09 12:40:10 -080038and audio are functional, as well as Wi-Fi, Bluetooth, and access to the
Jean-Baptiste Queru8b726cf2012-11-26 09:14:18 -080039respective cellular networks. NFC and the orientation sensors are functional.
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080040
Jean-Baptiste Queruc6dd1022012-10-04 14:00:14 -070041The Sprint CDMA/LTE configuration "toroplus" of Galaxy Nexus is supported
Jean-Baptiste Queru71886422013-02-11 14:55:29 -080042experimentally, in the jb-mr1-dev-plus-aosp branch. On that configuration,
43the cellular network is not functional,
Jean-Baptiste Queruc6dd1022012-10-04 14:00:14 -070044and the other peripherals work like they do on "toro".
45
46The Motorola Xoom can be used in the Wi-Fi configuration "wingray"
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -080047sold in the USA, with Android 4.1.2. Graphics and audio are functional
Jean-Baptiste Querua4f6f9b2012-11-09 12:40:10 -080048as well as Wi-Fi and Bluetooth and the orientation sensors.
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070049
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -080050All configurations of Nexus S and Nexus S 4G can be used with Android 4.1.2.
Jean-Baptiste Querua4f6f9b2012-11-09 12:40:10 -080051On those devices all the peripherals are functional: graphics, audio, Wi-Fi,
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -080052Bluetooth, cell networks, sensors, camera, hardware codecs, NFC, GPS.
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -070053
54In addition, [PandaBoard](http://pandaboard.org) a.k.a. "panda" can be used
Jean-Baptiste Queru71886422013-02-11 14:55:29 -080055in the jb-mr1-dev-plus-aosp branch, but is considered experimental.
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070056The specific details to use a PandaBoard with the Android Open-Source Project
57are in the file `device/ti/panda/README` in the source tree.
58
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -070059Nexus One a.k.a. "passion" is obsolete, was experimental in gingerbread,
60and can't be used with newer versions of the Android Open-Source
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070061Project.
62
63Android Developer Phones (ADP1 and ADP2, a.k.a. "dream" and "sapphire") are
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -070064obsolete, were experimental in froyo, and can't be used with
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070065newer versions of the Android Open-Source Project.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070066
67## Building fastboot and adb ##
68
69If you don't already have those tools, fastboot and adb can be built with
70the regular build system. Follow the instructions on the page about
71[building](building.html), and replace the main `make` command with
72
73 $ make fastboot adb
74
75## Booting into fastboot mode ##
76
77During a cold boot, the following key combinations can be used to boot into fastboot mode,
78which is a mode in the bootloader that can be used to flash the devices:
79
80Device | Keys
81---------|------
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -080082manta | Press and hold both *Volume Up* and *Volume Down*, then press and hold *Power*
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -070083grouper | Press *Power* for a second, and press *Volume Down* when the bootloader logo appears
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -080084tilapia | Press *Power* for a second, and press *Volume Down* when the bootloader logo appears
Jean-Baptiste Queru60a47f32012-10-08 14:55:09 -070085phantasm | Power the device, cover it with one hand after the LEDs light up and until they turn red
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -070086maguro | Press and hold both *Volume Up* and *Volume Down*, then press and hold *Power*
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -070087toro | Press and hold both *Volume Up* and *Volume Down*, then press and hold *Power*
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -080088toroplus | Press and hold both *Volume Up* and *Volume Down*, then press and hold *Power*
Conley Owens9aaa52a2012-02-03 14:13:27 -080089panda | Press and hold *Input*, then press *Power*
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -080090wingray | Press and hold *Volume Down*, then press and hold *Power*
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070091crespo | Press and hold *Volume Up*, then press and hold *Power*
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -070092crespo4g | Press and hold *Volume Up*, then press and hold *Power*
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070093
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -070094Also, the command `adb reboot bootloader` can be used to reboot from
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -070095Android directly into the bootloader with no key combinations.
96
97## Unlocking the bootloader ##
98
99It's only possible to flash a custom system if the bootloader allows it.
100
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800101The bootloader is locked by default. With the device in fastboot mode, the
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800102bootloader is unlocked with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700103
104 $ fastboot oem unlock
105
106The procedure must be confirmed on-screen, and deletes the user data for
107privacy reasons. It only needs to be run once.
108
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800109All data on the phone is erased, i.e. both the applications' private data
Jean-Baptiste Queru93afea92011-12-16 18:25:07 -0800110and the shared data that is accessible over USB, including photos and
111movies. Be sure to make a backup of any precious files you have before
112unlocking the bootloader.
113
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800114On Nexus 10, after unlocking the bootloader, the internal storage is
115left unformatted and must be formatted with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700116
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800117 $ fastboot format cache
118 $ fastboot format userdata
119
120The bootloader can be locked back with
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700121
122 $ fastboot oem lock
123
Jean-Baptiste Queru93afea92011-12-16 18:25:07 -0800124Note that this erases user data on Xoom (including the shared USB data).
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800125
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700126## Obtaining proprietary binaries ##
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700127
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800128The Android Open-Source Project can't be used
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700129from pure source code only, and requires additional hardware-related proprietary
130libraries to run, specifically for hardware graphics acceleration.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700131
Jean-Baptiste Querub27d7b72012-12-18 15:52:03 -0800132Official binaries for Nexus S, Nexus S 4G, Galaxy Nexus, Nexus 7,
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800133Nexus 10 and PandaBoard
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -0700134can be downloaded from
Jean-Baptiste Queru66426b32012-04-20 07:14:05 -0700135[Google's Nexus driver page](https://developers.google.com/android/nexus/drivers),
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700136which add access to additional hardware capabilities with non-Open-Source code.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700137
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -0700138When using the master branch for a device, the binaries for the most
Jean-Baptiste Queru993d0b82012-04-19 17:24:35 -0700139recent numbered release are the ones that should be used in the master
140branch.
141
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700142### Extracting the proprietary binaries ###
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700143
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700144Each set of binaries comes as a self-extracting script in a compressed archive.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700145After uncompressing each archive, run the included self-extracting script
146from the root of the source tree, confirm that you agree to the terms of the
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700147enclosed license agreement, and the binaries and their matching makefiles
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700148will get installed in the `vendor/` hierarchy of the source tree.
149
Jean-Baptiste Queru5da75392011-05-17 14:32:56 -0700150### Cleaning up when adding proprietary binaries ###
151
152In order to make sure that the newly installed binaries are properly
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700153taken into account after being extracted, the existing output of any previous
154build needs to be deleted with
155
156 $ make clobber
157
158## Picking and building the configuration that matches a device ##
159
160The steps to configure and build the Android Open-Source Project
161are described in the page about [Building](building.html).
162
163The recommended builds for the various devices are available through
Jean-Baptiste Queru3e466b02011-10-06 14:34:00 -0700164the lunch menu, accessed when running the `lunch` command with no arguments:
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700165
Jean-Baptiste Queru993d0b82012-04-19 17:24:35 -0700166Device | Branch | Build configuration
167---------|------------------------------|------------------------
Jean-Baptiste Queru71886422013-02-11 14:55:29 -0800168manta | android-4.2.1_r1.2 | full_manta-userdebug
169grouper | android-4.2.1_r1.2 | full_grouper-userdebug
170maguro | android-4.2.1_r1.2 | full_maguro-userdebug
171toro | android-4.2.1_r1.2 | full_toro-userdebug
172toroplus | jb-mr1-dev-plus-aosp | full_toroplus-userdebug
173panda | jb-mr1-dev-plus-aosp | full_panda-userdebug
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800174wingray | android-4.1.2_r1 | full_wingray-userdebug
175crespo | android-4.1.2_r1 | full_crespo-userdebug
176crespo4g | android-4.1.2_r1 | full_crespo4g-userdebug
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700177
Jean-Baptiste Queruc6dd1022012-10-04 14:00:14 -0700178Do not use 4.1.1 on a Nexus 7 that was originally sold with 4.1.2
179or newer.
180
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700181## Flashing a device ##
182
183Set the device in fastboot mode if necessary (see above).
184
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700185An entire Android system can be flashed in a single command: this writes
Jean-Baptiste Queruccdda522011-05-19 10:47:27 -0700186the boot, recovery and system partitions together after verifying that the
Jean-Baptiste Queru61745ea2011-09-08 14:44:15 -0700187system being flashed is compatible with the installed bootloader and radio,
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -0700188and reboots the system. This also erases all the user data, similarly to
189`fastboot oem unlock` mentioned earlier.
Jean-Baptiste Querub4d39b42011-04-11 13:53:58 -0700190
191 $ fastboot -w flashall
192
Jean-Baptiste Queru35f51012011-12-14 09:32:22 -0800193Note that filesystems created via fastboot on Motorola Xoom aren't working
194optimally, and it is strongly recommended to re-create them through recovery
195
196 $ adb reboot recovery
197
198Once in recovery, open the menu (press Power + Volume Up), wipe the cache
199partition, then wipe data.
200
Jean-Baptiste Queru93afea92011-12-16 18:25:07 -0800201## Restoring a device to its original factory state ##
202
Jean-Baptiste Queru0318a192012-04-05 08:13:08 -0700203Factory images
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800204for Nexus 10,
Jean-Baptiste Queru5955ba52012-11-09 10:59:40 -0800205for Nexus Q,
206for Nexus 7 (all variants),
207for Galaxy Nexus (GSM/HSPA+ "yakju" and "takju",
208and CDMA/LTE "mysid" and "mysidspr"),
Jean-Baptiste Queru0318a192012-04-05 08:13:08 -0700209and
Jean-Baptiste Queruc10820f2012-07-17 13:33:48 -0700210for Nexus S and Nexus S 4G (all variants)
Jean-Baptiste Queru0318a192012-04-05 08:13:08 -0700211are available from
Jean-Baptiste Queru66426b32012-04-20 07:14:05 -0700212[Google's factory image page](https://developers.google.com/android/nexus/images).
Jean-Baptiste Queru93afea92011-12-16 18:25:07 -0800213
214Factory images for the Motorola Xoom are distributed directly by Motorola.