vendredi 21 août 2015

[TUTORIAL] Connect and Debug Moto 360 over Bluetooth



Hello all, I've been working on a couple custom apps for my Moto 360, and I'm loving it! After some digging around in the forums, I had a hard time finding DECENT threads that pertained to Bluetooth debugging for your spanky Moto wearable, so here is a quick how-to!

First thing, debugging by Bluetooth is EXTREMELY simple. This does not require you to rip apart your favorite USB cable or perform some electrical engineering Jesus magic to acquire a unique USB connection for ADB. YES, wireless debugging IS possible, and is ONLY ADB capable, NOT FASTBOOT capable!

This means: no, I'm sorry fellow wearabees, you can not root/unlock/or flash partitions through ADB or Bluetooth. It's just not possible, and quite possibly would never be possible due to safe flashing procedures. The chances of bricking a device over a wireless connection is exponentially higher than a cabled connection. This is mostly because of interference, range issues, all together nuclear fallout, or your cat is evil and likes to turn your Bluetooth connections off when you sleep at night (let's pray to Buddha this isn't the case...).

So, let's begin by adjusting a few settings on your 360 and your favorite handheld (that would be your cell phone, dummy):

** Go to your 360 settings and swipe all the way down to the bottom of your semi-circular screen to the About section. Poke your cute little watch face to open About.

**Scroll down in your About section to Build Number and tap that guy 100 times, as fast as possible! (You only need to tap it 7 times, but at least it makes developing fun). This should add a new option in your settings named Developer Options.

**Enter your developer options and enable ADB Debugging, at which point the option below this will become available.

**Select the Debug over Bluetooth option to enable what this whole tutorial is about.

**Now, do the same for your handheld. Tap that Build Number, yeah boy! (Sexual pun intended)

Great! You're one step closer to being Super Sayan! (Not really, I have no affiliation with Dragonball Z)

Ok, now we need to open your terminal/command prompt window and change directory to your ADB executable location. From this location we will need to run ADB:


Quote:









adb forward tcp:4444 localabstract:/adb-hub




then:

Quote:









adb connect localhost:4444




The first command forwards the ADB connection of the phone to the remote connection of the 360 by Bluetooth. The second command simply gets the connection initiated with the remote address.

Now, for safe keeping I will provide two options for giving ADB commands to your 360. The first option should be your preferred option for compatibility reasons:

Quote:









adb -s localhost:4444 <add you command here>




This code directs the command to your specific device. Otherwise, for quick code entry, you may use this:

Quote:









adb -e <add your command here>




This second code is a generic way of connecting to whatever debugging option is available, which doesn't always mean your 360. If you're a developer running debug apps, try not to use this command.

And that's about the basics! Super simple, and all ADB commands are available for your wearable. Don't forget, rebooting into the bootloader through ADB will require a USB connection, at which point also some Jesus magic, and let's hope you're willing to be a god for a day.

Have fun!



**

**



Aucun commentaire:

Enregistrer un commentaire