Site icon TimmyIT.com

Android emulation for endpoint Manager Admins

As every IT Pro knows, when you are working with managing devices its always best to have access to physical hardware for testing and playing around with. Many of us are use to having a bunch of virtual machines running windows on but what about Android ? In this article I will cover how to get one or more android devices running with Android studio in their Android Virtual Device Manager and some of the quirks and problems I encountered and how I solved them.

As mentioned above, it’s always best to have access to physical hardware but some times that’s not possible and the next best thing might be to run emulation. Or if you just want to start playing around with managing Android with Endpoint Manager in a lab environment this could be an option for you.

Installation

First thing we need to do is to head over to https://developer.android.com/studio and download Android studio.

Running Android studio for the first time

Click on “Create Virtual Device”

Here you can choose from a bunch of google devices, select the one want.

On the next selection you need to select a Image to use, you can choose from many different Android version. Not all version are installed by default and this means you need to click on “Download” before you continue.

Note. If you choose a Image that says “Google APIs” you don’t get the Google play store in the Image. If you want the Google play store, make sure to select a Image that says Google Play.

Give your AVD a Name and click on “Finish”

You have no created your device, next step is to start it up.

The play button in the action section runs the device (but does not start it), the pen gives you the option to edit and the down arrow gives you a few different options.

Start your Android device by clicking on the Power button on the top right corner of the device

Internet and Wifi

I had some problems getting the Wifi to connect on the AVD device to the Internet when I first started out. After some troubleshooting and a lot of trial error I got it to work and here are a few of the things I had to do to get it to work:

You now have your first virtual Android device up and running and time to play around with it.

Endpoint manager enrollment

With Android Enterprise and Endpoint manager you have essentially 4 different enrollment scenarios

To get our virtual / emulated devices enrolled there are some limitations when performing the actual enrollment. In the real world we would typically use Google Zero Touch, NFC or QR-code scanning but here we cant do that (at least at time of writing this blog post I havent found a way to do Zero touch, NFC or QR-scannig) however there are work arounds which I will cover next.

Lets start with the simplest one that would be the same as in the real world

Personally-owned device with work profile

This scenario works just like it would do in physical hardware. The end user downloads company portal from the Google play store, logs in and enrolls the device. Easy-peasy.

1 / 7

Corporate-owned enrollment

This step is the same for all the 3 different corporate-owned enrollment types when working with our virtual devices. In short, all of these 3 types requires a token. This token can be found in the Endpoint Manager portal once you created them. The token contains letters that we need to use. For example ABCDEFG

Copy the token or write it down, we will need the token to perform the enrollment on our virtual device. Follow the instruction below

  1. Create your virtual Android device in AVD
  2. Start it up for the first time
  3. Make sure your device has internet access
  4. Open up Chrome on the device
  5. Use the following link and insert your own token within the link

https://enterprise.google.com/android/enroll?et=ABCDEFGH

Follow the Instructions that appears.

Final thoughts

The way I’ve done it, is that I’ve created one virtual device for each scenario and enrolled them in to Endpoint Manager.

In AVD it looks like this:

And in Endpoint manager it looks like this:

During the time I’ve been working with these virtual devices there have been several times I had to reboot a device and sometimes I just had to recreate it because something was not working properly. But regardless I’m still really happy that this is a possibility but I can’t stress the importance of having physical hardware to work with. Virtual devices is good in a lab environment.

Don’t forget to follow me on twitter @timmyitdotcom

Exit mobile version