Menu Close

Tag: eclipse

Debugging Your Android App Wirelessly on an Android Smartphone

By JesseChen.net

Developing for Android is very easy to set up and get started on your computer. However, a gripe shared among others, not just me, is that the Android emulator is too slow. On my old computer, it would take 1-2 minutes for it to boot up. In debugging mode, the response time is very slow.

There are two methods:

  1. Connect your phone to your computer and find the drivers online (if needed) to allow adb to recognize your phone as a running Android device. Eclipse and the ADT plugin will take care of the rest.
  2. The super dumb way is to take the .apk file that your Android project generates every time it compiles (at yourappfolder/bin/yourapp.apk), connect your phone to the computer via USB, push it to your phone, and install. But that is also very inefficient (and dumb)! What if you just wanted to test a small change real quick? You would have to keep your phone tethered to the computer, and constantly overwrite your .apk file and re-install your application each time you wanted to test it on your phone.

I have a way that allows you to test your Android application on your Android smartphone without physically connecting your phone to your computer. All it requires is a rooted Android smartphone, and a shared wifi network between the computer and the phone.

Note: This method requires a phone with root access, and accessing adb over a wifi network might be a security concern for some. Take this method for what it’s worth. If you are doing this on your own home network that is trusted and encrypted there shouldn’t be a problem, but I would avoid doing this in a public wifi network.