Is there any possible way to run Android apps on Windows Subsystem for Android by Android Studio?


It would be great if we can debug Android apps on Windows Subsystem for Android.


Of course that is possible, it works similar to any external device.

First enable Developer mode in Windows Subsystem for Android Settings application.
Windows Subsystem for Android settings application


Then, connect ADB either like adb.exe connect or adb.exe connect <that ip assigned to your WSA device> once connect, just proceed as usual.

Go to Run -> Select Device
Android Studio select device menu


If ADB had connected correctly, it will be listed there as Microsoft Corporation Subsystem for Android(TM)
List of devices available to connect to in Android Studio


And that’s it, it will be available as target the external device to debug with.
Android Studio and WSA


Now you can compile and Debug (Shift+F9) from Android Studio and Windows Subsystem for Android launching it and pausing accordingly (breakpoints, exceptions, etc.)
Debugging APK from Android Studio with WSA


Debugging APK from Android Studio with WSA


If you want to tweak more the debugging settings, you can launching its View in WSA from that Settings application.
WSA more debugging settings from within the Android instance itself


Answered By – vhanla

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published