How to install android on x86 Virtualbox?

Showing 1-3 of 3 messages
How to install android on x86 Virtualbox? SoJinAhn 9/13/11 10:19 PM
I could get .vdi file using "$lunch vbox_x86-eng".
But I got a problem while install(or running) android with the .vdi
file on the Virtualbox.

I can see boot loader but every time I tried to install or run the
android, the error message popped up. The error message is :

The virtual machine window is optimized to work in 32 bit color mode
but the virtual display is currently set to 16 bit.
Please open the display properties dialog of the guest OS and select a
32 bit color mode, if it is available, for best possible performance
of the virtual video subsystem.
Note. Some operating systems, like OS/2, may actually work in 32 bit
mode but report it as 24 bit (16 million colors). You may try to
select a different color mode to see if this message disappears or you
can simply disable the message now if you are sure the required color
mode (32 bit) is not available in the guest OS.

After this message, I only can see black screen. Nothing happens.
Anybody know how to solve this problem?
Re: How to install android on x86 Virtualbox? Bruce Beare 9/14/11 2:24 PM
The warning message that you are getting can probably be ignored.
It "probably" is unrelated to your virtual box emulation not booting.

Are you working in the AOSP master branch? As of what date?
Some changes went in just before crashed that broke
the qemu emulation... it may have broken VB as well. I haven't
been using the VB emulation for a while... so I'm not up to date
on its status.

Here's a cut/paste of an internal wiki on how to build for VB. You may
find it interesting.
The build_all script does an appropriate lunch followed by a make for
'installer_vdi' or 'android_disk_vdi'.

Android may be booted under the VirtualBox emulator
[edit] Prerequisites

   1. Your build server should already be set up to build Android. See
the other wiki pages for instructions on building Android.
   2. Your VirtualBox host machine must be a Intel Core2 or better.
   3. You'll need to install VirtualBox. Instructions may be found at:
   4. Add your userid to the vboxusers group in /etc/group

[edit] Build Instructions

1. Pull your repository.
See UMSE_Android_Product_Specific.

2. Build your .vdi installer (VirtualBox Disk)
vendor/intel/support/ -c vbox -j 4
cp out/target/product/vbox_x86/installer.vdi ~/

You can instead build the andriod_disk.vdi file. This doesn't require
you to run an installer to boot it up:

1. Pull your repository.
See UMSE_Android_Product_Specific.

2. Build your .vdi installer (VirtualBox Disk)
vendor/intel/support/ -c android_disk -j 4
cp out/target/product/vbox_x86/android_disk.vdi ~/

[edit] Creating your VirtualBox

This can be automated via command lines... TBD

If you don't use the command line interface for VirtualBox, you can
use the GUI to create your virtual machine. You'll need to navigate
the interface to perform the following steps:

In the Virtual Media Manager, locate and add your installer.vdi that
you built in the previous step.
Create a new virtual machine, OS=Linux, Version=Other Linux
Base Memory Size=512MB

If you are using installer.vdi:

Create a new hard disk, size = 2GB

Otherwise, you can use android_disk.vdi directly.

Use existing virtual disk - browse to android_disk.vdi

After the initial virtual machine is set up, tweak the parameters to:

(storage)   Remove the floppy
(storage)   Remove the CD
(system)    Enable PAE

If you used the installer.vdi file:

(storage)   Add the installer.vdi as the Primary IDE Slave

[edit] Install Android on your 2GB Virtual disk from the installer.vdi

Only do this step if you are using installer.vdi -- no need for

   1. Start the emulator
   2. Use F12 to get to the BIOS boot menu. Boot to the secondary
   3. Use grub to select the Install option
   4. When you see "Done processing installer config", type "reboot"

Note: The first time you install on your target virtual disk, the
install will most likely fail. A message will be printed that tells
you to run the installer again. You should do so:


[edit] Updating your Android VirtualBox for a new copy of the

You can use the GUI to delete and replace the installer.vdi (just
copying over the file isn't enough). This script does can also be used
to update installer.vdi.

VBoxManage controlvm Android poweroff
VBoxManage storagectl Android --name 'IDE Controller' --remove
VBoxManage storagectl Android --name 'IDE Controller' --add ide --
controller PIIX4
VBoxManage closemedium disk installer.vdi --delete
cp out/target/product/generic_x86/installer.vdi ~/.VirtualBox/
VBoxManage storageattach Android --storagectl "IDE Controller" --port
0 --device 0 --type hdd --medium Android.vdi
VBoxManage storageattach Android --storagectl "IDE Controller" --port
1 --device 0 --type hdd --medium installer.vdi
VBoxManage startvm Android

[edit] Serial Port

The Serial port has been enabled in the image. To access it from

1. Use the serial ports tab to enable COM1 as a "Host Pipe" and select
"Create Pipe" for it to be created as $HOME/.vbox_pipe
2. socat unix-client:.vbox_pipe stdout

Note that $HOME might not be understood by VirtualBox, so you will
have to specify a full explicit path, like /home/user/.vbox_pipe.
[edit] Ethernet

The ethernet port (eth0) is enabled for DHCP in the image. To connect
to it via ADB you will need the DHCP address that has been assigned.

If you are using a bridged ethernet, you may obtain this address from
a shell prompt either from the serial port or from "developer tools ->
terminal emulator" using the command:


If you are using a Host-only adapter, 'vboxnet0', you should use the
[edit] ADB

ADB is automatically started. Once you have the network address, you
can connect to ADB via the ethernet. Be sure to put the proper address

adb kill-server
ADBHOST= adb devices

[edit] Remote Desktop

If you use the 'rdesktop' command to connect to your Android
VirtualBox instance, you can have a working mouse an cursor. First
enable the remote display with:

devices -> Enable Remote Display

Then, connect via the rdesktop command

apt-get install rdesktop # ubuntu
yum install rdesktop     # fedora
rdesktop -a 16 localhost:3389

[edit] Bugs

   1. Sometimes the initial install doesn't notice that the partition
table has been updated. You may have to re-do the very first install
on your 2GB virtual disk.
   2. netcfg really should happen from an application like the wifi

[edit] Misc Note

The build script uses VBoxManage to convert .img image to .vdi image.
So it is necessary that VirtualBox is installed on the system before
the build script is run. Else after the build VBoxManage
convertfromraw -format VDI [filename].img [filename].vdi can be used
to convert the .img to .vdi.
Re: How to install android on x86 Virtualbox? SoJinAhn 9/15/11 10:21 PM
First of all, thank you for your helping!!!

I got the Android source code from 2 weeks ago.
I thought the problem should be related to the warning message because
the log from VB stopped the display part always...

I still couldn't figure the reason of the problem out exactly.
Anyway, one of my colleague tried to install Android on his laptop,
Lenovo Thinkpad edge 11, with installer.vdi that I build, on VB and
(My laptop that I tried to install is Lenovo IBM Thinkpad x61.)
Is that could be related to the soure code changes?
Or just it's a problem depending on hardware...??

Plus, I could install the Android on VMware player. (convert .vdi
into .vmdk)
It's not a really good solution but if anyone has same problem,
try to install it on VMware or other machines.

Thank you.