Creating an Android x86 Virtual Machine for testing Windows Intune and EMS capabilities

When I took on my role , I went through a process of consuming information, scenarios, and customer requirements. To help me in building that foundation I reached out to many colleagues to understand how they did certain activities. One of these colleges was Yann Seyroles in France.

I asked Yann a simple question, “how do you demonstrate/test Android?”

I had been using the Android SDK for which was an interesting experiences but not an efficient experience!

He chuckled and pointed me to Android x86.

Scenario

You want to demonstrate features and scenarios of Windows Intune or a MDM service being deployed to an Android platform without going out and spending money on an Android handset.

Android x86 Project

To enable the opportunity for us to run Android on Hyper-V we have used the Android x86 platform. This is a project to port Android open source project to x86 platform, formerly known as “patch hosting for android x86 support“. The original plan is to host different patches for android x86 support from open source community. A few months after we created the project, we found out that we could do much more than just hosting patches. So we decide to create our code base to provide support on different x86 platforms, and set up a git server to host it.

This is an open source project licensed under Apache Public License 2.0.

Pre-Reqs

A Windows Platform running Hyper-V (other Virtualization Technologies can be used)

Android ISO (I have used RC1 as I had difficulties with RC2) – http://www.android-x86.org/downloadAndroid

Android-x86 4.4-RC1 live & installation iso – http://sourceforge.net/projects/android-x86/files/Release%204.4/android-x86-4.4-RC1.iso/download

How To

Go to http://www.android-x86.org/download and select the build of your choice, in my scenario I will be using Android-x86 4.4-RC1 live & installation iso – http://sourceforge.net/projects/android-x86/files/Release%204.4/android-x86-4.4-RC1.iso/download

clip_image001

an

Once you have downloaded the iso and you have a machine with Hyper-V running we can configure our base operating system.

Hyper-V Virtual Guest Configuration

I have create a new virtual machine on my Hyper-V machine

clip_image002

A wizard will kick off , click Next

clip_image003

Specify the name of the Android Virtual Machine and if you want to change the storage location now is the time

clip_image004

If you are using Windows Server 2012 OR Windows 8 you will have an option to specify which generation the virtual machine will be. Select Generation 1 and click Next

clip_image005

Specify the amount of memory the virtual memory that you want to allocate to the Android platform and click next

clip_image006

Specify your network adapter, my network connects me to the external network for connecting to my Windows Intune environment and click next

clip_image007

Define the hard disk size and location. I have created a 16GB disk and click next

clip_image008

Define the location of your Android x86 iso and click next

clip_image009

Review the summary and select finish

clip_image010

In the virtual machines you should now see your new workload

clip_image011

Before starting the virtual machine we need to make two changes to the configuration

  1. Remove the current network adapter
  2. Add a legacy network adapter and have this connected to the network

To do this go to the setting of the virtual machine by right clicking on the virtual machine and selecting settings

clip_image012

Select the network adapter and click remove in the right hand of the dialogue box

image

This will remove the network adapter

image

Now select Add Hardware , select Legacy Network Adapter and then click Add

clip_image015

A new legacy network adapter will now appear and need configuration for your virtual switch configuration and then click apply/ok

clip_image016

You can also look to change the Processor configuration (i.e. not just have 1 virtual processor) , but the above will be the basic configuration to enable you to boot and install Android.

Installing Android 4.4

Start your virtual machine by right clicking the Android virtual machine and selecting start

clip_image017

Then right click on the virtual machine and click connect

clip_image018

A Virtual Machine Connection will be established to the console of the booting Android virtual machine

clip_image019

At this point you have four option to select, I want to install Android to a state that’s always kept when I make changes (i.e. installing Android to the hard disk rather than running the live CD), select the Installation – Install Android-x86 to harddisk and hit enter

clip_image020

It will then bring you to the Chose Partition screen. At this point select Create/Modify partitions and select ok, the purpose is to set up a partition for our Android virtual guest as at present we just have a blank virtual hard disk

clip_image021

When you are in the partition options select New (use left and right to select your option and click enter to select), Then select Primary, And define the disk size

clip_image022

Next select Bootable and click enter. You will notice that the Flags will change from {blank} to Boot. This enables the drive to be bootable.

clip_image023

Next select Write (this will write your partition changes and disk configuration to disk), it will then ask “are you sure you want to write the partition table to disk? (yes or no)” make sure you type Yes, and then hit enter, it will display that partitions are writing its table to disk

clip_image024

We now want to select Quit

clip_image025

At this point you will see a new option for the partitions. Currently we have a sda1 partition and want to format this . Select sda1 Linux Virtual HD and click ok

clip_image026

And option will display for choosing how you want to format the file system. Select ext3

clip_image027

Agree that you are happy to format the partition and lose any existing data and click ok. The disk will now format

clip_image028

You will then be prompted to install the boot loader GRUB. Make sure you select Yes. Next also make sure to select Yes for making the install read-write

clip_image029

Android will now install to disk

clip_image030

Once complete eject the iso and reboot (alternatively you can just Run Android-x86)

clip_image031

Android Boot Up, Login and Company Portal

Upon your reboot you will now be confronted with a GRUB to select your build. At this point you can boot from disk directly to Android-x86 4.4-RC1

clip_image032

You will see the standard Android boot and then go into the setup process. You will encounter a couple of error messages (one around Bluetooth and the other around Wi-Fi). Just select OK should they appear , these will not disrupt your experience.

clip_image033

Walk through the wizard to setup Android. I have added a Google Play account to gain access to the play store and allow myself to download the company portal application.

clip_image034

Now I am in Android I can do all the Android stuff that I want to. Specifically in this case is to install the company portal application and deliver settings to my device. Firstly I have to log into my Android virtual machine, find the play store and then locate and install the company portal. Once I download and install the company portal I will be able to browse applications that Windows Intune has published to myself and have settings pushed down to the device.

clip_image035

At this point you have the perfect test environment to play with Windows Intune capabilities around Android devices.

I will delve into some of these in later posts.

References :

Android-x86 Project – Run Android on Your PC – http://www.android-x86.org/

Installing Android-x86 on Hyper-V with Windows 8.1 in under 5 minutes – http://www.servethehome.com/installing-android-x86-hyper-v-windows-8-1/

Hyper-V generation 2 virtual machines – part 1 – http://blogs.technet.com/b/jhoward/archive/2013/10/24/hyper-v-generation-2-virtual-machines-part-1.aspx

Mobile Device Management Capabilities in Windows Intune – http://technet.microsoft.com/en-us/library/dn600287.aspx

2 thoughts on “Creating an Android x86 Virtual Machine for testing Windows Intune and EMS capabilities

Leave a Reply

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