Debugging an Android x86 application using Intellij
August 17, 2012 Leave a comment
OK, you decided to drop the incredibly slow Android emulator that comes with the official SDK and you are now happily using Android x86… but how do you debug your Android application using Intellij ?
That’s a good question ! (By the way, if you may want to check my last post if you need help running Android x86 in VMWare player).
First, you need to know the IP of your Android x86 VM. To do this, hit ALT-F1 in the VM and use the ‘netcfg’ command to know the IP address given to your eth0 device:
You can then hit ALT-F7 to go back to the Android UI.
Then, in your host PC (the one that is running Intellij), execute the ‘adb connect [ANDROID_X86_IP]” to connect the SDK debugger to your Android x86 VM:
Now go back to Intellij, display your run configuration and make sure that the “show chooser dialog” option is selected:
You are almost done: add a breakpoint in Intellij, launch the application in debug mode and then select your Android x86 device in the “choose device” dialog:
Any question ?