Since Android-x86 2.2 was officially released a few days ago, I figured I’d provide a quick rundown of how to get it up and running in VirtualBox. All in all, it is pretty straightforward. Download, install, download, install. But if you’ve never installed a Linux based system before, some of the steps will look quite foreign. Plenty of screenshots will help with that!
Step 1: Install VirtualBox
This one’s easy. Head over to the Downloads section on the VirtualBox site and snag the appropriate installer for your OS. Since it will be a little different for each OS, I won’t provide screenshots for each step here. In general there’s just a lot of “Next” clicking involved. Of note, the networking component of the setup process will temporarily disrupt your connection. So if you’re downloading anything else, wait until it is finished before continuing with the setup.
Once installation is completed, you’ll be greeted with a screen like this the first time you run VirtualBox:
Step 2: Get the Android-x86 ISO
Next up, you’ll need the Android-x86 ISO itself. The one to snag is android-x86-2.2-generic.iso.
Since the project is active, by the time you read this, there may be a new ISO out. So also check the Downloads section on Google Code: http://code.google.com/p/android-x86/downloads/list
Step 3: Create a New VirtualBox VM
Now it is time to create a virtual machine for Android-x86 to run in. Hit the “New” button and you’ll get a “Create New Virtual Machine” dialog.
The first screen is just some fluff, hit “Next” and jump to the useful stuff. Now you get to name your new VM and specify the OS. The name can be anything you like, I named mine “Android x86 2.2 Froyo”. For “Operating System” select “Linux” and for “Version” select “Other Linux”.
Next up is specifying the amount of memory available to the new VM. The default is 256MB, which is likely sufficient unless you’re doing something that specifically needs more. If need be, you could get away with less, but I wouldn’t suggest ever going under 128MB. It will boot with 96MB, but it is not much fun to use!
Next up you’ll need to choose whether or not you want to create a Virtual Hard Disk, or VHD.
If you’re wanting to save your changes (installed apps, settings and whatnot) then you’ll need to create a VHD, leave the box checked and hit “Next”.
If you only intend to boot the Live CD and toy around for a bit, you can skip this part by unchecking the “Boot Hard Disk” box. When you hit “Next” you’ll get a warning about needing some sort of bootable mediaâ€”just ignore it, that’ll get taken care of in the next step. Hit “Finish” and jump to the next step of the tutorial.
You’ll be presented with the “Create New Virtual Disk” dialog. Once again, it starts out with an inconsequential step, so hit “Next”. Now you’ll have to decide if you want a virtual disk which is dynamically sized or a fixed size. If you choose to make an 8GB fixed VHD, the file the wizard creates will take up a full 8GB. Whereas dynamic just resizes on the fly, up to the maximum size you select. You’ll probably just want to leave it dynamic so you’re not filling up space that’s really not being used.
Next up, set how large you want your VHD to be. The default is 8GB which is sufficient, but it all depends on your needs. Set the appropriate size, hit “Next” and then “Finish” twiceâ€”once for the VHD and once for the VM itself.
You should now have a shiny new VM!
Step 4: Mount the ISO
Now that you’ve got a VM ready to use, there’s one last step before booting the ISOâ€”mounting the ISO! Right click the VM in your list and bring up its “Settings” dialog, then go to the “Storage” section of it. Under “IDE Controller” you’ll see an entry for your VHD, if you created one, and a CD icon that says “Empty” next to it. Select the CD entry and you’ll see another CD icon on the right hand side. Click it and select “Choose a virtual CD/DVD disk file…”. This pops open a standard file dialog; browse to wherever you saved the ISO in Step 2 and select it. After that, hit OK to exit the Settings dialog.
Step 5: Boot it up!
You’re now ready to boot the new VM. Double click on it and the VM will start running. If this is a fresh VirtualBox install, you should have several dialogs popping up. The first talks about the “Auto capture keyboard” option. The important thing to remember is that if you need to break out of the VM to control the rest of your system again, hit the right hand Ctrl key (at least on Windows) and the VM will release control back to the host OS. Next, you may get a dialog about your system’s color depth being greater than 16 bit. This can be safely ignored. Check the “Do not show this message again…” box and you’re set. Last will be a dialog about “Mouse pointer integration”, which we’ll actually need to turn off in a moment. Hit OK on these and you should see the Live CD’s boot menu:
If your goal is simply to boot the Live CD, select the “Live CD – VESA mode” option. At that point, it should boot up and be ready to useâ€”almost! Remember that “Mouse pointer integration” thing? Well you’ll probably notice that you won’t see your mouse cursor showing up at all. From the “Machine” menu, select “Disable Mouse Integration”. Then click inside the VM, you’ll get another dialog about capturing the mouse pointer. Hit “Capture” and you’re ready to goâ€”just remember that the right hand Ctrl key releases control back to your host OS. Since you’re not installing to a VHD, you’re done. Enjoy Android-x86!
Step 6: Installing Android-x86 to the VHD
So everything is set up and ready to run, but there are a few steps left if you want to install Android-x86 to a virtual hard drive. From the boot menu select “Installation – Install Android-x86 to harddisk”. A bunch of text will fly by and you’ll get the following menu:
Select the “Create/Modify partitions” option and you’ll then be presented with the cfdisk partition editor.
From here select “New”, then “Primary” and then it will ask you what size you want the partition to be. It defaults to the full size of the VHD, so you’ll probably just want to hit enter and go with it. Next select “Bootable” and then “Write”. It will ask you to type out the word “yes”â€”do so. If you were installing this to a physical instead of virtual hard drive, this tool can do some serious damage to your file system, so that’s why it is picky enough to have you type it out. But since we’re in the land of the virtual, all is well! You’ll get a “Writing partition table to disk…” message and should now have an “sda1” entry in the table, like so:
Now you’ll want to select the “Quit” option to jump back to the installation procedure. You should now have an entry there which says “sda1Â Â Â LinuxÂ Â Â Â Â Â Â Â VBOX HARDDISK”. Select that entry to continue.
Now you’ll need to format the newly created partition. Select ext3 from the list and continue. Another dialog asking you to confirm will pop up. Again, this is another thing that would completely screw up an existing hard drive, so it will warn about data loss. Select “Yes” and a progress bar will show up, formatting the drive.
Once it is done formatting, you’ll be asked to install the GRUB bootloader. This is important, so don’t skip it, otherwise your freshly installed VHD won’t boot!
Now you’ll be asked whether or not you want “/system” to be read-write. Unless you’re a developer, just select “No”. Another progress bar will show you the progress of the actual installation. Almost done!
Android-x86 is now installed on your VHD! You can now run the OS, reboot, or create a fake SD card to use within the VM. If you want an SD card available to save media to, select the SD option; it’ll ask you how large it should be (in MB), create it and have you reboot.
Since the ISO is still mounted, the VM will boot off it again after a reboot. From the “Machine” menu, “Close” the VM, go back into the VM settings and unmount the ISO following the same instructions from step 4, but select “Remove disk from virtual drive”. Then it will boot off the freshly installed VHD instead.
Summary and Downloads:
That’s it! You should now have a VM with Android-x86 installed on a VHD, ready to use. Don’t forget to disable mouse integration so you can see your cursor, and remember that right Ctrl releases back to the host OS. Other keys of importance: Back is mapped to Escape; Home is mapped to the Windows key; Menu is, appropriately, mapped to the Menu key (if you don’t know which one that is, it’s the one you never use between Ctrl and Alt on the right hand side of the keyboard).
Enjoy and have fun!