Install Android 4.0 in VirtualBox



This information is a little hard to find on the Internet. This is how to install Android 4.0 (Ice Cream Sandwich) in VirtualBox, in a "do it yourself" way (installing from an ISO image). There are some people who have made pre-installed VirtualBox images, but one problem you may run into going that route is that the Android serial number will match everybody else who's using the same image as you, since Android generates this number on its first boot.


Getting an Android ISO

The folks at Android-x86 have been making x86 builds of the Android OS for quite a while now, and none of this would be possible without them. They have ISO images for various versions of Android available, but most of them don't work very well in VirtualBox. For example, their "eeepc" image for Android 4.0 has issues with the audio drivers and the network (it has no Ethernet support built in, etc.)
So this means using one of the Android-x86 images from there won't get you too far because audio and networking won't work. Fortunately, somebody has put together an ISO image that's been custom tailored to VirtualBox. I don't remember where I found this ISO image; if it's yours, leave me a comment and I'll edit this post.

android-x86-vm-20120130.iso (244MB). This ISO works much better.


Create a Virtual Machine

In VirtualBox, create a new machine for Android.
Machine Name: "Android ICS" (you can name it anything you want)
Machine Type: "Linux 2.6"
Memory: I gave my VM 1024MB of memory.
Hard Disk: I created a new 16GB VDI image that dynamically expands.
All the default settings worked fine for me. Here's what the defaults were on my system

Networking Type: NAT
Adaptor: "Intel Pro/1000 MT Desktop (82540EM)"
Audio: Intel AC'97
Storage Layout:IDE Controller:
CD Device
SATA Controller:Hard Disk


Installation

Make sure the VM boots from the ISO image.
On the boot screen, select "Installation - Install Android-x86 to harddisk"
Choose "Create/Modify Partitions". This takes you into cfdisk.
Choose "[New]"
Choose "[Primary]"
Press enter to accept the default partition size (mine was 17174.38)
Choose "[Bootable]"
Choose "[Write]"
Type "yes" to confirm writing.
Choose "[Quit]"
Choose to install on the sda1 device (Linux VBOX HARDDISK)
Choose to format the drive "ext3"
Pick "Yes" to confirm formatting.
Pick "Yes" when it asks to install the GRUB bootloader.
Pick "Yes" when it asks to mount /system as read-write (this will be important later to install the Google apps).
Create a fake SD card when it prompts. I made mine 2047MB (the maximum allowed).
Choose "<Reboot>"
Make sure you detach the ISO image from the virtual machine so that it will boot into the installed OS. If you see the "Installation" option again, it means you're booting from the ISO still!


Tips for Running Android

You'll want to disable mouse integration to be able to interact with the GUI at all. This can be done from choosing the "Machine" menu in the VM window and clicking "Disable Mouse Integration" -- or pressing HostKey+I.
The Escape key on your keyboard corresponds to the Back key in Android. The context menu key on your keyboard corresponds to the Menu button in Android (the context menu key is usually next to the right Windows key).

To power off the VM, press HostKey+H. This will cause Android to pop up the shutdown dialog that you'd expect on a real phone. You can also use the "Machine->Send Shutdown Signal" to do the same.


Install the Google Apps

You may notice that this Android VM doesn't include the Android Market, GMail, or Google Maps. These are some of the Google Apps and due to some licensing restrictions Android-x86 doesn't include them "out of the box".
On a real Android device that's been rooted and flashed with a custom ROM, you'd install the Google apps by flashing them in recovery mode. But you can't get into recovery mode on VirtualBox. Thus, the method for installing the Google Apps is kinda sketchy, but it works (and if you know of a better way, feel free to tell me).

You'll need a file with a name like "gapps-ics-20120304-signed.zip". These are the Google apps (the date part might be different). You can Google them, but I have a copy of them here to download too.

You don't really need the entire Google Apps file, actually. Just the "system" folder inside the zip file. Create a new tar file of the "system" folder so that it will be easy to get it into your Android device. I have a prepared "system.tar.gz" for you if you just want to use mine.

GApps Download Links:
gapps-ics-20120304-signed.zip (52MB)
system.tar.gz (just the /system folder; 28MB)
The steps to install the Google Apps are as follows:
Download system.tar.gz to your Android VM somehow. I used the Web Browser app and downloaded it there. You could probably also use the Email app, or if you're really Android savvy, push it with the Android Debugger.
If Android tells you that there is no SD card so it can't download the Google Apps, that's because you skipped that step while first installing your Android system. The very last step of the installer asks if you'd like to create a virtual SD card partition, and you should've had it do that. If you didn't, the only easy solution I know of is to reinstall the OS.
Open the "Terminal Emulator" app in Android.
Enter these commands (note: don't type the $ or # symbols at the beginning of these lines. These symbols indicate the prompt.)
$ cd /sdcard/Download
$ tar -xzvf system.tar.gz
$ su
# cd /sdcard/Download
# cp -rf system/* /system/
Pay special attention to the cp -rf command. Make sure the slashes and *'s are in the right places.
Reboot the phone.
You should now see the Market app, GMail and the others in your app menu.
Note: in my experience, the Market app will be somewhat unstable. When you start the app, it will Force Quit after 10 or 15 seconds. However, if you're fast enough you should be able to quickly search for a specific app you'd like and begin the download process before Market crashes, and the app will continue to download and install regardless.

I imagine that the unorthodox way of installing the Google Apps might be partly to blame for the Market being unstable. The other Google apps seem to work fine though.


No Warranty

Android is primarily an ARM architecture operating system and the x86 version isn't supported by Google. While a lot of apps will work in Android-x86, some may crash in weird ways. If you're an Android developer though, this can be pretty useful because Android-x86 will run a lot faster on your hardware than the standard emulator from the SDK does, so you can test your apps much more rapidly (the Android-x86 site has some documentation on how to connect ADB to your virtual machine).
Your mileage may vary.

Windows-8 Keyboard Shortcuts

Windows 8 keyboard shortcuts It seems a number of Windows 8 users are having difficulty finding their way to the various charm, applications and start screens

Windows 8 has introduced a new series of keyboard shortcuts

I have not had to search for this, it is all in windows Help and support
Windows logo key* + F1


Keyboard shortcuts


The following table contains new keyboard shortcuts that you can use to navigate around Windows. 

Windows logo key* +start typing 
Search your PC

Ctrl+plus (+) or Ctrl+minus (-)
Zoom in or out of a large number of items, like applications pinned to the Start screen

Ctrl+scroll wheel
Zoom in or out of a large number of items, like applications pinned to the Start screen

Windows logo key* +C 
Open the charms
In an application, open the commands for the application

Windows logo key* +F 
Open the Search charm to search files

Windows logo key* +H 
Open the Share charm

Windows logo key* +I 
Open the Settings charm

Windows logo key* +J 
Switch the main application and snapped application

Windows logo key* +K 
Open the Devices charm

Windows logo key* +O 
Lock the screen orientation (portrait or landscape)

Windows logo key* +Q 
Open the Search charm to search applications

Windows logo key* +W 
Open the Search charm to search settings

Windows logo key* +Z 
Show the commands available in the application

Windows logo key* +spacebar 
Switch input language and keyboard layout

Windows logo key*+Ctrl+spacebar 

Change to a previously selected input

Windows logo key* +Tab 
Cycle through open applications (except desktop applications)

Windows logo key*+Ctrl+Tab 
Cycle through open applications (except desktop applications) and snaps them as they are cycled

Windows logo key* +Shift+Tab 
Cycle through open applications (except desktop applications) in reverse order

Windows logo key* +PgUp 
Move the Start screen and applications to the monitor on the left (Applications in the desktop won’t change monitors)

Windows logo key* +PgDown 
Move the Start screen and applications to the monitor on the right (Applications in the desktop won’t change monitors)

Windows logo key*+Shift+full stop (.) 
Snaps an application to the left

Windows logo key*+full stop (.) 
Snaps an application to the right

Esc
Stop or exit the current task


With many more listed in Help and Support
Related Posts Plugin for WordPress, Blogger...