History log of /system/core/adb/usb.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9425996b4521eae0571b4af30056c44bb0482598 08-Dec-2017 Josh Gao <jmgao@google.com> adb: get libusb compiling on Windows.

This still doesn't work yet because libusb doesn't support hotplug on
Windows yet, but it's in the milestones for the next libusb release,
and this is enough to start poking around with the WinUSB device-side
stuff, so leave it broken for now.

Bug: http://b/68993980
Test: set ADB_LIBUSB=1; adb.exe server nodaemon aborts in the expected place
Change-Id: Icef7d46e31c847d6a8e724c6f58ae5db43673c16
/system/core/adb/usb.h
01b7bc43e90b951675cabe88313b96f57b2da712 09-May-2017 Josh Gao <jmgao@google.com> adb: move all cleanup to a function with defined ordering.

We want to explicitly define the order in which we teardown adb, so
move all of the at_quick_exits sprinkled throughout into one function
containing all of the cleanup functions.

Bug: http://b/37104408
Test: adb kill-server; adb start-server
Change-Id: I394f5782eb147e394d4b87df1ba364c061de4b90
/system/core/adb/usb.h
ef3d343254405cc360b4df843c6e4a843c335012 03-May-2017 Josh Gao <jmgao@google.com> adb: use the actual wMaxPacketSize for usb endpoints.

Previously, adb was assuming a fixed maximum packet size of 1024 bytes
(the value for an endpoint connected via USB 3.0). When connected to an
endpoint that has an actual maximum packet size of 512 bytes (i.e.
every single device over USB 2.0), the following could occur:

device sends amessage with 512 byte payload
client reads amessage
client tries to read payload with a length of 1024

In this scenario, the kernel will block, waiting for an additional
packet which won't arrive until something else gets sent across the
wire, which will result in the previous read failing, and the new
packet being dropped.

Bug: http://b/37783561
Test: python test_device.py on linux/darwin, with native/libusb
Change-Id: I556f5344945e22dd1533b076f662a97eea24628e
/system/core/adb/usb.h
5d1756ceb58246a721e10464f788e81cdcdc455a 23-Feb-2017 Josh Gao <jmgao@google.com> adb: add `adb host-features`, report libusb status.

Add a 'host-features' command to get the features of the currently
running host adb server. Abuse it to report libusb status.

Bug: http://b/34983123
Test: adb host-features; adb kill-server; ADB_LIBUSB=1 adb start-server; adb host-features
Change-Id: I0e8d503a2dbdff9002ebb6ce8a298498a9421422
/system/core/adb/usb.h
1c70e1bcbcced190b351d4fb418f32b4e428f496 28-Sep-2016 Josh Gao <jmgao@google.com> adb: add libusb implementation for Linux/Darwin.

Add a libusb-based implementation alongside the existing native
implementations, controlled by the ADB_LIBUSB environment variable.

Windows will need more work for the usb driver.

Bug: http://b/31321337
Test: python test_device.py on linux/darwin, with ADB_LIBUSB=0 and 1
Change-Id: Ib68fb2c6c05475eae3ff4cc19f55802a6f489bb7
/system/core/adb/usb.h