Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB device support, libusb (ADB support, etc) #2195

Open
timcanham opened this issue Jun 7, 2017 · 16 comments
Labels

Comments

@timcanham
Copy link

@timcanham timcanham commented Jun 7, 2017

This bug-tracker is monitored by developers and other technical types. We like detail! So please use this form and tell us, concisely but precisely, what's up. Please fill out ALL THE FIELDS!

If you have a feature request, please post to the UserVoice. If you're reporting a BSOD, don't post here! Instead, e-mail "secure@microsoft.com", and if possible attach the minidump from "C:\Windows\minidump".

  • Your Windows build number: Microsoft Windows [Version 10.0.14393]

  • What you're doing and what's happening: Trying to use the adb package to talk to embedded boards via USB. Used apt-get to install it.

  • What's wrong / what should be happening instead: The adb utility finds no devices.

  • Strace of the failing command, if applicable: (If <cmd> is failing, then run strace -o strace.txt -ff <cmd>, and post the strace.txt output here)

n/a

See our contributing instructions for assistance.

@timcanham

This comment has been minimized.

Copy link
Author

@timcanham timcanham commented Jun 7, 2017

Perhaps related to #825.

@sunjoong

This comment has been minimized.

Copy link

@sunjoong sunjoong commented Jun 7, 2017

@timcanham - I'm not sure but... ethanhs/WSL-Programs#29 and the first raw of list in https://github.com/ethanhs/WSL-Programs .

@timcanham

This comment has been minimized.

Copy link
Author

@timcanham timcanham commented Jun 7, 2017

The image they showed seemed to indicate it work in cmd.exe but not bash.

@sunjoong

This comment has been minimized.

Copy link

@sunjoong sunjoong commented Jun 7, 2017

@timcanham - Commands that begin with bash -c were bash command after bash -c; You could command ls in bash but could bash -c ls in cmd.exe. And... yeah... it shows WSL partially suport ADB; the list said you need ADB in windows too especially for USB devices, you know.

@therealkenc

This comment has been minimized.

Copy link
Collaborator

@therealkenc therealkenc commented Jun 7, 2017

libusb, lsusb and friends. The image shows adb installed but listing no devices (props to the adb devs for failing gracefully instead of faceplanting). It used to be this User Voice before it was closed. WSL also lacks udev atm.

@ReVanTis

This comment has been minimized.

Copy link

@ReVanTis ReVanTis commented Jun 9, 2017

@sunjoong @timcanham
Please do read what I posted carefully ethanhs/WSL-Programs#29 (comment)
ADB is functional only when you start adb server in the host system(windows), thus host system would handle all usb traffic for bash on windows.
That's also why adb on both sides are required to be the very same version so they would recognize each other and communicate through tcp.
It's not natively supported by bash because usb is not generally working on bash.
In addition I assume adb over tcp/ip (adb connect [IP]) would work even with adb server started in bash.

@zoldyckw

This comment has been minimized.

Copy link

@zoldyckw zoldyckw commented Aug 4, 2017

thanks @ReVanTis , now i can build rom for my xperia.... my adb now is showing my device...
screenshot 14

@CyrilTaylor

This comment has been minimized.

Copy link

@CyrilTaylor CyrilTaylor commented Sep 1, 2017

I test it in my PC, the version of adb in bash should be same as it in cmd, because if the version of adb client not match the version of adb server, the adb server will be killed by adb client in bash and restart adb server in bash, adb server in bash can't access the devices in windows. so there are steps to make sure adb work in bash:

  1. there are same version of adb in bash and cmd.
  2. start adb-server in cmd first, and make sure adb-server running in windows end.
@oldium

This comment has been minimized.

Copy link

@oldium oldium commented Dec 29, 2017

As a workaround, you can install adb.exe on Windows and access it from Linux - just create a symbolic link from adb.exe to /home/<user>/bin/adb. Tested on the latest Insider Windows build (17063).

@tommai78101

This comment has been minimized.

Copy link

@tommai78101 tommai78101 commented Nov 1, 2018

Even if you create a symbolic link from adb.exe to /usr/bin/adb (the path obtained after you do sudo apt-get install adb), you would still run into the issue where ADB cannot be found if you run python /android-sdk/platform-tools/systrace/systrace.py.

So technically speaking, the ADB is not the same as Windows ADB.

@kengkeelim

This comment has been minimized.

Copy link

@kengkeelim kengkeelim commented Nov 15, 2018

@ReVanTis May I know how do you get to make both ADB in bash and cmd the same version? Thank you for your time.

@ReVanTis

This comment has been minimized.

Copy link

@ReVanTis ReVanTis commented Nov 15, 2018

@kengkeelim Download here: https://developer.android.com/studio/releases/platform-tools
Download both Linux and Windows version and use them together.

@caver456

This comment has been minimized.

Copy link

@caver456 caver456 commented Dec 27, 2018

Just a note, I was able to work for a couple weeks with windows adb version being newer and ubuntu-in-wsl adb version being older: I installed an older sdk for specific reasons, which had the older adb with it. Yes, each time I tried adb in one OS vs the other it would stop the different-version adb server and start the one for the current OS, and then it would recognize just fine. Tonight, for some reason that I was not sharp enough to track down, it stopped in both OSes - after all the various fixes I could find for adb not recognizing the device, I finally tried installing the same adb version on linux as on windows (without affecting the older sdk I had previously installed). Now both OSes recognize the device, just like the good ol days.

@jan4984

This comment has been minimized.

Copy link

@jan4984 jan4984 commented Jun 30, 2019

anyhow WSL-Programs will die because WSL 2 coming.

@WSLUser

This comment has been minimized.

Copy link

@WSLUser WSLUser commented Jul 3, 2019

anyhow WSL-Programs will die because WSL 2 coming

WSL1 still lives and versions of Windows that only offer WSL1 still exist. So no it won't die for a long time.

@therealkenc

This comment has been minimized.

Copy link
Collaborator

@therealkenc therealkenc commented Sep 21, 2019

#825 ended up being closed incorrectly conflating RS232 serial devices with USB. The User Voice for USB device support is here. [ed] Now LZ this issue since UserVoice is closed.

@therealkenc therealkenc added the feature label Oct 4, 2019
@therealkenc therealkenc changed the title ADB Support? USB device support, libusb (ADB support, etc) Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.