Home | History | Annotate | Download | only in preview
      1 page.title=Download and Test with a Device
      2 meta.keywords="wear-preview"
      3 page.tags="wear-preview"
      4 page.image=images/cards/card-n-downloads_2x.png
      5 
      6 @jd:body
      7 
      8 <div style="position:relative; min-height:600px">
      9 
     10   <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
     11 
     12     <p class="sdk-terms-intro">Before downloading and installing components of
     13       the Android Wear Preview SDK, you must agree to the following terms and
     14       conditions.</p>
     15 
     16     <h2 class="norule">Terms and Conditions</h2>
     17 
     18     <div class="sdk-terms" onfocus="this.blur()" style="width:678px">
     19 This is the Android Wear SDK Preview License Agreement (the License Agreement).
     20 
     21 1. Introduction
     22 
     23 1.1 The Android Wear SDK Preview (referred to in the License Agreement as the Preview and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
     24 
     25 1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
     26 
     27 1.3 Android-compatible means any Android implemation that (i) complies with the Android Compatibility Definition document, which can be found at the Android compatibility website (http://source.android.com/compatibility) and which may be updated from time to time; and (ii) successfully passes the Android Compatibility Test Suite (CTS).
     28 
     29 1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
     30 
     31 2. Accepting the License Agreement
     32 
     33 2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
     34 
     35 2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
     36 
     37 2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview.
     38 
     39 2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
     40 
     41 3. Preview License from Google
     42 
     43 3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, and non-sublicensable license to use the Preview solely to develop applications for compatible implementations of Android.
     44 
     45 3.2 You may not use this Preview to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK. You are of course free to develop applications for other platforms, including non-compatible implementations of Android, provided that this Preview is not used for that purpose.
     46 
     47 3.3 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
     48 
     49 3.4 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
     50 
     51 3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
     52 
     53 3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
     54 
     55 3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
     56 
     57 3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview.
     58 
     59 4. Use of the Preview by You
     60 
     61 4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
     62 
     63 4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries).
     64 
     65 4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so.
     66 
     67 4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party.
     68 
     69 4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
     70 
     71 4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
     72 
     73 4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released.
     74 
     75 5. Your Developer Credentials
     76 
     77 5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
     78 
     79 6. Privacy and Information
     80 
     81 6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
     82 
     83 6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
     84 
     85 7. Third Party Applications
     86 
     87 7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
     88 
     89 7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
     90 
     91 7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party.
     92 
     93 8. Using Google APIs
     94 
     95 8.1 Google APIs
     96 
     97 8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
     98 
     99 8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
    100 
    101 9. Terminating the License Agreement
    102 
    103 9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
    104 
    105 9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
    106 
    107 9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
    108 
    109 9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
    110 (A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
    111 (B) Google issues a final release version of the Android SDK.
    112 
    113 9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
    114 
    115 10. DISCLAIMERS
    116 
    117 10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
    118 
    119 10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
    120 
    121 10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
    122 
    123 11. LIMITATION OF LIABILITY
    124 
    125 11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
    126 
    127 12. Indemnification
    128 
    129 12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement.
    130 
    131 13. Changes to the License Agreement
    132 
    133 13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
    134 
    135 14. General Legal Terms
    136 
    137 14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview.
    138 
    139 14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
    140 
    141 14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable.
    142 
    143 14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement.
    144 
    145 14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
    146 
    147 14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
    148 
    149 14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
    150   </div><!-- sdk terms -->
    151 
    152 
    153 
    154     <div id="sdk-terms-form">
    155       <p>
    156         <input id="agree" type="checkbox" name="agree" value="1" onclick="onAgreeChecked()" />
    157         <label id="agreeLabel" for="agree">I have read and agree with the above terms and conditions</label>
    158       </p>
    159       <p><a href="" class="button disabled" id="downloadForRealz" onclick="return onDownloadForRealz(this);"></a></p>
    160     </div>
    161 
    162 
    163   </div><!-- end TOS -->
    164 
    165 
    166   <div id="landing">
    167 
    168     <div id="qv-wrapper">
    169       <div id="qv">
    170         <ol>
    171           <li>
    172             <a href="#set_up_a_watch">Set Up a Watch</a>
    173           </li>
    174           <li>
    175             <a href="#set_up_a_phone">Set Up a Phone</a>
    176           </li>
    177           <li>
    178             <a href="#set_up_an_emulator">Set Up an Emulator</a>
    179           </li>
    180         </ol>
    181       </div>
    182     </div>
    183 
    184     <p>
    185       You can run and test your app with the Android Wear 2.0 Preview
    186       in either of these ways:
    187     </p>
    188 
    189     <ul>
    190       <li>Install Android Wear 2.0 on a supported watch, or
    191       </li>
    192 
    193       <li>Set up an emulator that is running Android Wear 2.0
    194       </li>
    195     </ul>
    196 
    197     <p>
    198       If you want an environment for basic compatibility
    199       testing of your app, you can use your current APK and a
    200       supported watch or an emulator. As described below, you don't necessarily
    201       need to update your full development environment to do basic testing.
    202     </p>
    203 
    204     <p>
    205       However, if you want to modify your app to target
    206       Android Wear 2.0 or use new APIs, you need to update your development
    207       environment. See <a href="{@docRoot}wear/preview/start.html">Get Started
    208       with the Preview</a>.
    209     </p>
    210 
    211     <h2 id="set_up_a_watch">
    212       Set Up a Watch
    213     </h2>
    214 
    215     <p>
    216       You can download a system image and manually flash it to a matching
    217       watch. See the table below to download the image for your test
    218       watch.
    219     </p>
    220 
    221     <p>
    222       Manually flashing a watch is useful if you need precise control over the
    223       test environment or need to reinstall frequently, such as for automated
    224       testing.
    225     </p>
    226 
    227     <p class="warning">
    228       <strong>Warning:</strong> Installing a system image on a watch removes all
    229       data from the watch, so you should back up your data first.
    230     </p>
    231 
    232     <h3 id="preview_system_images">
    233       Preview system images
    234     </h3>
    235 
    236     <p>
    237       The preview includes system images for testing your app. Based on your
    238       device, you can download a preview system image from one of the
    239       following tables and flash it to the corresponding device.
    240     </p>
    241 
    242     <p class="caution"><strong>Caution:</strong>
    243       After you flash an image to a watch, follow the steps for
    244       <a href="#set_up_a_phone">setting up a phone</a> with the beta version of
    245       the Android Wear companion app. To use a Wear 2.0 image on a watch,
    246       you must have the beta companion app on a paired phone.
    247     </p>
    248 
    249     <p>
    250       To restore your device to its original state during the preview,
    251       you can flash the appropriate retail system image, below, to the device.
    252     </p>
    253 
    254     <h4 id="preview_image_for_lge_watch_urbane_2nd_edition">
    255       Preview image for LGE Watch Urbane 2nd Edition
    256     </h4>
    257 
    258     <p class="caution">
    259       <strong>Caution:</strong> Flashing your device will
    260       require unlocking the bootloader which may
    261       void the device's warranty--proceed at your own risk.
    262      </p>
    263 
    264     <table>
    265       <tr>
    266         <th style="width:300px">
    267           Type of LGE Watch Urbane 2nd Edition image
    268         </th>
    269         <th>
    270           Download/Checksums
    271         </th>
    272       </tr>
    273 
    274       <tr id="nemo-preview">
    275         <td>
    276           Preview image for testing
    277         </td>
    278         <td><a href="#top" onclick="onDownload(this)">nemo-nve68j-factory-302a33ea.tgz</a><br>
    279           MD5: ddfccc3e050c7e2db8d657c82f7d6291<br>
    280           SHA-1: 302a33eac348c401fcb165bad4b9aaa40c7beb2b
    281         </td>
    282       </tr>
    283 
    284       <tr id="nemo-non-preview">
    285         <td>
    286           Non-preview image (for after testing)
    287         </td>
    288         <td><a href="#top" onclick="onDownload(this)">nemo-mfd18l-factory-3faf6f2d.tgz</a><br>
    289           MD5: f3a0090c0e99da82ad095b5d2a9acc6d<br>
    290           SHA-1: 3faf6f2d7f422a17a5f6c54cf5e1d2c5622689b0
    291         </td>
    292       </tr>
    293 
    294     </table>
    295 
    296     <h4 id="preview_image_for_huawei_watch">
    297       Preview image for Huawei Watch
    298     </h4>
    299 
    300     <p class="caution">
    301       <strong>Caution:</strong> Flashing your device will require unlocking
    302       the bootloader which
    303       shall void the device's warranty--proceed at your own risk.
    304     </p>
    305 
    306     <table>
    307       <tr>
    308         <th style="width:300px">
    309           Type of Huawei Watch image
    310         </th>
    311         <th>
    312           Download/Checksums
    313         </th>
    314       </tr>
    315       <tr id="sturgeon-preview">
    316         <td>
    317           Preview image for testing
    318         </td>
    319         <td><a href="#top" onclick="onDownload(this)">sturgeon-nve68j-factory-6607cd31.tgz</a><br>
    320           MD5: f78ac6ba8bb84038d163cc2d7ca85040<br>
    321           SHA-1: 6607cd31858af1bfd50b905c68f7cf1f0b6e570e
    322         </td>
    323       </tr>
    324       <tr id="sturgeon-non-preview">
    325         <td>
    326           Non-preview image (for after testing)
    327         </td>
    328         <td><a href="#top" onclick="onDownload(this)">sturgeon-m6e69f-factory-e659286a.tgz</a><br>
    329           MD5: 12ce6cb0b0e43b67ea46a886eae052ae<br>
    330           SHA-1: e659286aa9004f4555a476ede4e8b690f56cfefd
    331         </td>
    332       </tr>
    333     </table>
    334 
    335     <h3 id="flash_a_watch">
    336       Flash a watch
    337     </h3>
    338 
    339     <p>
    340       The steps for flashing an image to a watch are similar to the <a href=
    341       "https://developers.google.com/android/nexus/images">steps provided for
    342       flashing to a phone</a>. After you back up your watch
    343       data, use steps in this section to flash the image to the
    344       specific watch that matches the image (e.g., you must
    345       use an LGE Watch Urbane 2nd Edition for the corresponding image).
    346     </p>
    347 
    348     <p class="warning">
    349       <strong>Warning:</strong> Installing a system image on a watch
    350       removes all data from the
    351       watch, so you should back up your data first.
    352     </p>
    353 
    354     <h4 id="set_up_the_watch_to_be_flashed">
    355       Set up the watch to be flashed
    356     </h4>
    357 
    358     <p>
    359       On the watch, enable the Developer Options menu and ADB debugging as
    360       follows:
    361     </p>
    362 
    363     <ol>
    364       <li>Open the Settings menu on the watch.
    365       </li>
    366 
    367       <li>Scroll to the bottom of the menu. If no <strong>Developer
    368       Options</strong> item is provided, tap <strong>System</strong>
    369       and then <strong>About</strong>.
    370       </li>
    371 
    372       <li>Tap the build number 7 times.
    373       </li>
    374 
    375       <li>From the Settings menu, tap <strong>Developer Options</strong>.
    376       </li>
    377 
    378       <li>Enable ADB debugging.
    379       </li>
    380     </ol>
    381 
    382     <h4 id="confirm_installation_of_the_fastboot_tool">
    383       Confirm installation of the fastboot tool
    384     </h4>
    385 
    386     <p>
    387       To flash a device using one of the <a href=
    388       "#preview_system_images">system images</a>, confirm that you have the
    389       <code>fastboot</code> tool in the <code>platform-tools/</code> directory
    390       of the <a href="https://developer.android.com/sdk">Android SDK</a>. Be
    391       sure that you have the latest version of the <strong>Android SDK
    392       Platform-tools</strong> from the <a href=
    393       "{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.
    394     </p>
    395 
    396     <p>
    397       After you confirm that you have the <code>fastboot</code> tool, add the
    398       tool to your PATH environment variable so the tool can be found when you
    399       flash the watch.
    400     </p>
    401 
    402     <h4 id="transfer_the_image_to_the_watch">
    403       Transfer the image to the watch
    404     </h4>
    405 
    406     <p>
    407       To download a preview image and flash it to the watch:
    408     </p>
    409 
    410     <ol>
    411       <li>Download and unzip the appropriate system image from a "Preview
    412       image for testing" row in a <a href="#preview_system_images">table
    413       above</a>.
    414       </li>
    415 
    416       <li>Attach the watch charger to the watch and plug the USB cord (from the
    417       charger) into your computer.
    418       </li>
    419 
    420       <li>Use the following <a href="{@docRoot}tools/help/adb.html">adb
    421       command</a> to confirm that the watch is recognized.
    422       You may need to turn ADB debugging off and then on for the watch to
    423       be recognized:
    424       <code>adb devices</code>
    425       </li>
    426 
    427       <li>Use the following adb command to start the device in fastboot mode:
    428       <code>adb reboot bootloader</code>
    429       </li>
    430 
    431       <li>If necessary, use one of following two commands to
    432       unlock the device's bootloader. This step erases all data on the
    433       device: <code>fastboot flashing unlock</code> or, for some
    434       devices, <code>fastboot oem unlock</code>
    435       </li>
    436 
    437       <li>On the watch, select the option to unlock the bootloader.
    438       </li>
    439 
    440       <li>On your computer, navigate to the directory where you unzipped the
    441       system image in Step 1. At the top level of that directory,
    442       execute the <code>flash-all</code> script by typing
    443       <code>flash-all.sh</code> or, in the case of Windows,
    444       <code>flash-all.bat</code>. The following may need to
    445       precede the command: <code>./</code>
    446       </li>
    447     </ol>
    448 
    449 
    450     <h4 id="set_up_watch">
    451       Set up the watch
    452     </h4>
    453 
    454     <p>
    455       After the <code>flash-all</code> script finishes, the watch reboots.
    456       Only pair the watch with a phone (so you can begin testing the preview)
    457       by using the instructions in <a href="#set_up_a_phone">Set Up a Phone</a>.
    458       Additionally, before installing an app, perform the
    459       following steps on the watch to re-secure the watch's bootloader:
    460     </p>
    461 
    462     <ol>
    463       <li>Open the Settings menu by long-pressing the physical button.
    464       </li>
    465 
    466       <li>Scroll to the bottom of the menu and tap <strong>About</strong>.
    467       </li>
    468 
    469       <li>Tap the build number 7 times.
    470       </li>
    471 
    472       <li>From the Settings menu, tap <strong>Developer Options</strong>.
    473       </li>
    474 
    475       <li>Enable ADB debugging.
    476       </li>
    477 
    478       <li>Connect the watch to your computer and tap <strong>Always allow from
    479       this computer</strong>. (You may need to turn ADB debugging off
    480       and then on, to be prompted to always allow ADB debugging from
    481       the connected computer.)
    482       </li>
    483 
    484       <li>Use the following adb command to start the device in fastboot mode:
    485       <code>adb reboot bootloader</code>
    486       </li>
    487 
    488       <li>Use the following command to
    489       lock the device's bootloader: <code>fastboot flashing lock</code> or, for some
    490       devices, <code>fastboot oem lock</code>
    491       </li>
    492 
    493       <li>On the watch, continue the boot as follows:
    494       On an LGE Watch Urbane 2nd Edition, choose
    495       <strong>Start</strong> and touch <strong>'0'</strong>.
    496       On a Huawei Watch, confirm that <strong>Reboot</strong> is chosen and
    497       long-press the physical button.
    498       </li>
    499     </ol>
    500 
    501     <p>
    502       After you follow the instructions in
    503       <a href="#set_up_a_phone">Set Up a Phone</a>,
    504       your watch will be ready for you to <a href=
    505       "{@docRoot}training/wearables/apps/creating.html#Install">install and run
    506       your app</a>:
    507     </p>
    508 
    509     <ol>
    510       <li>Open your app in Android Studio.
    511       </li>
    512 
    513       <li>Select your Wear app module name from the Run/Debug configuration
    514       drop-down menu (typically <strong>wear</strong>).
    515       </li>
    516 
    517       <li>Click the Play button.
    518       </li>
    519 
    520       <li>In the Select Deployment Target box, click your device.
    521       </li>
    522     </ol>
    523 
    524     <p>
    525       After your app is installed on the watch, the app should run.
    526     </p>
    527 
    528     <p>
    529       When testing is completed, follow the steps for <a href=
    530       "#remove_the_preview_from_a_watch">removing the preview</a>.
    531     </p>
    532 
    533     <h3 id="remove_the_preview_from_a_watch">
    534       Remove the preview from a watch
    535     </h3>
    536 
    537     <p>
    538       When testing with the preview is done, unpair ("Forget") the watch from the phone and
    539       restore the watch as follows:
    540     </p>
    541 
    542     <ol>
    543       <li>Download and unzip the appropriate system image from a "Non-preview
    544       image" row in a <a href="#preview_system_images">table
    545       above</a>.
    546       </li>
    547 
    548       <li>Manually flash the image to the watch using steps similar to those in
    549       <a href="#transfer_the_image_to_the_watch">Transfer the image to the
    550       watch</a>, except that you flash the <strong>non-preview</strong> image
    551       to the watch.
    552       </li>
    553     </ol>
    554 
    555     <p>
    556       <strong>Note</strong>: Removing a preview system image requires a full
    557       device reset and removes all user data on the device.
    558     </p>
    559 
    560     <h2 id="set_up_a_phone">
    561       Set Up a Phone
    562     </h2>
    563 
    564     <p>
    565       On a phone, follow the instructions in this section to install the beta
    566       version of the Android Wear companion app. The beta version cannot be run
    567       on a phone at the same time as the non-beta version. Additionally, the
    568       beta version is English-only.
    569     </p>
    570 
    571     <p>
    572       <p class="caution"><strong>Caution:</strong> If you have an existing
    573       pairing of the phone to a Wear 1.x
    574       watch, installation of the beta companion app will cause a loss of that
    575       pairing.
    576     </p>
    577 
    578     <h3 id="join-the-wear-2-0-preview-group">
    579       Join the Wear 2.0 preview group
    580     </h3>
    581 
    582     <p>
    583       To access the beta companion app, you must <a href=
    584       "https://groups.google.com/forum/#!forum/android-wear-developer-preview">join
    585       the preview group in Google Groups</a>.
    586     </p>
    587 
    588     <h3>
    589       Opt in for beta testing
    590     </h3>
    591 
    592     <p>
    593       On the <a href=
    594       "https://play.google.com/apps/testing/com.google.android.wearable.app">Testing
    595       Opt-in</a> page, select <strong>Become a Tester</strong>.
    596     </p>
    597 
    598     <h3 id="download-and-install-the-beta-version-of-the-companion-app">
    599       Download and install the beta version of the companion app
    600     </h3>
    601 
    602     <p>
    603       On the Play Store on your phone, go to the <a href=
    604       "https://play.google.com/store/apps/details?id=com.google.android.wearable.app">
    605       Android Wear app listing</a>. Tap <strong>Update</strong> to download and
    606       install the beta version of the app. After installation, confirm that
    607       <strong>Auto-update</strong> is selected for the app (see
    608       the "Set up automatic updates for specific apps" section of <a href=
    609       "https://support.google.com/googleplay/answer/113412">Update downloaded
    610       apps</a>). Tap <strong>Open</strong> to start the app.
    611     </p>
    612 
    613     <h3 id="pairing">
    614       Pair the phone to the watch
    615     </h3>
    616 
    617     <p>
    618       After you install the beta version of the companion app on a phone,
    619       unpair ("Forget") any obsolete watch pairings, if necessary.
    620       Then you can pair the phone to a newly-imaged watch:
    621     </p>
    622 
    623     <ol>
    624       <li>On the phone, select your device name from the list of devices.
    625       A pairing code is displayed on the phone and on the watch.
    626       Ensure that the codes match.
    627       </li>
    628 
    629       <li>Tap <strong>Pair</strong> to
    630       continue the pairing process. When the watch is connected to
    631       the phone, a confirmation message is displayed.
    632       On the phone, a screen is displayed that lists
    633       the accounts on the phone.
    634       </li>
    635 
    636       <li>Choose a Google Account to add and sync to your watch.
    637       </li>
    638 
    639       <li>Confirm the screen lock and enter the password to start the copying of
    640       the account from the phone to the watch.
    641       </li>
    642 
    643       <li>Follow the instructions in the wizard to finish the
    644       pairing process.
    645       </li>
    646     </ol>
    647 
    648     <p>
    649       You can begin testing your app with the preview.
    650     </p>
    651 
    652     <h2 id="set_up_an_emulator">
    653       Set Up an Emulator
    654     </h2>
    655 
    656     <p>
    657       To test with the Android Emulator,
    658       confirm that you have the latest version of the <strong>Android SDK
    659       Platform-tools</strong> from the <a href=
    660       "{@docRoot}studio/intro/update.html#sdk-manager">SDK Manager</a>.
    661     </p>
    662 
    663     <p>
    664       After you create a virtual device as described below, follow the steps for
    665       <a href="#set_up_a_phone">setting up a phone</a> with the beta version of
    666       the Android Wear companion app.
    667     </p>
    668 
    669     <p>Create a new virtual device in Android Studio as follows:
    670     </p>
    671 
    672     <ol>
    673       <li>Open the AVD Manager by selecting <strong>Tools &gt; Android &gt; AVD
    674       Manager</strong>.
    675       </li>
    676 
    677       <li>Click <strong>Create Virtual Device</strong>.
    678       </li>
    679 
    680       <li>In the <strong>Category</strong> pane, select <strong>Wear</strong>
    681        and choose a hardware profile.
    682        The Android Wear 2.0 Developer Preview
    683        is only optimized for round devices currently, so we recommend not
    684        using the square or chin profiles for now.
    685        Click <strong>Next</strong>.
    686       </li>
    687 
    688       <li>Select a <strong>Nougat</strong> image to download. The images may be on
    689       the <strong>x86</strong> tab instead of the <strong>Recommended</strong>
    690       tab, until installed. For example, select the image with the
    691       <strong>Release Name</strong> of Nougat, the <strong>API Level</strong> of 24,
    692       and the <strong>Target</strong> of "Android 7.0 (with Android Wear)".
    693       When the download and installation are complete, click
    694       <strong>Finish</strong> and then click <strong>Next</strong>.
    695       </li>
    696 
    697       <li>Verify the configuration of the Android Virtual Device (AVD) and
    698       click <strong>Finish</strong>.
    699       </li>
    700 
    701       <li>Start the emulator by selecting the new virtual device, clicking the
    702       <strong>Play</strong> button, and waiting until
    703       the emulator initializes and shows the Android Wear home screen.
    704       </li>
    705     </ol>
    706 
    707     <p>
    708       Pair the phone with the emulator, and sync a Google Account, as follows:
    709     </p>
    710 
    711     <ol>
    712       <li>Follow the steps for
    713       <a href="#set_up_a_phone">setting up a phone</a> with the beta version of
    714       the Android Wear companion app.
    715       </li>
    716 
    717       <li>On the phone, enable Developer Options and USB Debugging.
    718       </li>
    719 
    720       <li>Connect the phone to your computer through USB.
    721       </li>
    722 
    723       <li>Forward the AVD's communication port to the connected handheld device
    724       (each time the phone is connected):<br>
    725       <code>adb -d forward tcp:5601 tcp:5601</code>
    726       </li>
    727 
    728       <li>On the phone, in the Android Wear app, begin the standard pairing
    729       process. For example, on the Welcome screen, tap the
    730       <strong>Set It Up</strong> button.
    731       Alternatively, if an existing watch already is paired, in the upper-left
    732       drop-down, tap <strong>Add a New Watch</strong>.
    733       </li>
    734 
    735       <li>On the phone, in the Android Wear app, tap the
    736       Overflow button, and then tap
    737       <strong>Pair with Emulator</strong>.
    738       </li>
    739 
    740       <li>Tap the Settings icon.
    741       </li>
    742 
    743       <li>Under Device Settings, tap <strong>Emulator</strong>.
    744       </li>
    745 
    746       <li>Tap <strong>Accounts</strong> and select a Google Account,
    747       and follow the steps in the wizard to
    748       sync the account with the emulator. If necessary, type the screen-lock
    749       device password, and Google Account password, to start the account sync.
    750       </li>
    751     </ol>
    752 
    753     <p>
    754       You can now test an app with a virtual preview device
    755       in the <a href=
    756       "{@docRoot}tools/devices/emulator.html">Android Emulator</a>. For more
    757       information about using virtual devices, see <a href=
    758       "{@docRoot}studio/run/managing-avds.html">
    759       Create and Manage Virtual Devices</a>.
    760     </p>
    761 
    762  </div><!-- landing -->
    763 
    764 </div><!-- relative wrapper -->
    765 
    766 
    767 <script>
    768   var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/wear-preview/";
    769   function onDownload(link) {
    770 
    771     $("#downloadForRealz").html("Download " + $(link).text());
    772     $("#downloadForRealz").attr('href', urlRoot + $(link).text());
    773 
    774     $("#tos").fadeIn('fast');
    775     $("#landing").fadeOut('fast');
    776 
    777     return true;
    778   }
    779 
    780 
    781   function onAgreeChecked() {
    782     /* verify that the TOS is agreed */
    783     if ($("input#agree").is(":checked")) {
    784       /* reveal the download button */
    785       $("a#downloadForRealz").removeClass('disabled');
    786     } else {
    787       $("a#downloadForRealz").addClass('disabled');
    788     }
    789   }
    790 
    791   function onDownloadForRealz(link) {
    792     if ($("input#agree").is(':checked')) {
    793     /*
    794       $("#tos").fadeOut('fast');
    795       $("#landing").fadeIn('fast');
    796     */
    797 
    798       ga('send', 'event', 'M Preview', 'System Image', $("#downloadForRealz").html());
    799 
    800     /*
    801       location.hash = "";
    802     */
    803       return true;
    804     } else {
    805       return false;
    806     }
    807   }
    808 
    809   $(window).hashchange( function(){
    810     if (location.hash == "") {
    811       location.reload();
    812     }
    813   });
    814 
    815 </script>