Setting up an Android Emulator for testing Intune features

Overview

As more customers leverage either standalone Microsoft Intune or Microsoft Endpoint Manager for cloud management of their devices they also seek an efficient means to upskill administrators on Intune features and capabilities without the need to purchase devices upfront for testing.

 

Scenario

I recently delivered a workshop where attendees experienced the above issue with limited access to physical mobile devices which prompted me to further investigate an option for the administrators to emulate an Android device locally on their Windows 10 machine. In this post I am going to share the installation and configuration of the Android Studio software for emulation of Android devices.

Check out my colleague John Guy’s blog for instructions on how to setup an Android Emulator for MacOS: Setting up an Android Emulator for testing Intune features on Apple macOS – Azure Cloud & AI Blog

 

Installation

The Android Studio software is available for download from Android’s developer site:

https://developer.android.com/studio

Machine generated alternative text:
Dovmnload Android Studio and 
h ttps:// 
developer.android.com/studio 
developers 
Android Studio 
platform 
Android Studio 
Google play 
Jetpack 
DOWNLOAD 
WHATS NEW 
USER GUIDE 
PREVIEW 
Rollin 
android 
studio lÅl 
Android Studio provides the fastest tools for building apps on every type of Android device. 
DOWNLOAD ANDROID STUDIO 
t" Win t 
DOWNLOAD OPTIONS 
RELEASE NOTES

 

For a review of the requirements before installation you can browse:

https://developer.android.com/studio/run/emulator#requirements

Most notably disable Hyper-V features on the Windows 10 operating system, you can follow the below steps:

  • Browse to Control Panel
  • Select Programs and Features
  • Select Turn Windows Features on or off
  • Uncheck Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform and Windows Sandbox

Machine generated alternative text:
Windows Features 
Turn Windows features on or off 
x 
o 
To turn a feature on, select its che& box. To turn a feature off, dear its che& box A 
filled box means that only part of the feature is tumed on. 
Guarded Host 
Hyper-V 
Hyper-V Management Tools 
H er-V Platform 
v Internet Explorer 11 
Intemet Information Services 
Internet Information Services Hostable Web Core 
Legacy Components 
Media Features 
Microsoft Defender Application Guard 
Microsoft Message Queue (MSMQ) Server 
Microsoft Print to PDF 
Microsoft XPS D0QJment Writer 
OK 
Cancel

Machine generated alternative text:
Wndows Features 
Turn Windows features on or off 
x 
o 
To tum a feature on, select its dned< box To tum a feature off, dear its dned< box A 
filled box means that only part of the feature is turned on. 
SMB Direct 
Telnet Client 
TFTP Client 
Virtual Machine Platform 
Windows Hypervisor Platform 
Wn ows I entity Foun ation 3.5 
Wndows PowerShell 2.0 
Wndows Process Activation Service 
Windows Pro' ected File S em 
Wndows Sandbox 
Windows Subsystem for Linux 
Windows TIFF IFilter 
Work Folders Client 
Cancel

  • Select Ok
  • Select Restart Now

Once the download of Android Studio is completed, initiate the installation by selecting Run as administrator and follow the prompts to complete the installation. Modify settings as you require for your environment.

Machine generated alternative text:
Name 
android-studio-ide-193.6626763-windows.exe 
Run as administrator 
Share with Skype 
Date modified 
2020/09/22 2:05 PM 
Vpe 
Application 
892 609 KB

 

Machine generated alternative text:
Android Studio Setup 
Android 
Studio 
x 
Welcome to Android Studio Setup 
Setup guide you through the installation of Android 
Studio. 
It is recommended that you close all other applications 
before starting Setup. This will make it possible to update 
relevant system files without having to reboot your 
Click Next to continue. 
< Back 
Next > 
Cancel

 

Machine generated alternative text:
Android Studio Setup 
x 
Choose Components 
Choose which features of Android Studio you want to install. 
Check the components you want to install and uncheck the cornponents you don't want to 
install. Click Next to continue. 
Select components to install: 
Android Studio 
@Android Virtual Device 
Space required: 2.6GB 
< Back 
Description 
Position your mouse 
over a component to 
sea its description , 
Next > 
Cancel

 

Machine generated alternative text:
Android Studio Setup 
x 
Configuration Settings 
Install Locations 
Android Studio Installation Location 
The location specified must have at least SOOMB of free space. 
Click Browse to customize: 
< Back 
Next > 
Cancel

 

Machine generated alternative text:
Android Studio Setup 
x 
Choose Start Menu Folder 
Choose a Start Menu folder for the Android Studio shortcuts. 
Select the Start Menu folder in which you would like to create the program's shortcuts. You 
can also enter a name to create a new folder. 
ndroid Studic, 
7-Zip 
Accessibility 
Accessories 
Administrative Tools 
Android Studio 
Bing Wallpaper 
LogMeIn Rescue 
Maintenance 
Microsoft Corporation 
Microsoft Endpoint Manager 
Microsoft Intune Management Extension 
[3 Do not create shortcuts 
< Back 
Install 
Cancel

 

Machine generated alternative text:
Android Studio Setup 
x 
Installing 
Please wait while Android Studio is being installed. 
Extract: keytool.exe„, 100% 
Show details 
< Back 
Next > 
Cancel

 

Machine generated alternative text:
Completed 
Show details 
Installation Complete 
Setup was cornpleted successfully. 
< Back 
Next > 
Cancel

 

Machine generated alternative text:
Android Studio Setup 
Android 
Studio 
x 
Completing Android Studio Setup 
Android Studio has been installed on your computer. 
Click Finish to close Setup. 
Start Android Studio 
< Back 
Finish 
Cancel

 

Create the Android Virtual Device

To create the Android Virtual Device (AVD) start by launching the AVD Manager tool from Android Studio:

  • Select Tools
  • From the drop down menu, select AVD Manager.

Machine generated alternative text:
Eile Edit View 
BYOD app 
Android 
app 
Gradle Scripts 
Navigate 
Code 
Analyze 
Befactor 
Build 
Run 
100 VCS Window 
lasks & Contexts 
AVD Manager 
SDK Manager 
Resource Manager 
Help 
BYOD 
Troubleshoot Device Connections 
CD App Links Assistant 
Firebase 
Layout Inspector 
Save as live Template„ 
Generate JavaOoc... 
IDE Scripting Console 
XML Actions 
JShell Console... 
O Groovy Console... 
Kotlin

 

  • Select Create Virtual Device

Machine generated alternative text:
Android Virtual Device Vanager 
Your Virtual Devices 
Android Studio 
Virtual devices allow you to test your application without having to 
own the physical devices. 
+ Create Virtual Device..

 

  • Configure Select Hardware

Machine generated alternative text:
Virtual Device Configuration 
Select Hardware 
Choose a device definition 
Category' 
TV 
Phone 
Wear OS 
Tablet 
Automotive 
Name 
Pixel XL 
Pixel 3a XL 
Pixel 3a 
Pixel 3 XL 
Pixel 3 
Pixel P Xl 
Play Store 
Size 
5.5" 
5.6" 
6.3" 
5.46" 
Resolution 
1440x2560 
108012160 
10800220 
1440x2960 
108012160 
Density 
560dpi 
400dpi 
440dpi 
560dpi 
440dpi 
560dni 
Pixel 3a 
ID8D x 
2220px 
Previous 
Size: 
Ratio: 
large 
long 
New Hardware Profile 
Import Hardware Profiles 
Density: 440dpi 
Next 
Cancel 
Clone Device... 
Finish

  1. Select Phone
  2. Ensure Play Store option is available
  3. Select desired screen size
  4. Select Next
  • Configure the System Image

Machine generated alternative text:
Virtual Device Configuration 
System Image 
Select a system image 
Recommended 
Release Name 
Q Download 
x86 Images 
Other Images 
Pie 
Pi 
Pie 
pie 
Pie 
Download 
Download 
Download 
Download 
Oreo 
Oreo Download 
29 
28 
28 
28 
28 
28 
27 
27 
ABI 
x86 
x86 
x86 64 
x86 64 
x86 64 
x86 
x86 
x86 64 
Target 
Android 10.0 
Android 9.0 (Google X86 ARM) 
Android 9.0 (Google Play) 
Android 9.0 (Google APIs) 
Android 9.0 
Android 9.0 
Android 8.1 (Google APIs) 
Android 8.7 
A system image must be selected to continue. 
Pie 
API Level 
28 
Android 
9.0 
Google Inc. 
System Image 
x86 64 
Questions on API level? 
Cancel 
Previous 
Finish

  1. Select x86 Images
  2. Ensure the target Operating System selected includes Google Play.

TIP – If you intend to test Conditional Access and Compliance Settings feature based on an older operating system version then select Android 9.0 (Google Play), alternatively you can select the Android 10.0 (Google Play) operating system.

3. Select Download to begin download of image file

4. Once the download has completed, select the image and click Next

Machine generated alternative text:
Virtual Device Configuration 
System Image 
Select a system image 
Recommended 
Release Name 
Q 
Q Download 
Pie 
pie 
Pie 
Pie 
Pie 
Download 
Download 
Download 
x86 Imag Other Images 
29 
29 
28 
28 
28 
28 
28 
27 
ABI 
x86 64 
x86 
x86 
x86 64 
x86 64 
x86 64 
x86 
x86 
Target 
Android 10.0 
Android 70.0 
Android 9.0 (Google X86 ARM) 
Android 9.0 (Google Play) 
Android 9.0 (Google APIs) 
Android 9.0 
Android 9.0 
Android 8.1 (Google APIs) 
Pie 
Questions on API level? 
Previous 
API Level 
28 
Android 
9.0 
Google Inc. 
System Image 
Oreo 
x86 64 
Next 
Cancel 
Finish

 

  • Configure Android Virtual Device (AVD)

Machine generated alternative text:
Virtual Device Configuration 
Android Virtual Device (AVD) 
Verify Configuration 
AVD Name Android 1 
Pixel 2 
Pie 
Startup orientation 
Show Advanced Settings 
5.0 1080x1920 xxhdpi 
Android 9.0 x86 64 
Default Orientation 
Sets the initial orientation of the device. During AVD emulation you can also rotate 
Change. 
Change, 
Portrait 
Landscape 
the device screen. 
Previous 
Next 
Cancel 
Finish

  1. Provide a name for the Android Virtual Device
  2. Select the screen orientation
  3. Select Finish

Deploy more devices

Machine generated alternative text:
Android Virtual Device Manager 
Your Virtual Devices 
Type 
Android Studio 
Name 
Androidl 
Play Store 
Resolution 
1080 2220: 
a.dOdpi 
API 
28 
Target 
Android 9.0 (Google Play) 
CPU/ABI 
x86 
Size on Oisk 
513 MB 
0 
Actions 
Duplicate 
Wpe Data 
Cold Boot Now 
Show on Disk 
View Details

After the initial AVD deployment is completed, you can deploy more AVDs by selecting the Duplicate option from the drop down menu.

 

Configure AVD internet connection

  • Configure the AVD Proxy Settings

  1. Select
  2. Select Settings
  3. Select Proxy. Configure as required for your environment
  • Enabe Wifi for internet connectivity

Machine generated alternative text:
3:30 
An Wifi 
Very Fast 
Battery Saver 
Android 
not disturb 
Mobile data 
100% 
A ate 
Airplane nwzie

  1. Enable AndroidWifi for internet connection
  2. Disable Mobile Data if you have an onboard SIM on your host Windows 10 machine to avoid any additional charges

Install the Company Portal

Machine generated alternative text:
4) 
Tuesday, sep 22

  1. Select Play Store

Machine generated alternative text:
company portal 
Intune Company Portal 
G 
Waiting for 
1 
10M* 
reviews 
16 MB 
Rated tor O 
4) 
o 
Install company apps & manage dev'CeS enrolled 10 
Microsoft Intune 
You might also like 
ft Teams 
55 MB 
Microsoft Outlook 
Organize Your Emu 
65 MB 
Microsoft 
V' ew. Edit. 
66 MB

  1. Search for Company Portal in Play Store
  2. Select Install
  • Sign in to Company Portal

Machine generated alternative text:
2:43 @ 
Company Portal 
Get access to company resources and 
keep them secure. 
SIGN IN 
Microsoft privacy & Cookies Machine generated alternative text:
244 @ 
Company Portal 
Microsoft Intune 
Microsoft 
Sign in 
Email or phone 
Caft access your account? 
Sign in from another device 
o 
Next

 

  • Example of AVD with applications deployed

Machine generated alternative text:
Adobe Ac 
PERSONAL 
Company 
SAP Conc. 
Contacts 
OneNo'e 
WORK 
Excel 
Outlook 
Files 
Play Store 
'O 
o 
Work profile 
Managed by your organization