google / python-adb

Python ADB + Fastboot implementation
Apache License 2.0
1.8k stars 356 forks source link

Help wanted! Capture usb traffic from real devices #111

Open fahhem opened 6 years ago

fahhem commented 6 years ago

We need real traffic from real devices turned into unit-tests. Preferably the data is what TCPHandle and USBHandle see (in unicode or bytes, whichever format they receive data in).

This is a two-parter: Capturing the data and creating unit-tests. Anyone can capture the data and post it here for someone else to create unit-tests using it. The more data the better, so we ensure we're handling all sorts of weird phones.

zgoda-mobica commented 6 years ago

I don't see any obvoius place in code to hook in with sniffing code, other than building complete wrapper around handle and monkeypatching it into AdbCommands?

fahhem commented 6 years ago

you can modify/replace UsbHandle. Unless you want to check in your changes, then I think it would be best to create a new handle (SniffingUsbHandle?) and pass it into ConnectDevice(handle=handle)

zgoda-mobica commented 6 years ago

Thanks.