“Buildroid for VirtualBox” 20120518 update

Hi,

I’ve just released a new version of “Buildroid for VirtualBox” with some changes on the VirtualBox VM configuration (no change in the android code) :

  • There was a mistake in the 20120517 release which prevent the use of non-standard resolution (for example, the different ‘phone or the 1024×600 resolutions)
  • The first network card (eth0) is not set to a ‘null’ type by default to prevent the ‘vboxnet0′ error at startup when this network doesn’t exist. That also mean that if you want an adb connection to the VM, you have to change this network card configuration ot set it to “host-only network” and select (after creation if needed) a virtual network
  • The date/time sent to the VM is now in UTC (and not local time) which is the good configuration for Android

You can download the different versions here :
Android 4.0.3_r1
        vbox86p : buildroid_vbox86p_4.0.3_r1-20120518.ova
        vbox86t : buildroid_vbox86t_4.0.3_r1-20120518.ova
        vbox86tp : buildroid_vbox86tp_4.0.3_r1-20120518.ova

I’ve also generated a “test VM” which includes Google Apps (with ‘Play’) : buildroid_vbox86t_4.0.3_r1-20120518_gapps.ova

Enjoy,

Dan.

“Buildroid for VirtualBox” released

Hi,

I’m glad to announce the release of “Buildroid for VirtualBox”, which is a follow-up of my previous work on “AOSP-VirtualBox” and VirtualBox support in android-x86.

You’ll find all needed information here.

There are many differences with the previous VM I released :

  • You can now change the screen resolution from within the VM (using the “Buildroid VM Configuration” app)
  • A wifi connection is emulated
  • You can choose to disable the physical keyboard and use the virtual one
  • Screen orientation is managed
  • Google Market/Play now works correctly and you’re able to download a lot of applications (including Maps for example)

This is the beginning of a strong effort to have the best possible support running Android in VirtualBox. “Buildroid for VirtualBox” is mainly being aimed at developers who want to have a better solution to test their applications but feel free to use it with any other objective ; and please tell me if you’d like to see some new functions or improvements.

Dan.

 

How to change screen size on VirtualBox/Android

Hi,

One thing I’ve been asked quite often is : how to change the screen size on my VirtualBox VM ?
Mainly to fit the size of the host system and use the VM   in full screen resolution – which is obviously much more friendly.

 

In fact, it’s quite easy, there’s 2 steps :

  • First you have to add a “custom video mode” to your .vbox configuration file : Add the line “<ExtraDataItem name=”CustomVideoMode1″ value=”1280x800x16″/> just after the already present “ExtraDataItem” entries
  • You also have to modify your linux kernel options to replace the existing vga=xxx by a vga=ask
Then, when you boot your Android VM, you’ll be able to choose the new screen resolution in the list.
Two notes on this :
  • Obviously, you have to replace the  ”1280x800x16″ by your resolution – the “16″ value is the color depth ; keep a 16 color depth value and things won’t work.
  • You can have different custom video modes, you just have to add as many CustomVideoModeX values as needed, and increment the X

Happy testing :-)

Dan.

Note: You have to edit your .vbox file while VirtualBox is not running (not only the VM but also the VirtualBox management console).

Google Apps Integration

Many are interested in testing Google Applications on an Android VM (either VirtualBox or VMWare, AOSP or Android-x86 based).

After some tests with 2 Google Apps packages (gapps_ics_4.0.3_v10.zip and gapps-ics-20111125-2.zip) I had the following results :

  • gapps_ics_4.0.3_v10.zip works well but lacks some applications (including Maps/Latitude) which should be downloaded from the Android Market (which is quite difficult until we solved the problem very few applications are available from the x86 vm).
  • gapps-ics-20111125-2.zip includes many applications (including Maps/Latitude) but has some problems with application crashes…

So what I did was just to take the gapps_ics_4.0.3_v10.zip package and add the Maps.apk (which includes the Maps and Latitude apps) from gapps-ics-20111125-2.zip -> I named the file gapps_ics_4.0.3_v10-withMaps.zip

To install it here is the procedure :

  • Download the file
  • Unzip it
  • Find the IP address of your Android VM by executing “netcfg” on the command line
  • Connect with adb using “adb connect x.y.z.t” (replace x.y.z.t with your Android VM IP address, adb is included in the Android SDK)
  • If needed, remount the system partition to R/W with “adb remount”
  • Go in the directory where you unzipped the file and execute “adb push system /system/”
  • Reboot your VM
  • Everything should be OK :-)

Note : When you use the Market, very few applications are available… Some tweaks would be needed in build.prop to solve that. If somebody has some success with it, please tell us.

Dan.

 

android-x86 VirtualBox/VMWare support

Hi,
You probably know the android-x86 project.
With the ICS release, the VirtualBox and VMWare support has disappeared. So, I proposed to work on the VirtualBox/VMWare  support for android-x86, thanks to the work I’ve done to support VBox on AOSP.

I’ve done the following work to support VirtualBox :

  • As planned, much less work to do than AOSP support :
  • Audio support needs some changes : enable the ‘PCM’ control
  • Battery polling mechanism (also posted to the Android Gerrit)
  • 3D Acceleration disabled (if not, the SystemUI activity keeps crashing)
  • Ethernet enabled with DHCP-only (waiting for the ‘official Ethernet patch’ for ICS on android-x86)

You can find source patches here and can download a test ISO from here.

EDIT : You can find a new version here which has a better support for VMWare (Ethernet, Audio) and full Ethernet support (with configuration). For VirtualBox users, with this new version you have to select “eth0″ (instead of sit0) as the network interface in Settings -> Ethernet configuration.

Dan.

android-virtualbox Google Code

Hi,

I’m happy to announce that Ed Boraas and I have opened a Google Code named “android-virtualbox”.
As explained on this, the goal of the project is to coordinate developers working toward the following goal:

To submit such changes as are necessary into the Android Open Source Project and VirtualBox upstream codebases in order that the image produced by performing a simple “lunch vbox_x86-eng; make android_disk_vdi” on the AOSP master branch, when run on a core (i.e. open source) VirtualBox host, is a full-featured Android developer platform of similar utility to the emulator.

Some of the specific goals of the project are:

  • Full mouse support, including VirtualBox’s emulated USB tablet (allowing the host mouse to be used without capture)
  • Ethernet support, including an ethernet state monitor
  • File sharing between the host OS and the Android guest
  • Power management support
  • An appropriately-defined “Android” OS Type in VirtualBox
  • Hardware OpenGL acceleration through VirtualBox’s OpenGL driver
  • Camera support (using host USB devices)
  • Sound support, including audio-in

In order to be completely successful, it is our goal that all of the above be accomplished within the relevant upstream codebase(s) without any additional patching required.

Google code project is here.

Contributions welcome.

Dan.

ICS VirtualBox 4.0.3_bd2 release

Hi,

I’m glad to release a new version of the ICS image for VirtualBox (version 4.0.3_bd2), still based on AOSP source. The main changes are :

RTC clock support : Android is now configured to use the RTC clock provided by VirtualBox – on older versions, the clock was not updated and any service (alarm, …) related to clock was not working. The support was quite easy (rebuild kernel with the right driver) but one dependency on ARM in the drivers/rtc/alarm.c file

Power management support : Thanks to ACPI, power management is now supported. The battery level and charging status are now updated. This was quite tricky as VirtualBox doesn’t seem to send ACPI events when battery level changes ; I had to implement a poll mechanism to regularly (30 secs by default) check the battery level and charging status – that’s why there is some lag from the time you plug/unplug the charger and the time Android updates the status. I didn’t (yet) manage to make the “screen off” feature work so I had to disable it with a new developer option (“Always stay awake”).

USB support with mass-storage : USB is now supported with mass-storage. If you plug a USB stick and connect it to your VM, the USB stick will be automatically mounted on /mnt/USB (it has to be a FAT filesystem).

I’ve also included the ASTRO file manager in the default VM image so that it’s easier to test the USB mass-storage.

You can find the release notes here and review installation instructions in the VirtualBox page.

Please report any problems you may have.

Regards,

Dan.

AOSP New experimental feature to speedup build

Jean Baptiste Queru, from AOSP, just announced a new experimental feature to speedup build. If you follow the “Android Building” google group, you know that there are many discussions on build speed improvement. This new feature consists in being able to have the “out/” directory (in which all output files are written during the build process) in a different hard disks (the idea being to use an SSD drive to store this directory). Currently, only the master tree is concerned so don’t expect to use this new feature for 4.0.1 or 4.0.3 build. More information in this JBQ’s post.

How will it improve build time ? We can assume there will be reports on the mailing list, and I’ll try to make some test by my own.

Dan.