How to virtualize Android devices on macOS and Windows 10

How many devices do you need to simulate all the possible versions and management modes of Android Enterprise in your UAT environment or home lab for testing? One for Work Profile, one for COPE, one for Work Managed, maybe one for Legacy Device Administrator and one more for COSU – multiply this by at least 5 Android major versions your users might still have (6.0 up to 10.0) and we get roughly 30 devices!

What if you could create separate virtual machines on your computer with all those Android flavours? Google offers a powerful emulator called Android Virtual Device Manager as part of their developer toolset Android Studio available for macOS and Windows 10.

With this tool you can create as many Android instances as your free disk space allows, with any version of Android starting from 4.1 (Jelly Bean) up to latest 10.0 (Q). To get it up and running use this installation manual.

Once you start your first AVD (Android Virtual Device) you will notice that it boots immediately without the first-time setup wizard. At this point, you can manually connect to Wi-Fi, log in your Google account to get access to Play, download Intelligent Hub and enroll the device with Work Profile or in Legacy mode.

Things are a little bit more tricky if you want to enroll it in Work Managed or COPE mode as you would normally do that during first run setup wizard which is not available in AVD images. For that to work you need to follow this procedure:

  1. Download and extract Android Platform Tools to your computer
  2. Create an AVD, boot it, temporarily login your Google account to download Intelligent Hub from Play and logout once done.
  3. On your computer open Terminal (macOS) or Command Line (Windows 10)
  4. Navigate to the Android Platform Tools folder
  5. Execute “./adb devices” to check if your AVD is available
  6. Execute “./adb shell dpm set-device-owner com.airwatch.androidagent/com.airwatch.agent.DeviceAdministratorReceiver” This will set Intelligent Hub as a device owner
  7. Start Intelligent Hub in your AVD and perform an enrollment.
  8. Voila! Depending on the settings on your Organization Group you will get your device registered as Work Managed or Cope.

You would still need physical devices to test vendor specific features delivered by OEMConfig (think Samsung KNOX).

One thought on “How to virtualize Android devices on macOS and Windows 10

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s