
Another way to debug Android applications on a virtual device
- Tutorial
I lived to such a life that I needed to write a program for android with bluetooth support. I didn’t want to torment the tablet all the time for debugging, so the most natural way is to use the emulator. And so, when I installed Adk and idea, 3 bumps from a rake formed on my forehead:
We do not live in the worst of the worlds, and so I managed to quickly find an acceptable solution.
This solution turned out to be android-x86 running under vmware, I didn’t install Vmware tools, so it all sounds a bit buzzing, but it works, and the virtual android has access to the laptop’s real bluetooth.
So, in steps:
Unfortunately, ethernet is not fully supported by this version of the android, and wifi is not emulated by the emulator, so google-account and the market are not available. But not really needed in a debugging environment.
- The main ADK emulator is terribly slow
- Intel native emulator does not work on a computer with an AMD processor
- ADK does not support bluetooth emulation at all
We do not live in the worst of the worlds, and so I managed to quickly find an acceptable solution.
This solution turned out to be android-x86 running under vmware, I didn’t install Vmware tools, so it all sounds a bit buzzing, but it works, and the virtual android has access to the laptop’s real bluetooth.
So, in steps:
- Download and install the latest VMWare player. There will be no screenshots
- We go to android-x86.org and download the installation image of Android-x86 4.0 RC2 for eeepc. There are several versions of android builds for different x86, but for some reason I liked this one
- Create a new virtual machine. The size of ram to taste, excess iron (for example, a printer and a floppy disk - we demolish) The size of the disk - any, anyway then it should be demolished
- We rebuild the virtual machine - we demolish the old SCSI disk, create a new IDE, size to taste; CD-ROM should look at the previously downloaded Android ISO
- The main thing for me is to share bluetooth
- Now run the virtual machine, install the android on a virtual disk
- android works
- And sees real devices
- The final touches - go to the console (there - Alt-F1, back - Alt-F7). Find out ip address and fix dns
- Now we run adb on the host machine
adb.exe connect 192.168.130.130
and - oh, happiness! Virtual tablet is available for debugging.
Unfortunately, ethernet is not fully supported by this version of the android, and wifi is not emulated by the emulator, so google-account and the market are not available. But not really needed in a debugging environment.