Everything should be made as simple as possible, but not simpler. (Albert Einstein)

Tuesday, January 28, 2014

(Android) Connecting ADB to Physical Device Over Bluetooth

I found a good resource, http://crlog.info/2013/07/19/android-debugging-over-bluetooth-without-root/

Using physical device, but do not want to use USB cable, Bluetooth alternative works like a charm :)


The tutorial mentioned above is for Linux, however I'm trying it in MS Windows. The same steps, basically, 1. we need to run adb in tcp/ip mode,  
>adb tcpip 4455
we can then go back to usb mode by running  
>adb usb

2. pair device and PC/laptop, then turning on Bluetooth tethering,
(in Windows, open Bluetooth Places, then locate device's Bluetooth, do "connect Network service". Upon finishing, in the "Control Panel | Network Connections" there should be "Bluetooth LAN Access" entry)


3. get the default gateway address. Run
>ipconfig /all
in Windows terminal, e.g. "192.168.44.1" in my case.

4. in terminal, run
>adb connect 192.168.44.1:4455
with successful message,  
>connected to 192.168.1.103:4455

5. in Eclipse ADT, open an application, select run as android app, as usual.
Wait, "Android Device Chooser" should appear with the physical device in the list.

We can then do debugging as usual. 
Pics show a simple "Hello world" application running from Eclipse ADT,