mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-22 09:29:38 +00:00
No device found when running in WSL with Windows emulator #55
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bombillazo on 11/2/2020
Context
Hello. First off, great extension, thank you for your work.
I have an Android project in my WSL file system. I have the same version of the SDK tools installed in my WSL and Windows Host.
Windows PowerShell
WSL bash
In the WSL I add ADB_SERVER_SOCKET to my env to use my Windows host as the adb host to listen.
export ADB_SERVER_SOCKET=tcp:$(cat /etc/resolv.conf | grep nameserver | cut -d' ' -f2):5037I create a FireWall rule on my Windows host to allow traffic for the debug port 5037, plus added 5555 and 5554 for good measure. I run the following on my Windows host so adb in WSL can see the devices running on the Windows host:
Windows PoweShell
adb -a -P 5037 nodaemon serverI launch an emulator on my Windows host (WSL does not support virtualization, so cannot run the Android emulator locally on WSL). After all this, I see the device in my WSL:
WSL
Expected Behavior
The launched debugger finds and connects successfully to Android emulated device.
Actual Behavior
When the debugger is launched, no device is found.