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

Time:10-25

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

CodePudding user response:

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

pic

Then, connect ADB either like adb.exe connect 127.0.0.1:58526 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

pic2

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

pic3

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

pic4

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

pic5

Debugging APK from Android Studio with WSA

pic6

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

pic7

  • Related