I struggled a lot with setting up bluetooth debugging for Android Wear using the Android Development Studio. Here’s my notes for future reference for Windows. There’s three parts :
Enable Developer Mode on phone
First off, we’ve got to enable Developer Mode on your phone. On my Nexus 5, I went to :
Settings > About Phone > Build number |
Just need to tap the Build number item 7 times. After a few taps, you should get a popup saying “You are now X steps from becoming a developer”. Once you hit the limit, you’ll get another popup saying “You are now a developer !”.
Now go back to :
Settings > Developer options |
It should be 2nd from the bottom (above About phone).
On the first screen, near the bottom, you should see a section called Debugging. Underneath that should be a switch for enabling USB debugging. Turn that on. Make sure to turn it off after you’re done just in case you happen to plug your phone into non-secure USB ports.
Enable Developer Mode on Wear device
Now we’ve got to enable Developer Mode on the Wear device. On my Moto360, I went to :
Settings > Settings > Build number |
Like the phone, tap the Build number item several times. You’ll get similar popups.
Now go back to :
Settings > Developer options |
Enable :
- ADB Debugging
- Debug Over Bluetooth
Back on your phone :
- Go to the Android Wear app.
- Settings
- At the bottom, you should see a checkbox for Debugging Over Bluetooth. Enable it.
You should now see two items under that section :
- Host disconnected
- Target connected
The Host connection is ADB to your Wear device, while the Target connection is from your phone to the Wear device. This brings us to the third step.
Connect ADB to Wear device
On your computer, run these ADB commands :
adb forward tcp:4444 localabstract:/adb-hub adb connect 127.0.0.1:4444 adb devices |
On adb dev
Test your connection :
adb -s 127.0.0.1:4444 shell screencap -p /sdcard/DCIM/wear_screenshot.png adb -s 127.0.0.1:4444 pull /sdcard/DCIM/ adb -s 127.0.0.1:4444 shell rm /sdcard/DCIM/screen.png |
Congrats ! Now you should be able to debug your Wear apps from the Android Developer Studio. Just go to Debug, select the Wear option, your device should show up in the ADK list.