Install Android in Hyper-V by Bas Wijdenes

Android emulators VS Android in Hyper-V.

I tried to use Bluestacks as an Android Emulator. This application was only very often slow and the advertisements were also annoying. I then switched to the Visual Studio Emulator, but here too I ran into things like ‘just install a new app’.

Because almost all Android Emulators are very slow and require a lot of resources from your computer, I decided to install Android in Hyper-V.

This required some work, but after that it all worked smoothly.

I made the tutorial below. The tutorial consists of several steps. If you already have a Virtual Machine ready, you can scroll to part two.


What are the least requirements for Android in Hyper-V?

There are at least 2 requirements to install Android in Hyper-V.

  • You must use at least Windows 10 Pro or Enterprise. Otherwise you do not have the Windows Feature Hyper-V. If you do not use Windows 10 Pro you can follow this manual and install Android in VirtualBox instead.
  • You need minimum Android 4.4r2 ISO. You can download it here.

Part one: Create a Virtual Machine in Hyper-V for Android.

The manual is with Screenshots.

Open Hyper-V Console
Right-click on your device name.
Select new and then click on Virtual Machine.

Android in Hyper-V
Android in Hyper-V.

If you get the before you start page, just click next.
I also select Do not show this page again.

Android in Hyper-V
Android in Hyper-V.

See the screenshot below.

  • This is the name of your Hyper-V Machine. You can always adjust this in the Hyper-V console. I first called it Android and later changed to Android 4.4 r2.
  • I almost always select a different location, but you can also leave the default location. If you have another disk with more space, it’s better to use that one.
Android in Hyper-V
Android in Hyper-V.

We go for “Generation 1”, no questions asked.. Click Next.

2016-05-03 23_06_40-New Virtual Machine Wizard
Hyper-v and Android.

On the next wizard you get the question how much startup memory you want to assign to the Virtual Machine.
Nowadays most devices have 2-6GB with exceptions of 8GB.
If you go for less than 500MB you have a chance that Android will crash.

I’ve selected 2048MB. You can always change this.

Android in Hyper-V
Android in Hyper-V.

We’ll go for a “Hyper-V Adapter”. I’ll tell you more about this later.

Android in Hyper-V
Android in Hyper-V.

Creating a Virtual Hard Disk.

  1. Naming the Virtual Hard Disk  go for “Android,” or Android 4.4r2 to be more specific.
  2. This is the location for the Virtual Hard disk. As you can see mine is located on the D-drive. You can place the VHDX wherever you like.
  3. Its important to change the size for the VHDX because on default its on 120Gb. You don’t need 120Gb for Android in Hyper-v.  Choose between 2Gb to 16Gb.
  4. Click next.

You can also always adjust the size of the virtual hard disk.

Android in Hyper-v
Android in Hyper-V.

If all goes well, you have already downloaded Android in the beginning steps.
Select and browse to the Android ISO.
Click Next.

Android in Hyper-v
Android with Hyper-V.

Are all the settings correct? If its correct, click Finish.

Android in Hyper-v
Android in Hyper-V.

Part two: Install Android in Hyper-V.

Turn on your virtual machine as shown in the screenshot below.

Android in Hyper-v
Android in Hyper-V.

There are 4 options here, but only 2 that are useful for us.

  • Live CD – Run Android-x86 without installation.
  • Installation – Install Android-x86 to harddisk.

In this tutorial we’ll go for “Installation – Install Android-x86 to harddisk“.

Android in Hyper-v
Android in Hyper-v.

Click on “Create/modify Partitions” and click ok.

Android in Hyper-v

Click “Yes”.

Android in Hyper-v

Create a new partition.

Android in Hyper-v

Go back to the start screen and choose your newly created partition.  

Android in Hyper-v

In this screenshot you can choose between 4 filesystems

  1. Ext3
  2. Ext2
  3. Ntfs
  4. Fat32

We’ll go for Ext3.
Click OK.

Android in Hyper-v

Click yes.

Android in Hyper-v

Click Yes.

Android in Hyper-v

Click Yes, you want to format the boot partition to /dev/sda1.

Android in Hyper-v

Click Yes.

Android in Hyper-v

Click OK and then shutdown the virtual machine with the Turn Off button in Hyper-v.

Android in Hyper-v

We’ll have to remove the image file from the virtual machine first, or you’ll get the “installation screen” again. Follow the screenshot to remove the image file.

Right click your Virtual Machine > Go to DVD Drive > Select “none“.

Android in Hyper-v

The last requirements.

Okay there is one problem with the use of Android in Hyper-v. The Wi-Fi can not be turned on and therefore you can not download applications from the Play Store when the Hyper-V host is on the Wi-Fi.

This can be solved if you connect your device with a network cable to the internet. This way the android in hyper-v will see it as a 4G Network.

We’ll have to create a virtual network adapter that is connected to your cable network.

Right click your Hyper-V and click on Virtual Switch Manager.

Android in Hyper-v

Create a New virtual network switch > External > Create Virtual Switch.

Android in Hyper-v

 You need to make sure these settings are correct.

  1. Always go for External Network.
  2. Make sure your Cable Network adapter is chosen.
  3. Check Allow management operating system to share this network adapter.
Android in Hyper-v

Now go back to the settings of your android in hyper-v.

Make sure you go for “Legacy Network Adapter”. This is necessary for your the internet to function. Click add > ok.

Android in Hyper-v

Start your Android in hyper-v. The following steps are basic steps. see the gif below.

android in hyper-v
The welcome screen plus other settings in one GIF.

And as a final tip!

Your Android will have a sleep mode as all devices have. As soon as your device is in sleep mode you wont have a button to turn it back on. In the following .gif are the steps to turn off sleep mode in Android.

Go to Settings > Display > Sleep > click Never time out.

Android in Hyper-v
Android in Hyper-v.

Congratulations! you’ve successfully installed Android in Hyper-v!

If you think you’ve more settings that are useful for everyone, please share in the comments!


Summary

You can also use new versions of Android, but I can not guarantee that they will function correctly.

The post dates from May 23, 2016. I have reviewed the content and modified it so that I have decided to re-publish it.

Do you have any questions or comments? Please leave a comment.

Published by

Bas Wijdenes

My name is Bas Wijdenes and I work as a PowerShell DevOps Engineer. In my spare time I write about interesting stuff that I encounter during my work.

13 thoughts on “Install Android in Hyper-V by Bas Wijdenes”

  1. Hello,

    Great explanation, but i need or want using the mouse, i have a point and arrow, with the point carry the arrow over a app or menu and select.
    But is very difficult, how i can have a mouse Embedded.

    And another question, how i can add apk, not from gplay, if not from my windows folder to android virtualized on Hyper-v.

    I lisent, a way to do and improve the experience, is install a TaskBar android like home, i try, but don’t give or no see grate difference, really is very bad.

    Thanks for reading.

      1. Is Solved, just install ANDROID 7 or 8, but not have sound or microphone.

        Who know how can use a sound and microphone.?????

        Can use like a phone?… with number and sms?

  2. Hi. I follow install steps as you did. Everything is ok. But I start android it gives this error: Error: [0.000000] tsc: Fast TSC calibration failed

    OS: Windows 10 PRO and Hyper-v

    How I can solve it?
    Pls help me

  3. Nice Article!
    Thank you for that!

    I noticed after some time when I don’t use the machine the screen went black. I think it’s the energy saving… but how do I wake it up again? It seems not to recognize any key 🙁
    Any ideas?

    Thx!

  4. Ah I remember when I used Android x86. Those were good days. Now I develop on a dedicated Android Tablet. This is a nice tutorial for people who use Windows (slight disclaimer: I use Ubuntu and Chrome OS)

Leave a Reply

Your email address will not be published. Required fields are marked *