Android Emulation on Windows has been a painful way of life for developers for quite some time now. Support for Android emulation on Windows has come a long way, some might venture to describe it as mildly pleasant in 2021. However with Windows 11 comes an incredibly seamless and easy way for Android developers to quickly run and debug their applications.
Enter Windows Subsystem for Android. In a nutshell The Windows Subsystem for Android is a new feature in Windows 11 that allows you to run native Android apps in a virtualized environment straight from the desktop. This is a great feature for consumers, you can read more about that here. However it is also a pretty big deal for developers.
Getting Started
First thing you will need to do is to install Windows 11 if you have not already done so.
Once you make the jump to Windows 11, you will need to hop on the Windows Insider Beta channel and install the Windows Subsystem for Android. If you are not sure exactly how to get this done, check out this awesome article by our very own Arif Bacchus.
Setting Things Up
Now that you have installed the Windows Subsystem for Android there are a couple of things left to do to get you going. Do a search for “Windows Subsystem for Android” and open the app.
Once you bring up the settings page, make sure to make the following changes. Turn on “Developer mode” and switch “System Resources” from “As needed” to “Continuous”.
Now you are ready to go. For debugging you can just use localhost or 127.0.0.1 on port 58526. You might get a prompt from the Windows Firewall or Third Party security software if you have any installed asking for permission to allow communication to happen. Make sure you accept.
The only thing left to do now is connect to your new Android VM via ADB and Launch Visual Studio. WSA will pop into your drop down list of available devices allowing you to deploy and run your app.
Compromises and Limitations
If your application requires any Google Play services, they won’t be available. Remember this is Virtualization, not Emulation. There will be other scenarios where you require access to certain device hardware which is not currently available through this method either. However as this product matures, undoubtedly these features will start coming on board.
For more information on the Windows Subsystem for Android and how easy it is to run your Android apps on it, check out this video from James Montemagno.
Are you an Android developer? What are your first impressions of Windows Subsystem for Android? Let us know in the comments below.