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

PyADB instead of ADB. Possible workaround? #533

Closed
Plandercozeron opened this issue May 13, 2019 · 6 comments
Closed

PyADB instead of ADB. Possible workaround? #533

Plandercozeron opened this issue May 13, 2019 · 6 comments
Labels

Comments

@Plandercozeron
Copy link

I'm using Ubuntu 18.10. ADB version 1.0.39.
May i use scrcpy in pair with PyADB instead of ADB?

The thing is ADB on my Ubuntu has bug or something
adb devices shows only 7 connected devices instead of 8 or more (ADB on windows works fine)
pyadb devices lists all devices properly.
First you push server.jar
Then what?

Thanks in advance

@npes87184
Copy link
Contributor

npes87184 commented May 13, 2019

Hi, @rom1v

I have seen many problems about the protocol and the initialization.

May we need to add some more developer guide in DEVELOP.md?

@rom1v
Copy link
Collaborator

rom1v commented May 15, 2019

adb devices shows only 7 connected devices instead of 8 or more (ADB on windows works fine)
pyadb devices lists all devices properly.

This is weird, since pyadb is just a wrapper which calls adb:
https://github.com/sch3m4/pyadb/blob/8f536c915c315eb9c4cc44088f5c067e68b02e3a/pyadb/adb.py#L108

@rom1v rom1v added the adb label May 15, 2019
@Plandercozeron
Copy link
Author

I see. I tried both adb from /usr/bin (version 39) and adb from android studio from sdk/platfrom-tools/adb (version 41) - show max 7 devices. Probably the problem is within ubuntu itself.
Better ask in PyADB thread then

@Plandercozeron
Copy link
Author

Plandercozeron commented May 27, 2019

Made an issue at PyADB repo:
sch3m4/pyadb#16
Not sure if i gonna get any answers as it seems that repo is dead (or i can run through sources by myself). Since PyADB really is a wrapper to ADB it's better to ask PyADB devs.
I guess you can close that issue then

@Plandercozeron
Copy link
Author

Plandercozeron commented Jul 3, 2019

Nevermind. Not even close to ADB or PyADB
Seems like linux bug which is connected to xhci_hcd driver
dmesg gives me:
Not enough host controller resources for new device state.
can't set config #1, error -12

@Plandercozeron
Copy link
Author

Resolved this case by overriding xHCI with EHCI
Disable xHCI

lspci -nn | grep USB \
| cut -d '[' -f3 | cut -d ']' -f1 \
| xargs -I@ setpci -H1 -d @ d0.l=0

Undo (d0.l=1):

lspci -nn | grep USB \
| cut -d '[' -f3 | cut -d ']' -f1 \
| xargs -I@ setpci -H1 -d @ d0.l=1

Now i can use my 20-port hub by 100% =)

@rom1v rom1v closed this as completed Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants