📜 ⬆️ ⬇️

Another way to debug Android applications on a virtual device

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 for debugging all the time, so the most natural way is to use an emulator. And so, when I installed Adk and idea, 3 bumps from a rake were formed on my forehead:


We do not live in the worst of worlds, and therefore I managed to quickly find an acceptable solution.

This solution turned out to be the android-x86, launched under vmware, I did not install the Vmware tools, so it all starts to work slightly, but it works, and the virtual android has access to the real bluetooth of the laptop.

So, in steps:
  1. Download and install the latest VMWare player. No screenshots
  2. 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
  3. Create a new virtual machine. The size of the ram to taste, extra iron (for example, a printer and a floppy disk - we demolish) The size of the disk is any, anyway, then it is demolished


  4. We reconfigure the virtual machine - we demolish the old SCSI disk, create a new IDE, size to taste; CD-ROM should look at the previously downloaded ISO android
  5. The main thing for me - we share bluetooth
  6. Now we start virtualka, we install android on virtual disk
  7. android works
  8. And sees real devices
  9. The final touches - go to the console (there - Alt-F1, back - Alt-F7). Find out ip address and repair dns
  10. Now we are running 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 the Google account and the market are not available. But not really needed in a debugging environment.

Source: https://habr.com/ru/post/154395/


All Articles