Table of Contents
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.
If you get the before you start page, just click next.
I also select Do not show this page again.
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.
We go for “Generation 1”, no questions asked.. Click Next.
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.
We’ll go for a “Hyper-V Adapter”. I’ll tell you more about this later.
Creating a Virtual Hard Disk.
- Naming the Virtual Hard Disk go for “Android,” or Android 4.4r2 to be more specific.
- 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.
- 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.
- Click next.
You can also always adjust the size of the virtual hard disk.
If all goes well, you have already downloaded Android in the beginning steps.
Select and browse to the Android ISO.
Click Next.
Are all the settings correct? If its correct, click Finish.
Part two: Install Android in Hyper-V.
Turn on your virtual machine as shown in the screenshot below.
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“.
Click on “Create/modify Partitions” and click ok.
Click “Yes”.
Create a new partition.
Go back to the start screen and choose your newly created partition.
In this screenshot you can choose between 4 filesystems
- Ext3
- Ext2
- Ntfs
- Fat32
We’ll go for Ext3.
Click OK.
Click yes.
Click Yes.
Click Yes, you want to format the boot partition to /dev/sda1.
Click Yes.
Click OK and then shutdown the virtual machine with the Turn Off button 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“.
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.
Create a New virtual network switch > External > Create Virtual Switch.
You need to make sure these settings are correct.
- Always go for External Network.
- Make sure your Cable Network adapter is chosen.
- Check Allow management operating system to share this network adapter.
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.
Start your Android in hyper-v. The following steps are basic steps. see the gif below.
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.
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.
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.
Sorry,
One more.
If Possible, setting a cell number?
Thanks
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?
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
Had anyone had an issue with the mouse not being detected?
Did it go in sleep mode for awhile?
Can I install latest android version? like Marshmallow or Nougat?
Should be possible! When I see time I’ll create a new tutorial with a newer version of Android!
Can I install the x64 version?
Yes, why not?:-)
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!
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)