Zac Gross

Code & More

Configuring Android Wear Emulator for Debugging With Physical Device

| Comments

I recently started developing an Android Wear app and needed to pair a watch running in an emulator to a physical phone(s4). The current documentation on the net is somewhat stale so the following is an up to date procedure:

  1. Power on Android Watch AVD
  2. Connect the physical phone via usb and ensure usb debugging is turned on in system options.
  3. Turn on blue tooth debugging on the watch
    • swipe to get to the settings menu
    • scroll down to the about menu
    • tap 7 times on the build number to enable developer mode
    • navigate back to the main settings menu and select developer options
    • tap enable avd debugging
    • tap enable bluetooth debugging (disabled until avd is enabled)
    • on the home screen a notification should be displayed stating bluetooth debugging is enabled
  4. In an SDK console type “avd devices” both the physical phone and watch emulator should be listed
  5. Type “adb -d forward tcp:5601 tcp:5601” to map the emulator ports
  6. On the phone download the Android Wear app from the play store.
  7. Open the wear app and choose pair device.
  8. On the pair device screen press the physical menu/settings button on the phone. An option to “connect to emulator” will appear, tap it.
  9. The phone should find and connect to the emulator and display the connected options in the wear app. You can scroll to the bottom and tap one of test options to send a test notification to the paired watch.

Comments