Ubuntu – How to get the Ubuntu shell on Windows 10 to recognize a connected android device

androidusbwindows 10windows-subsystem-for-linux

I'm trying to connect adb to my Android device in the Windows 10 Ubuntu shell, but it doesn't seem to be working:

Waiting for Device in Ubuntu Bash Shell

adb does work normally on Windows, so it's not a problem with the phone or the connection. Do I have to do something like mount the port in the Ubuntu shell? How? (The goal is to pass logcat to grep, which would obviously work better in Ubuntu.)

Best Answer

There is a tricky way to make it work even with current limitations. You need to start adb server from cmd:

adb kill-server //if it is already running under bash shell
adb start-server

Then you can call adb from bash shell, it will use existing server and as result will be able to list connected devices.

adb devices

Note: Because the environment is loading paths from the Windows PATH variable, you may need to run with the .exe extension as well (or alias adb to adb.exe to keep commands the same).

adb.exe devices