Create an Intune enrolled Test Device with Android Studio

Advertisements

In this article I show you how to create an Android Test device with Android Studio and how to enroll it to Microsoft Intune.

Prerequisites:

  1. Office 365 Tenant with Microsoft Intune licenses
  2. Google Account to link the tenant with.
  3. Android Studio
  4. Google Account to access the Google Play Store on the test device.

Create a Test Device with Android Studio

Before you can implement an Android Service into your Organization it is important to test everything in detail.

It is also necessary to say that a virtual Machine will never substitute a real device but can help you establish a showcase or an environment for testing.

To have a Virtual Device will boost your confidence before presenting your thoughts and helps to save costs.

We start with the installation of Android Studio which is the basis to start with.

Download the latest version here: Download Android Studio and SDK tools | Android Developers

Like any other Virtual Machine this will take op round about 20gb of space (depending on the installed Apps) and at least 4gb of memory to run smoothly.

word image 15831 1 Create an Intune enrolled Test Device with Android Studio 3

After the installation klick on “More Actions” and choose the Virtual Device Manager.

word image 15831 2 Create an Intune enrolled Test Device with Android Studio 5

Click on” Create a new virtual device”.

It is very important to choose a device which can access the Google Play Store.

Advertisements

Otherwise, we won’t be able to install the Company Portal and enroll the device later to Microsoft Intune.
In my case I will choose the Pixel 4 because it is possible to run it with Android 12 in combination with access to the Google PlayStore.

word image 15831 4 Create an Intune enrolled Test Device with Android Studio 7

I go with Download of Android 12 because this is the latest available Android Version at this point in time.

Text

Description automatically generated

Accept the Terms and Conditions to finish the installation.

word image 15831 6 Create an Intune enrolled Test Device with Android Studio 10

The last step before we can boot the device is to choose the Startup orientation. Optional: You can rename the Virtual Machine.

Graphical user interface, text, application

Description automatically generated

Klick on the ► Icon to finally start the Virtual Machine. In the next Article we will show you how to install Apps.

Advertisements

Install Company Portal and Enroll the Device

The entry point to your Company Data will be the Company Portal. You will need to authenticate against your tenant before the enrollment experience starts. I would like to show you an easy way which prevents entering the password on the small screen. This is also a plus if you are using second factor authentication because your users are already familiar with what will happen next.

During these steps the compliance policy will be checked upfront, and the company portal will show you for example if you need to update your phone or adjust your PIN before enrolling to the tenant. In our example the Phone is already matching the requirements and no additional popup will show up.

word image 15831 8 Create an Intune enrolled Test Device with Android Studio 13

The typical out of the Box experience you would face with a physical device will be skipped. Keep in mind that we will need some further adjustments like Lock screen and PIN later depending on your compliance policy configured in Microsoft Intune.

To install the Company Portal, open the Google play Store first.

word image 15831 9 Create an Intune enrolled Test Device with Android Studio 15

Tap on “Sign In”.

word image 15831 10 Create an Intune enrolled Test Device with Android Studio 17

Enter your Google Account. My suggestion is to create a fresh one only for testing.

To create a new one you can use “Create Account” or this link Google Account

word image 15831 11 Create an Intune enrolled Test Device with Android Studio 19

Enter the password and tap on “Next”.

word image 15831 12 Create an Intune enrolled Test Device with Android Studio 21

Tap on “I agree”.

word image 15831 13 Create an Intune enrolled Test Device with Android Studio 23

For the Google Services you can decide your own preferences.

Keep in mind that even if you enable Back up to Google Drive nothing in the Work area will be in any backup. It is only possible to back up the private area.

word image 15831 14 Create an Intune enrolled Test Device with Android Studio 25

Tap on the search field.

word image 15831 15 Create an Intune enrolled Test Device with Android Studio 27

Search for “Company Portal”.

word image 15831 16 Create an Intune enrolled Test Device with Android Studio 29

Tap on “Install”.

word image 15831 17 Create an Intune enrolled Test Device with Android Studio 31

Tap on “Open”.

word image 15831 18 Create an Intune enrolled Test Device with Android Studio 33
Tap on “SIGN IN”.
word image 15831 19 Create an Intune enrolled Test Device with Android Studio 35

Normally users would enter their credentials, but I would like to show you an easier solution.

Tap on “Sign-in options”.

word image 15831 20 Create an Intune enrolled Test Device with Android Studio 37

Tap on “Sign in from another device”.

word image 15831 21 Create an Intune enrolled Test Device with Android Studio 39

At this point you will need to switch to your browser on your workplace device.


Open https://aka.ms/devicelogin. In some cases, it is necessary to reauthenticate with your Office 365 user account.

This step will reduce the risk of our End-users to enter the wrong password on the small phone display.

Graphical user interface, application

Description automatically generated

Enter the displayed code on your Phone.

word image 15831 23 Create an Intune enrolled Test Device with Android Studio 42

Enter your Password to authenticate.

word image 15831 24 Create an Intune enrolled Test Device with Android Studio 44

Click on “Continue” to proceed.

word image 15831 25 Create an Intune enrolled Test Device with Android Studio 46

Afterwards you can continue on the Phone.

word image 15831 26 Create an Intune enrolled Test Device with Android Studio 48

Tap on “BEGIN” to start the enrollment after the successful authentication.

word image 15831 27 Create an Intune enrolled Test Device with Android Studio 50

Tap on “Continue”.

word image 15831 28 Create an Intune enrolled Test Device with Android Studio 52

Tap on “Accept & continue”.

If you are using a device from another vendor this step can look different.

word image 15831 29 Create an Intune enrolled Test Device with Android Studio 54

Tap on “Next”.

word image 15831 30 Create an Intune enrolled Test Device with Android Studio 56

Tap on “CONTINUE”.

word image 15831 31 Create an Intune enrolled Test Device with Android Studio 58

At this point the device will be visible in Microsoft Intune and in Microsoft Azure AD.

Tap on “DONE” to proceed.

word image 15831 32 Create an Intune enrolled Test Device with Android Studio 60

The Smartphone will show you that apps with the briefcase now belong to the Organization. All apps for work will be marked with the blue briefcase badge.

word image 15831 33 Create an Intune enrolled Test Device with Android Studio 62

Afterwards your phone will show all enrolled devices.