-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: autodetect an ADB device when no vendor or product ID is specified #44
Conversation
### Changes - Added methods `autodetect` to `autodetect_with_custom_private_key` to `ADBUSBDevice` - Added private functions to check if a usb device has the signature of an ADB device - Made the `vendor_id` and `product_id` USB arguments optional and default to aforementioned methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this useful PR :)
Some comments before merging
I will make the necessary changes in a day's worth of time. Thanks again for the review :D
|
I cleaned the code a bit with functions that could be called either with a custom private key or not. I also remove the thread(s) spawned to get devices, if no device is find at the time an error is raised |
Thank you very much! I like that you are explicitly refusing to handle multiple devices under autodetect. Makes sense.
Should we expose the search_adb_devices function or something similar that allows the user to query all matching VIDs and PIDs?
|
I think we can keep it private for now and see if there are people needing it |
good call
|
Changes
autodetect
toautodetect_with_custom_private_key
toADBUSBDevice
vendor_id
andproduct_id
USB arguments optional and default to aforementioned methods