Hello all! It’s been quite some time since my last update, but I’m posting quite a doozy today. I spent a good couple of hours recently trying to setup and run Android in a VirtualBox environment. I’m here now to try and alleviate all of the issues I had and hopefully make things a little less painful for those of you wanting to do the same.
Once you’ve got those handled, you should be presented with a blank VirtualBox window, like below.
Click the “New” button at the top left and you’ll be presented with the following window.
You can name this whatever you want, however I’m opting to name it “Android 5.1”. For the “Type” choose “Linux” and then for “Version” choose “Other Linux (32-bit)”.
Click “Next” and you’ll be presented with the “Memory size” screen. Depending on how much system memory you have, I typically allocated half of my available RAM. This is because if I’m working in an emulated environment, I don’t typically swap back and forth a lot to the host system so I can afford to spare half of my RAM. My laptop has 16GB of RAM so I’ll give this one 8GB (8192 MB). Click “Next”.
Choose “Create a virtual hard disk now” and click “Create.”
On the following screen choose “VDI (VirtualBox Disk Image)” and then click “Next.”
Change the selection to “Fixed size” and click “Next.”
Usually with any virtual operating system made from Linux that I’m testing, I’ll give it 16GB of space. This is typically more than enough for what I need, however if you plan to download a ton of apps or whatever and need the extra space, then adjust accordingly. Set the size you want the hard drive to be and then click “Create.”
Now you’ll be presented with the following please wait screen…
After that’s completed you will be taken back to the main VirtualBox window. Now we need to modify a few settings for our virtual environment, so click the “Settings” button at the top.
The first setting to change is to disable USB inputs and set them to be PS/2. This is done under the “System” settings and the “Motherboard” tab. Change the “Pointing Device” option to “PS/2 Mouse.”
Now we want to assign 128 MB to our “Video Memory.”
Under the “Storage” options, click the “Empty” selection under the “Storage Tree” options and then click the little blue disk icon at the far right so that we can select our Android ISO, and then under the fly-out menu click “Choose Virtual Optical Disk File…”
Navigate to where your ISO downloaded to, double-click it, and you should now have the ISO loaded.
The Android emulator environment has an issue loading the ICH AC97 audio controller for some strange reason, so under the “Audio” settings change “Audio Controller” to “SoundBlaster 16.”
Now let’s disable all USB inputs by unchecking the “Enable USB Controller” option under “USB”.
That’s it for the settings. Click “Ok” to save your changes and close the window. Now, we need to boot it up by double-clicking the “Android 5.1” entry on the left side of the VirtualBox window.
You should be presented with the Android boot menu. Use your arrow keys to go down and choose “Installation – Install Android-x86 to harddisk.”
Your next screen may look slightly different than mine, however the steps should be the same. Using your arrow keys, go down and select “Create/Modify partitions” and press Enter.
Choose “No” and press “Enter.”
From the next black screen, using your right arrow key move to “New” and then press “Enter.”
Leave it at “Primary” and press “Enter.”
Leave “Size” default, and press “Enter” and you’ll be brought back to this screen.
Since your cursor should be on top of the “Bootable” option, go ahead and press “Enter” to flag the partition as being bootable. Under the “Flags” option at the top, you’ll now notice the “Boot” flag present.
Use your right arrow key to move all the way over and down to the next line. Stop on “Write” and press “Enter.” Type “yes” as a confirmation and press “Enter” again. After it’s finished, you’ll be given the menu at the bottom once more, now use your right arrow key to move over to “Quit” and press “Enter.”
Your screen should now match the following:
From the screen shown above, press the “Enter” key. On the next screen, press your mouse arrow down to highlight “ext3” and press “Enter.”
Move the cursor to the left and press “Enter.”
Move the cursor left again so that we install the GRUB boot loader.
Choose to “Skip” the install of EFI GRUB2 unless you have a very specific need for it.
Finally, choose “Yes” on making the /system directory read-write.
Your installation will now proceed…
Now, before going down to “Reboot”, go to your “Devices” menu, then hover “Optical Drives” and then click “Remove disk from virtual drive.” You may get a “Force Unmount” button, go ahead and click it. Now, using your down arrow go down to “Reboot” and click “Enter.”
Android should now be installed to your virtual drive! Once you reboot you will be presented with the Android GRUB menu. The first option is the one to choose, so either let the countdown timer hit zero or you can just press enter on it.
You should now have this fabulous Android boot animation.
And once everything has finished loading, you’ll be presented with the Android setup process.
Go ahead and continue on with your new emulation of the Android operating system!