Emulators - James Montemagno https://staging.montemagno.com/tag/emulators/ https://staging.montemagno.com/content/images/2017/08/MonogramIcon_Orange_NoBuffer.png Emulators - James Montemagno https://staging.montemagno.com/tag/emulators/ Hugo -- gohugo.io Tue, 13 Oct 2026 23:21:57 GMT 60 Goodbye Android Emulators, the Windows Subsystem for Android is Here! https://staging.montemagno.com/goodbye-android-emulators-windows-subsytem-for-android-is-here/ 6172b75df2a01a003b1a2b76 Fri, 22 Oct 2021 17:39:00 GMT

Android Emulators have been a pain in everyone's side for pretty much ever. Intel HAXM is great, but limited to Intel, then there were custom emulators like Xamarin Android Player and Genymotion, but required additional installs, and finally Hyper-V support, which brought with it AMD support, and side by side Docker support as well. But now, Windows 11 is here and so is a brand new Insiders Preview that brings with it Android app support, which is CRAZY AWESOME. More so is that you can use the new Windows Subsystem for Android to develop, debug, and deploy your Android apps from your favorite IDE! Let's walk through what you need to do to get it all setup. However, if you want to just watch a video I have that for you as well!

Windows Subsystem for Android

So, what is this thing? Well, it is like the Windows Subsystem for Linux enabling you to have a full subsystem available for Android instead of Linux. Now at this point, you don't have access to 100% Android. It is not a device just sitting there, but instead think of Windows being the OS that can run Android apps. There is no Android launcher because Windows is the launcher of the apps.

Get Windows Insiders Beta

The first thing that you will need is the Windows Insiders Beta build (not Dev) that matches Windows 11 Build 22000.xxx. You can read all about how to turn on Windows Insiders on their blog.

Windows 11 About dialog showing Version 21H2, OS Build 22000.282
Windows 11 21H21

Install Windows Subsystem for Android

Now it is time to install the Windows Subsystem for Android, which also comes with the Amazon App Store. This is done directly from the Microsoft Store on Windows and will require a reboot and some final installation steps.

Microsoft Store listing for Windows Subsystem for Android with Amazon Appstore, free, with a Get button
App Store Listing for WSA

Once it is installed you will want to search and pin the Windows Subsystem for Android app.

Windows search results with the Windows Subsystem for Android app as the best match
Search for Android

Developer Mode Setup

Inside of the WSA app you will find all sorts of great options, but a few things to turn on are "Continuous" mode, so the subsystem is always ready to go.

WSA Subsystem resources setting switched from As needed to Continuous, so the subsystem is always running

Then, flip on Developer mode:

WSA Developer mode switched on, noting that ADB can be connected on 127.0.0.1:58526

Notice here that once you turn on developer mode you get instructions on how to connect to adb.

ADB Connect

I am going to steal this part directly from the documentation. To connect to the Windows Subsystem for Android VM for debugging, you have two options:

Recommended Method:

  • Use localhost for connecting to debugging. The IP address of the localhost is: 127.0.0.1:58526. Windows Subsystem for Android must be running in order to connect, the best way to launch Windows Subsystem for Android is by launching an Android app that was installed with the Amazon Appstore.
  • To connect to the localhost address of Windows Subsystem for Android, enter: adb connect 127.0.0.1:58526

Alternative Method: Use the Windows Subsystem for Android Settings app to get the IP address.

  • Launch the Settings app. (Use Windows Search to select and launch.)
  • The IP address will be displayed under the IP address section. If there is no IP address being displayed, launch an Android app that was installed using the Amazon Appstore, then select Refresh on the IP address button in the Settings app.

Now that you have the IP address to connect to the Windows Subsystem for Android VM, connect using adb connect: adb connect 172.22.137.166

Originally, I had to connect through the IP address, however after a reboot and relaunching WSA, I got a firewall prompt and then 127.0.0.1 started working for me.

Windows Defender Firewall alert asking to allow Windows Subsystem for Android on private and public networks

Debug!

Now that you are connected via ADB, WSA will just show up in your IDE of choice because it is a device!

Visual Studio debug target set to Microsoft Corporation Subsystem for Android, Android 11.0 - API 30

Debug away!

Your Apps are on Windows

That is right, your apps are on Windows! You don't need to boot things up to see your app because they are literally in the start menu!

Start menu Recommended section listing the Android apps MyCadence, Kindle, Alaska, and MauiApp1 as recently added

Also, when you open the app setting, they are the Android app settings! How cool is that!?!?!

Android App info settings for My Cadence, opened in a Windows Subsystem for Android window

Limitations

There are a few things to be aware of with WSA. There is no Google Play Services, so if you are testing out maps or other services that is not going to work. It isn't an emulator, which means you don't get to control the skin or conditions under where your app runs since it is running under WSA, not an emulator. Not every sensor is connected, for example it looks like Bluetooth isn't forwarded to WSA from your Windows machine. I also haven't found a way for apps running under WSA to talk about to the local machine for debugging web servers, but I am sure it is a matter of time before someone figures it out.

However, this is the very first preview of WSA and I am extremely happy with it! I love it and never want to open an Android emulator ever again!

Checkout my videos on YouTube

]]>
Android Emulators On Hyper-V Are Pretty Awesome https://staging.montemagno.com/android-emulators-on-hyper-v-are-pretty-awesome/ 5be0da9ef3421000bf604d08 Tue, 20 Nov 2018 22:00:00 GMT I have been a mobile developer for 7 years now and since the day I started one of my largest complaints has been the Android emulator. From the very start we had just ARM emulators that were a complete joke to work with as they moved at a snail's pace. From there a bunch of companies attempted to fix the problem by using custom built solutions on top of Virtual Box or Hyper-V. Google has done a lot of work in the last few years to improve the Android emulators with Quick Boot, more customization and hardware support, but being able to run them fast has still been a pain point.

Intel HAXM... So Close

Intel nearly saved the day with HAXM that runs Android x86 emulator images on Intel VT. This actually works amazing on macOS as every device essentially has an Intel chip and doesn't have conflicts with a core virtualization engine (hypervisor). If you are like me and develop every day on a Windows machine then you know that HAXM is great, but only if you have the ideal setup:

  • AMD Processor: No HAXM
  • Want to run Hyper-V: No HAXM
  • PC doesn't support Intel VT: No HAXM
  • Want to do Docker: No HAXM

Even installing HAXM is very tricky and requires reboots and toggles sometimes in the BIOS, which is never fun.

The Solution: Windows Hypervisor Platform

In the Windows 2018 April Update (build 1803) something magical happened. The mobile developer tools team (aka Xamarin team) worked with the Hyper-V team to extend Hyper-V for the first time to be able to run Google's official Android x86 emulator images natively on Hyper-V instead of on Intel's HAXM. This means that for the first time if you have an AMD Processor, have Hyper-V on, or wanted to do Docker work you can run Android emulators pretty fast. Here is me running an Android emulator on my Surface Book 2 with the new Hypervisor Platform:

Power Up Your Android Emulator

Checkout the full documentation to learn the small details on setup, but in general it is as simple as upgrading your Android SDK and Emulator in the Android SDK Manager:

04-sdk-manager-w158-sml

Then just turn on Hyper-V and the Windows Hypervisor Platform (if you don't see this and are on October's update don't worry it is now bundled into Hyper-V itself).

03-hyper-v-settings-w158-sml

After a quick reboot, Hyper-V is ready to roll on your machine and the emulators should boot up pretty quick. I will say that YMMV on these Android emulators as this is the first release with support for Windows Hypervisor Platform. There is a crazy amount of configurations out there of Windows PCs and I am sure they would be interested to know if you are experiencing super slow emulators after everything is enabled so let them know on the Visual Studio Developer Community. Cheers!

]]>
Let's fix that X86 Android Emulator https://staging.montemagno.com/lets-fix-that-x86-android-emulator/ 598df8f2c121b60019bf3040 Tue, 10 Dec 2013 17:51:00 GMT So genymotion is awesome! However, they recently released version 2.0 and while it seems like it is fine for personal use, using for anything else costs a huge premium. This isn’t a huge issue for some, but more pressing is the issues that I have run into with memory leaks and virtual box causing havok on my machine.

So back to it, the good old x86 Intel HAX Android emulator for PC/Mac. First things first is that you can not run Hyper-V side by side HAX. This means if you want to run the x86 emulator you will need to disable/enable Hyper-V when you want to switch between Android and Windows Phone Development. This isn’t to hard as you just need to run these commands in the command line:

// disable
bcdedit /set hypervisorlaunchtype off
// enable
bcdedit /set hypervisorlaunchtype auto

You MUST restart your PC after doing this!

Let’s fix those crashes!!

I tweeted a bit earlier, but the HAX software that is downloaded via Android SDK Manager is COMPLETELY broken on OSX 10.9 and Windows 8.1. It can lead to major crashes of your system and is completely unstable. Luckily Intel released a hotfix for both operating systems. You will need to first uninstall any old HAX you have installed and then install the hotfix for either Windows 8.1 or OSX 10.9.

Read: Official HAX documentation.

Alright you should be all set to go!

]]>