Emulator - James Montemagno https://staging.montemagno.com/tag/emulator/ https://staging.montemagno.com/content/images/2017/08/MonogramIcon_Orange_NoBuffer.png Emulator - James Montemagno https://staging.montemagno.com/tag/emulator/ 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

]]>
Setting Up Android x86 HAXM Emulators https://staging.montemagno.com/setting-up-android-x86-haxm-emulators/ 598df8f2c121b60019bf2fe1 Tue, 06 Dec 2016 00:12:16 GMT I have recently had tons of questions about my recommended settings for Android x86 Emulators on Windows or on Mac. I have recently moved away from they Hyper-V Android Emulators for VS (which are awesome), just so I have all of the Google APIs around. 

So here we go.

  1. Install the Intel x86 Emulators from Intel
  2. When installing make sure to set the default RAM to 512MB else it hogs up your machine
  3. Turn off Hyper-V by running bcdedit /set hypervisorlaunchtype off from an administrator command prompt (more info here) (See more about this below in Q/A)
  4. Make sure you have the latest and greatest Android SDKs installed. Here is what mine looks like:

Create new Android SDK with following settings:

As you can see I use the Google APIs x86 an dset everything to 512MB for Ram and storage! Don’t forget use Host GPU. 

Here is an awesome walk through video:

Update 1 (12/6/16):

I got a few questions regarding the blog, so I figured I would update here.

  • Q: Why do I have so many Build-Tools installed? A: No specific reason to be honest, you can uninstall all except for the latest 24.X, as VS/XS will pick up the correct version it needs for building. I just happen to keep adding to them.

  • Q: Why do you have to turn off Hyper-V? A: It is important to turn off any hyper visors and Hyper-V because Intel HAXM for x86 emulators is a virutaliation software. On windows machines you can’t have two different ones running at the same time so you have to turn it off.

]]>
Visual Studio - Unable to launch Google Android Emulators https://staging.montemagno.com/visual-studio-unable-to-launch-google-android/ 598df8f2c121b60019bf2fe3 Fri, 18 Nov 2016 21:59:23 GMT When developing with Xamarin in Visual Studio you have a lot of options for Android Emulators. You can go with the VS Emulators for Android powered by Hyper-V, Genymotion, or the out of the box x86 HAXM powered Android Emulators from Google (a few are installed for you already). It looks though that with some of the latest updates to Windows and VS when you go to launch them you get an error message that they can’t be launched. If you look at the logs you will see something like this:

Error message:
qemu-system-i386.exe: -drive if=none,index=0,id=system,file=C:\PROGRA~2\Android\ANDROI~1/system-images\android-23\google_apis\x86\/system.img: could not open disk image C:\PROGRA~2\Android\ANDROI~1/system-images\android-23\google_apis\x86\/system.img: Could not open ‘C:\PROGRA~2\Android\ANDROI~1/system-images\android-23\google_apis\x86\/system.img’: Permission denied

This is because of where VS installs the Android SDK, which is sad :(

Simple fix…

Run AVD Manager or Visual Studio as Administrator:

Now it will start up again!

]]>
Android Screen Mirroring Made Easy https://staging.montemagno.com/android-screen-mirroring-made-easy/ 598df8f2c121b60019bf303c Thu, 02 Jan 2014 20:57:00 GMT UPDATE 1: Mobizen has since update their app to be web based which is a downer :( But you can get the older version still which is fantastic! http://help.mobizen.com/en/beta-pc-version/

Update #2:

Be sure to check out my new blog on how to easily screen mirror android ios and windows phone devices!

I have been giving a lot of presentations recently for Xamarin, and one of the biggest issues I have run into is running multiple emulators at the same time and getting optimal performance out of them. For iOS the problem is sort of solved by using Reflector, which uses AirPlay to cast your iOS device to your Mac or PC. I use it at nearly all of my presentations and it is great. Android on the other hand is a bit tricky as there are several different emulators (ARM, x86, Genymotion) all with different performance, pricing, and features.

I have been looking all over the internet for a great way to screen mirror my screen to my PC for presentation and this has had mixed results. There are some USB cable system that use Java to send screen shots to your PC, but that is slow and takes up a lot of resources. Samsung recently came out with SideSync on some Laptops, which allow you to do screen mirroring, but it is only available on select laptops and Samsung devices. However, this morning I stumbled upon a little app called Mobizen, which is AMAZING. Once you install the app on your phone and PC you have a near 1 to 1 screen mirror of your Android device. You can use your devices screen or mouse for control. Additionally it puts up a nice device chrome around the device, works on WiFi, works with USB debugging, and it even allows you to drag and drop files from your PC onto your device. Here is a short video showing it off on my Ativ Plus 9 laptop with my Galaxy Nexus.

UPDATE: Mobizen has since update their app to be web based which is a downer :( But you can get the older version still which is fantastic! http://help.mobizen.com/en/beta-pc-version/

]]>