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

add pure-python-adb interface to mvt-android #266

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tothi
Copy link

@tothi tothi commented May 4, 2022

added pure-python-adb support as a replacement for adb-shell in mvt-android.

adb-shell had troubles with tcp-based adb connections (tls is unsupported), while ppadb is not affected by the connection type because it communicates to the local adb server (and the adb server is responsible for communicating with the device).

still not well tested (+no error/exception handling), but seems to work.

@botherder
Copy link
Contributor

Thanks for the contribution. I'm generally not a fan of adding multiple dependencies. I would prefer to stick to using either one or the other. If pure-python-adb works better, that's great. I picked adb-shell because it looks more actively developed, and @JeffLIrion seems to be responsive to issues being reported. Perhaps if the are missing features we could help contribute those to adb-shell?

I'm open to any suggestions though. Everyone welcomed to chime in.

@JeffLIrion
Copy link
Contributor

Yes, adb-shell does not support TLS. It would be great if someone would like to contribute that feature.

For my androidtv package, I wrote two wrapper classes around adb-shell and pure-python-adb with the same interface. If you want to support multiple backend libraries, I definitely think that's the best approach.

https://github.com/JeffLIrion/python-androidtv/blob/master/androidtv/adb_manager/adb_manager_sync.py

P.S. adb-shell is now thread-safe and supports multiple streams, so the lock is no longer necessary. I don't know about pure-python-adb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants