mvt icon indicating copy to clipboard operation
mvt copied to clipboard

add pure-python-adb interface to mvt-android

Open tothi opened this issue 3 years ago • 2 comments

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.

tothi avatar May 04 '22 22:05 tothi

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.

botherder avatar May 05 '22 11:05 botherder

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.

JeffLIrion avatar May 05 '22 17:05 JeffLIrion