Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 1 | page.title=Setting Up Hardware and AVDs |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 2 | @jd:body |
| 3 | |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 4 | <p>The Android L developer preview provides you with 32-bit system images |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 5 | to flash the following devices: |
| 6 | </p> |
| 7 | |
| 8 | <ul> |
| 9 | <li>Nexus 5</li> |
| 10 | <li>Nexus 7 Wi-Fi (version 2, released in 2013)</li> |
| 11 | </ul> |
| 12 | |
| 13 | <p>In addition, you also get the emulator system images, which includes |
| 14 | experimental 64-bit system images along with standard 32-bit system images. |
| 15 | </p> |
| 16 | |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 17 | <h2>Installing the L Preview System Image</h2> |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 18 | |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 19 | <!-- Will we get an official warning text from the lawyercats? Is this it? --> |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 20 | <p class="warning"><b>Warning</b>: This is a preview version of the Android |
| 21 | system image, and is subject to change. Your use of this system image is |
| 22 | governed by the Android SDK Preview License Agreement. The Android preview |
| 23 | system image is not a stable release, and may contain errors and defects that |
| 24 | can result in damage to your computer systems, devices, and data. The preview |
| 25 | Android system image is not subject to the same testing as the factory OS and |
| 26 | can cause your phone and installed services and applications to stop working. |
| 27 | </p> |
| 28 | |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 29 | |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 30 | <ol> |
| 31 | <li>Download and extract the Android Developer Preview package to a directory |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 32 | (which we'll call <code><l_download_dir></code> in these |
| 33 | instructions).</li> |
| 34 | <li>Connect your powered-off Android device to your development machine. Put |
| 35 | the device in fastboot mode by pressing and holding the following buttons: |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 36 | <ul> |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 37 | <li><strong>Nexus 5:</strong> <i>volume down</i> + <i>volume up</i> + |
| 38 | <i>power</i></li> |
| 39 | <li><strong>Nexus 7:</strong> <i>volume down</i> + <i>power</i> </li> |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 40 | </ul> |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 41 | <p class="note">Alternatively, you can enter fastboot mode by booting up |
| 42 | the device and running <code>adb reboot bootloader</code> with USB debugging |
| 43 | turned on.</p> |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 44 | </li> |
| 45 | <li>Follow the instructions at |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 46 | <a href="https://developers.google.com/android/nexus/images#instructions">developers.google.com/android</a> |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 47 | to set up your system for flashing devices.</li> |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 48 | <li>Run the <code><l_download_dir>/flash-all</code> script |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 49 | corresponding to your platform. This script flashes all of the system data |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 50 | onto the phone.</li> <!-- Confirm names of flash scripts --> |
| 51 | <li>(Optional) After flashing is complete, lock your device's bootloader by |
| 52 | putting it in fastboot mode and running <code>fastboot oem lock</code>. |
| 53 | (This does not wipe your device.) Once you do this, you will not be able to |
| 54 | flash your device until you run run <code>fastboot oem unlock</code>, |
| 55 | which unlocks the bootloader and wipes your device. We recommend you leave the |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 56 | bootloader unlocked until you are done with flashing the device.</li> |
| 57 | </ol> |
| 58 | |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 59 | <h3>Reverting a Device to Factory Specifications</h3> |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 60 | |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 61 | <p>If you want to uninstall the L Preview and revert the device to factory |
| 62 | specifications, go to <a href="http://developers.google.com/android |
| 63 | /nexus/images">developers.google.com/android</a> and download the image you want |
| 64 | to flash to for your device. Follow the instructions on that page to flash the |
| 65 | image to your device.</p> |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 66 | |
| 67 | |
| 68 | <h2>Setting up an AVD</h2> |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 69 | |
| 70 | <p>You can set up <a href="{@docRoot}tools/devices/">Android Virtual Devices |
| 71 | (AVD)</a> and use the emulator to build and test apps with the L Preview.</p> |
| 72 | |
| 73 | <p>To create an AVD with the AVD Manager:</p> |
Robert Ly | 2055529 | 2014-06-13 23:28:19 -0700 | [diff] [blame] | 74 | |
| 75 | <ol> |
Robert Ly | b8cabe9 | 2014-06-15 13:04:43 -0700 | [diff] [blame] | 76 | <li>Install the L Preview SDK in your development environment, as described |
| 77 | in <a href="{@docRoot}preview/setup-sdk.html">Setting Up the Preview |
| 78 | SDK.</a></li> |
| 79 | <li>Follow the steps in |
| 80 | <a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD |
| 81 | Manager</a>. Use the following settings: |
| 82 | <ul> |
| 83 | <li><b>Device:</b> Either Nexus 5 or Nexus 7</li> |
| 84 | <li><b>Target:</b> <!-- Confirm exact text when we have final distro --> |
| 85 | Android L (Preview) - API Level L</li> |
| 86 | </ul> |
| 87 | <!-- Confirm this works when you can download image through SDK manager! --> |
| 88 | </li> |
| 89 | </ol> |
| 90 | |