Blog Archives

android debug vm virtual virtualbox images ova eclipse

As an alternative to the default android virtual machines that come with the Android SDK and/or Eclipse, try the images from the site below:

http://androvm.org/blog/

The format is ova, which is easily opened by virtualbox, and there only two simple things to keep in mind.

1) After adding into virtualbox, add a port forwarding rule to the first ethernet device. Even though this defaults to “not attached” I changed this to NAT and added rules for 5555, 8600 and 8601.

Make sure you do not turn off the second ethernet device as this virtual machine is configured to use both of these adapters.

From Eclipse you can change your settings (window->properties->android) to always prompt you to select a device. Run your virtual machine and go into settings and enable developer mode, then run your app in Eclipse and you should see the device in the top box of the devices window that appears.

If for any reason you can no longer see the device, go into the DDMS perspective and click on the restart adb button and you should now see it again.

That’s it! Fast, simple and better IMO than the out of the box config that comes with Eclipse for android development. Enjoy.

Advertisements

Convert VDI to VMDK with VBoxManage

Cloning virtual HDs

First, make sure you have enough HD space to store both hard drive (images) so you can maintain original in case of failure/conversion corruption/power outage during conversion etc.

If this is on an external HD or remote drive, make sure both VM HDs on same drive otherwise the process will be slow and error prone.

Make sure VBoxManage.exe and its’ DLL dependencies are on harddrive where HDs are which is always good practice since you may never know if app was designed to work localized only.

Dependencies:

VBoxDDU.dll
VBoxRT.dll

Open cmd prompt to the VBoxManage.exe path or follow my post to create batch shortcut from your start menu folder if you will be doing this again.

Enter VBoxManage clonehd source dest –format VMDK:

VBoxManage clonehd HardDisks/win7x86.vdi ./VMWare/HardDisks/win7x86.vmdk --format VMDK

Notice there are no quotes surrounding the source and dest paths since the pathnames do not have spaces. In general programming practice it is a simple habit not to use spaces to avoid issues parsing double quoted values or consecutive quoted values in the case of passed in parameters. If space is necessary, I usually use underscore _ instead.

If you’re new to command line, also notice the the dot slash in the dest path ./ and no root slash / in the source path. I moved VBoxManage.exe and its DLLs to my VirtualBox directory which contains the HardDisks folder so I did not need to specify the exact location of HardDisks since it is relative to VBoxManage. The dot slash tells VBoxManage to go up one level and then into the VMWare folder where it will create the vmdk file.

The clone will show progress indicators, and depending on size of file may take a while.

Convert VDI to VMDK with VBoxManage

That’s it! Once finished, open up VMWare and create a new virtual machine using the existing vmdk you just created. (screenshot courtesy of ax)

References
My Blog, https://ronniediaz.com/2012/07/15/keep-batch-file-open-to-enter-more-commands/
http://www.dedoimedo.com/computers/virtualbox-convert.html