Skip to content

Most visited

Recently visited

navigation

Download and Test with a Device

You can run and test your app with the Android Wear 2.0 Preview in either of these ways:

  • Install Android Wear 2.0 on a supported watch, or
  • Set up an emulator that is running Android Wear 2.0

If you want an environment for basic compatibility testing of your app, you can use your current APK and a supported watch or an emulator. As described below, you don't necessarily need to update your full development environment to do basic testing.

However, if you want to modify your app to target Android Wear 2.0 or use new APIs, you need to update your development environment. See Get Started with the Preview.

Set Up a Watch

You can download a system image and manually flash it to a matching watch. See the table below to download the image for your test watch.

Manually flashing a watch is useful if you need precise control over the test environment or need to reinstall frequently, such as for automated testing.

Warning: Installing a system image on a watch removes all data from the watch, so you should back up your data first.

Preview system images

The preview includes system images for testing your app. Based on your device, you can download a preview system image from one of the following tables and flash it to the corresponding device.

Caution: After you flash an image to a watch, follow the steps for setting up a phone. To use a Wear 2.0 image on a watch, you must have a recent version of the companion app on a paired phone.

To restore your device to its original state during the preview, you can flash the appropriate retail system image, below, to the device.

Caution: After a watch is flashed with a Wear 2.0 preview image, subsequent releases can automatically be delivered via OTA, and may result in an automatic deletion of all data on the watch.

Preview image for LGE Watch Urbane 2nd Edition

Caution: Flashing your device will require unlocking the bootloader which may void the device's warranty--proceed at your own risk.

Type of LGE Watch Urbane 2nd Edition image Download/Checksums
Preview image for testing nemo-nvf41u-factory-e269c504.tgz
MD5: 1fdc92abde335cdaab107ddae39c676c
SHA-1: e269c504d08f2671be4f6a5195297fb88b000aaa
Non-preview image (for after testing) nemo-mfd18l-factory-3faf6f2d.tgz
MD5: f3a0090c0e99da82ad095b5d2a9acc6d
SHA-1: 3faf6f2d7f422a17a5f6c54cf5e1d2c5622689b0

Preview image for Huawei Watch

Caution: Flashing your device will require unlocking the bootloader which shall void the device's warranty--proceed at your own risk.

Type of Huawei Watch image Download/Checksums
Preview image for testing sturgeon-nvf41u-factory-fb1f3790.tgz
MD5: 870a181a54c5052f4a2244c920350641
SHA-1: fb1f3790746563656f88f04009298463f54e46c6
Non-preview image (for after testing) sturgeon-m6e69f-factory-e659286a.tgz
MD5: 12ce6cb0b0e43b67ea46a886eae052ae
SHA-1: e659286aa9004f4555a476ede4e8b690f56cfefd

Flash a watch

The steps for flashing an image to a watch are similar to the steps provided for flashing to a phone. After you back up your watch data, use steps in this section to flash the image to the specific watch that matches the image (e.g., you must use an LGE Watch Urbane 2nd Edition for the corresponding image).

Warning: Installing a system image on a watch removes all data from the watch, so you should back up your data first.

Set up the watch to be flashed

On the watch, enable the Developer Options menu and ADB debugging as follows:

  1. Open the Settings menu on the watch.
  2. Scroll to the bottom of the menu. If no Developer Options item is provided, tap System and then About.
  3. Tap the build number 7 times.
  4. From the Settings menu, tap Developer Options.
  5. Enable ADB debugging.

Confirm installation of the fastboot tool

To flash a device using one of the system images, confirm that you have the fastboot tool in the platform-tools/ directory of the Android SDK. Be sure that you have the latest version of the Android SDK Platform-tools from the SDK Manager.

After you confirm that you have the fastboot tool, add the tool to your PATH environment variable so the tool can be found when you flash the watch.

Transfer the image to the watch

To download a preview image and flash it to the watch:

  1. Download and unzip the appropriate system image from a "Preview image for testing" row in a table above.
  2. Attach the watch charger to the watch and plug the USB cord (from the charger) into your computer.
  3. Use the following adb command to confirm that the watch is recognized. You may need to turn ADB debugging off and then on for the watch to be recognized: adb devices
  4. Use the following adb command to start the device in fastboot mode: adb reboot bootloader
  5. If necessary, use one of following two commands to unlock the device's bootloader. This step erases all data on the device: fastboot flashing unlock or, for some devices, fastboot oem unlock
  6. On the watch, select the option to unlock the bootloader.
  7. On your computer, navigate to the directory where you unzipped the system image in Step 1. At the top level of that directory, execute the flash-all script by typing flash-all.sh or, in the case of Windows, flash-all.bat. The following may need to precede the command: ./

Set up the watch

After the flash-all script finishes, the watch reboots. Only pair the watch with a phone (so you can begin testing the preview) by using the instructions in Set Up a Phone. Additionally, before installing an app, perform the following steps on the watch to re-secure the watch's bootloader:

  1. Open the Settings menu by long-pressing the physical button.
  2. Scroll to the bottom of the menu and tap About.
  3. Tap the build number 7 times.
  4. From the Settings menu, tap Developer Options.
  5. Enable ADB debugging.
  6. Connect the watch to your computer and tap Always allow from this computer. (You may need to turn ADB debugging off and then on, to be prompted to always allow ADB debugging from the connected computer.)
  7. Use the following adb command to start the device in fastboot mode: adb reboot bootloader
  8. Use the following command to lock the device's bootloader: fastboot flashing lock or, for some devices, fastboot oem lock
  9. On the watch, continue the boot as follows: On an LGE Watch Urbane 2nd Edition, choose Start and touch '0'. On a Huawei Watch, confirm that Reboot is chosen and long-press the physical button.

After you follow the instructions in Set Up a Phone, your watch will be ready for you to install and run your app:

  1. Open your app in Android Studio.
  2. Select your Wear app module name from the Run/Debug configuration drop-down menu (typically wear).
  3. Click the Play button.
  4. In the Select Deployment Target box, click your device.

After your app is installed on the watch, the app should run.

When testing is completed, follow the steps for removing the preview.

Remove the preview from a watch

When testing with the preview is done, unpair ("Forget") the watch from the phone and restore the watch as follows:

  1. Download and unzip the appropriate system image from a "Non-preview image" row in a table above.
  2. Manually flash the image to the watch using steps similar to those in Transfer the image to the watch, except that you flash the non-preview image to the watch.

Note: Removing a preview system image requires a full device reset and removes all user data on the device.

Set Up a Phone

On a phone, follow the instructions in this section to install the Wear companion app on an Android phone.

Alternatively, for an iPhone, see Companion app for iPhones.

Download and install the Android version of the companion app

On the Play Store on your phone, go to the Android Wear app listing. Tap Update to download and install the app. After installation, confirm that Auto-update is selected for the app (see the "Set up automatic updates for specific apps" section of Update downloaded apps). Tap Open to start the app.

Pair the phone to the watch

After you install the companion app on a phone, unpair ("Forget") any obsolete watch pairings, if necessary. Then you can pair the phone to a newly-imaged watch:

  1. On the phone, select your device name from the list of devices. A pairing code is displayed on the phone and on the watch. Ensure that the codes match.
  2. Tap Pair to continue the pairing process. When the watch is connected to the phone, a confirmation message is displayed. On the phone, a screen is displayed that lists the accounts on the phone.
  3. Choose a Google Account to add and sync to your watch.
  4. Confirm the screen lock and enter the password to start the copying of the account from the phone to the watch.
  5. Follow the instructions in the wizard to finish the pairing process.

You can begin testing your app with the preview.

Set Up an Emulator

To test with the Android Emulator, confirm that you have the latest version of the Android SDK Platform-tools from the SDK Manager.

After you create a virtual device as described below, follow the steps for setting up a phone.

Create a new virtual device in Android Studio as follows:

  1. Open the AVD Manager by selecting Tools > Android > AVD Manager.
  2. Click Create Virtual Device.
  3. In the Category pane, select Wear and choose a hardware profile. The Android Wear 2.0 Developer Preview is only optimized for round devices currently, so we recommend not using the square or chin profiles for now. Click Next.
  4. Select a Nougat image to download. The images may be on the x86 tab instead of the Recommended tab, until installed. For example, select the image with the Release Name of Nougat, the API Level of 25, and the Target of "Android 7.1.1 (with Android Wear)". When the download and installation are complete, click Finish and then click Next.
  5. Verify the configuration of the Android Virtual Device (AVD) and click Finish.
  6. Start the emulator by selecting the new virtual device, clicking the Play button, and waiting until the emulator initializes and shows the Android Wear home screen.

Pair the phone with the emulator, and sync a Google Account, as follows:

  1. Follow the steps for setting up a phone.
  2. On the phone, enable Developer Options and USB Debugging.
  3. Connect the phone to your computer through USB.
  4. Forward the AVD's communication port to the connected handheld device (each time the phone is connected):
    adb -d forward tcp:5601 tcp:5601
  5. On the phone, in the Android Wear app, begin the standard pairing process. For example, on the Welcome screen, tap the Set It Up button. Alternatively, if an existing watch already is paired, in the upper-left drop-down, tap Add a New Watch.
  6. On the phone, in the Android Wear app, tap the Overflow button, and then tap Pair with Emulator.
  7. Tap the Settings icon.
  8. Under Device Settings, tap Emulator.
  9. Tap Accounts and select a Google Account, and follow the steps in the wizard to sync the account with the emulator. If necessary, type the screen-lock device password, and Google Account password, to start the account sync.

You can now test an app with a virtual preview device in the Android Emulator. For information about using virtual devices, see Create and Manage Virtual Devices.

Android Wear 2.0 for China Developer Preview

You can use the China Developer Preview system image in this section for creating and testing Android Wear apps for the Chinese market (only).

Warning: Installing the system images below on a watch removes all data from the watch, so you should backup your data first.

These images generally are used the way the standard Wear 2.0 images, described above, are used. Download the preview system image below and manually flash it to a test watch. However, you must continue to use Google Play Services 7.8.87, which is compatible with Android Wear for China. As described below, when testing is completed, you can restore the watch with the China non-preview image below.

Caution: After you flash the preview image to a watch, you must manually install the companion app version below onto a phone, to be able to pair with the watch running the Wear 2.0 China Developer Preview image.

China Developer Preview: Image for Huawei Watch

Caution: Flashing your device will require unlocking the bootloader which shall void the device's warranty--proceed at your own risk.

Warning: The image below is only for developing apps for the Wear 2.0 China Developer Preview.

To restore your device to its original state (the retail image), flash the non-preview image, below, to the device.

Type of China Huawei Watch system image Download/Checksums
China Developer Preview image for testing sturgeon_sw-nlf41f-factory-bfa16220.tgz
MD5: e7da8c5f58e46360ca5cbc5765d5577a
SHA-1: bfa1622016a3089ef2ad8e32756b315c32e14b01
China Non-preview image (for after testing) sturgeon_sw-m2f35-factory-d04afd5a.tgz
MD5: 58f54b9d4b991aa16663ae3b912f45f0
SHA-1: d04afd5a5496628af5148f94d9201983cf303085

China Developer Preview: Companion phone app

Warning: The companion app below is only for developing apps for the Wear 2.0 China Developer Preview.

To restore the China companion app on a phone after using the special version below, first uninstall the special version. Then enter the watch setup flow (after flashing a watch with the Non-preview image above) and use your phone to scan the barcode in that watch setup flow to get and restore the companion app.

China companion app for testing Download/Checksums
China companion app CompanionLocalEditionRelease_signed.apk
MD5: 2c1122e4f715ac1d53f39dd4977c2523
SHA-1: a81f8180a346ae428811265ded931abdde01b2a6
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.