Android Tutorial Creating a Wear device avd / emulator

So, Google released the new Android Wear platform and obviously we all want to try it out. I have been very lucky and have managed to get my hands on a real device. A Samsung Gear Live to be precise. For some reason I simply love the idea of the platform and the device has made the update to the Notification Builder library possible as I don't believe features such as voice input are possible with an emulator.

For those that can't get the real deal or cannot justify the purchase for whatever reason, Google have also made it possible to create an AVD emulator.

Here I will outline how to create the Wear AVD for those that would normally struggle with such a task.

Install the required SDK packages

The first step is to load up the Android SDK manager and install the following packages:
  • Android 4.4W (API 20)
    • SDK Platform
    • Android Wear ARM EABI vxx System Image
sdk-manager.png


It would also be a good idea to install the Android Support library now if you don't have it already. Or update it if required.

Once all is installed close the SDK Manager and...

Start Android Virtual Device (AVD) Manager

Click 'Create' to start creating a new AVD.

Enter details like below
wearavdsettings.png

Click 'OK' to save the AVD.

Select the new AVD from the list and click 'Start' followed by 'Launch' on the popup. This will launch the new AVD.

Please be aware, the AVD can take a while to boot up.

Whilst you are waiting for the AVD to boot up.

Install the Android Wear App
I have tested this with a tablet (in fact this tutorial was created using a Nexus 7) and although the connection is made, Notifications don't seem to work from a tablet. Now, due to the purpose of the Wear platform I can half understand why it wouldn't but it is not something that is documented as far as I can see. If you try this tutorial with a tablet please post your findings. Thanks

Update: I am Dumb - Take a look at the 'connected' screenshot below. There is an option to turn on the Notifications. I should read the screen more lol.

Grab your handheld device (phone / tablet), it needs to be running Android 4.3 or above and have USB Debugging enabled in the Developer options. On your handheld device visit the Play Store and install the Android Wear app. This is required to connect your handheld device to the Wear device (AVD or Real).

Once the app is installed....

Connect the 2 together

Now that the AVD has booted and the app is installed, it is time to connect up. The Wear AVD will show a bit of a tutorial, get that out of the way using your mouse to swipe. You will see a small icon of a cloud with a line through it. This means the AVD is disconnected.

Connect your handheld device to the pc with a USB lead.

Run the Android Wear app, press the Settings button and tap 'Pair with emulator'.

wearapp.png


On your PC open command prompt and change the directory to the location of your adb.exe
Example
B4X:
cd Program Files\Android\sdk\platform-tools

then type

B4X:
adb -d forward tcp:5601 tcp:5601

The 2 should now connect after a few seconds (it can take as long as a minute or so due to emulator speed) and that's pretty much it. Once connected the 2 will look like this.

wearappconnected.png


Ignore that time differences, that was due to delay in me taking the screenshot on different devices...

You will need to run the adb forward command each time you wish to connect the 2.

Have fun!!!
 
Last edited:

barx

Well-Known Member
Licensed User
Longtime User
The Android Wear app has changed slightly (either that or it is just slightly different from phone to tablet) so I have edited the OP and added a couple more pictures just to clear things up.
 

NeoTechni

Well-Known Member
Licensed User
Longtime User
Now how do we make apps for the watch? Is it just regular android development with a smaller screen?
 

barx

Well-Known Member
Licensed User
Longtime User
Now how do we make apps for the watch? Is it just regular android development with a smaller screen?

I am hoping to soon have a tutorial for packaging the apps and a Data sync library so the 2 can talk to each other, No time frame as yet, but hopefully not too long.
 

nibbo

Active Member
Licensed User
Longtime User
Guide to connect emulator (handheld) with emulator (wear device) http://stackoverflow.com/questions/25205888/pairing-android-and-wear-emulators

Barx, many thanks for this thread but... just a word of warning here!
The above thread contains a link to a download for com.google.wearable.app-2.apk.
When I ran this it flooded my PC with Malware and PUPs (149 of them to be precise)!

Does anyone know if this apk is available from a reliable source anywhere?
I cant find it anywhere but apparently it will allow the emulated phone to connect to the emulated wear device.
 
Top