Freigeben über


Installing Android 2.2 on Hyper-V

This is a post that I have been meaning to do for a while now: how to install Android 2.2 in Hyper-V.  While Android is designed for smart phones – there are a number of ports out there for running on standard computers.  Today I am going to show you how to get Android 2.2 running in a Hyper-V virtual machine.  It is an older version of Android – but it is also the easiest version to get working well inside of Hyper-V.

To start with you are going to need to get the x86 install media for Android 2.2.  You can download this from here:

https://code.google.com/p/android-x86/downloads/detail?name=android-x86-2.2-generic.iso

Next you are going to want to create a virtual machine with:

  • 1 virtual processor
  • A legacy network adapter
  • A blank 16GB virtual hard disk

Then connect the ISO file to the DVD-ROM drive of the virtual machine and boot it up.  You should soon see a boot menu where you can select Installation – Install Android-x86 to harddisk:

image

(You can use the Live CD options – but I prefer to have a real install).

At this point you will get dumped into text mode to do some partitioning.  First select to Create / Modify partitions

image

This will take you to the partitioning tool:

image

Here you will need to:

  • Select New
  • Select Primary
  • Accept the default partition size that the tool offers
  • Select Bootable
  • Select Write and type in yes
  • Select Quit

Now you will have a new partition that you can select for the installation:

image

After selecting the partition you will need to format it (I went with ext3)

image

image

Then you will have to wait for a while for the partition to be formatted.

image

Next select to install the GRUB boot loader:

image

Decide if you want /system to be read-write (I chose Yes):

image

Finally reboot – and remember to remove the ISO file (so you do not just boot off of it again):

image

You now have Android 2.2 working on Hyper-V:

imageimageimage

Everything should function correctly (including networking) however there is no support for sound.  Luckily that does not stop the games from working:

image

(Note – I rarely crash on Lunar Lander, but I had to take my hands off the keyboard to take the screenshot, and this was the natural result).

Anyway, I hope you found this interesting.  Tomorrow I will be back to talking about Windows Server “8”.

Cheers,
Ben

Comments

  • Anonymous
    March 07, 2012
    The comment has been removed

  • Anonymous
    March 07, 2012
    Neat.  Any chance there's a way to get WP7 running in a VM?

  • Anonymous
    March 07, 2012
    WP7 isn't open source, that's why we can download Android.

  • Anonymous
    March 07, 2012
    Nice timing for your lockscreen screenshot there Ben ;)

  • Anonymous
    March 07, 2012
    I know WP7 isn't open source, but there has to be some way to dev for WP7 without having a device on hand.

  • Anonymous
    March 08, 2012
    Nice post, i gonna try it!

  • Anonymous
    March 08, 2012
    Nick - Actually, that is a complete coincidence.  I did not know what you were talking about until I checked myself - pretty neat :-) Cheers, Ben

  • Anonymous
    March 27, 2012
    Wonder when someone will patch the kernel using the Hyper-V integration services, so that android runs even better.  

  • Anonymous
    November 01, 2012
    Hey Been, Couple things,

  1. I am having a little trouble getting the network connection to pick up? Anything in particular that needs be done in Hyper V settings?
  2. The keyboard is a little difficult to figure out. Any easy shortcuts you might have for navigation and unlocking the OS. Thank you, Brandon
  • Anonymous
    November 23, 2013
    Hi Ben! How about an update? Android 4.3 code.google.com/.../detail installs fine on Hyper-V, even on Client Hyper-V on Windows 8.1. But I'm missing network and mouse support. Maybe you have some spare time to give some tips to enable networking and mouse support. Getting networking to work, I can think of many nice things to build test automations with Powershell scripts. Regards Mike

  • Anonymous
    November 23, 2013
    Hi Ben! Sorry for the previous post. Everything is working fine now. I think I was a little bit too impatient. Networking with legacy adapter works! Mouse works if I'm not using Remote Desktop to my Hyper-V machine, so I have to work on the physikal Hyper-V machine. In general for Hyper-V-Next: This is sometimes annoying espacially when working with linux derivates. Some Keys for working with android X86 emulator on Hyper-V: ALT+F9: Sets screen to normal orientation ALT+F10: Rotates screen to left ALT+F11: Rotates screen to right ALT+F12: Flips screen ALT+F1: shows the root terminal ALT+TAB: switching between Apps ALT+LEFT: skipping between screens ALT+ESC: Goes back to home screen Mike