Advertisements

Wireless debugging with adbWireless

One of the coolest new features of iOS 5 is the wireless sync feature. For a long time people have been required to plug in their iPhones to sync their data and receive updates. This of course was annoying, so Apple blessed its followers with wireless sync over Wifi. What some of you may not have realized is that this feature also includes wireless debugging of iOS apps. Thats right! If you are an iPhone developer, you can build and run your app on a registered device without wire!

So I started thinking, surely there must be something like this on Android! I figured it would be some kind of hack that didn’t really work well, but I decided to look anyways. As it would turn out, Android’s debugging interface ‘adb’ already supports this feature.┬áNow before you jump in, I take no responsibility if you break your device doing this. This is an ‘at your own risk’ article.

Setting up Wifi debugging for Android

There are two things you need to make this work. First your device must be rooted. Second you need an app that will enable wifi debugging. There are a few apps out there that open up wifi-debugging, but I decided to use this one.

Once it is installed all you have to do is connect your device to your computer via ‘adb’. This process is the same on mac, linux, and PC, though the files will probably be in different locations.

  1. Open up a terminal/command line window and navigate to the ‘platform-tools’ directory found in the sdk folder. On my mac this was ‘/Users/mtmurdock/Workspace/AndroidSDK/platform-tools’.
  2. On your Android device, enable wifi and make sure you are connected to the same wireless network as your computer.
  3. Open the app and press the big button. Take note of your phone’s IP Address (which should be displayed below the button). If you are using the widget and you missed your phone’s IP, just open the app from the app-drawer and it will be displayed there.
  4. On your computer, go to the terminal and run adb with the options “connect <phone’s-ip-address>”. On mac/linux this will look like “./adb connect 192.168.1.103:5555” and on PC this will look like “adb.exe connect 192.168.1.103:5555”.
You should now be connected! If you’re not sure type “./adb devices” into the terminal. You should see your device listed there. Now you can build and launch your app on your device as if it were plugged in via USB.
Hope this was helpful, cause I’m super stoked about it!
Advertisements