How can I get the Ubuntu shell on Windows 10 to recognize a connected android device?
I'm trying to connect adb to my Android device in the Windows 10 Ubuntu shell, but it doesn't seem to be working:
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.)
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
The bash shell under Windows does not have functions to connect to USB devices. So ADB is not going to work until someone adds that.
Here is the proposal for adding USB support.