Wine implements sockets with their own internal socketpair, which
results in the poll disconnect test failing.
Bug: http://b/117568356
Test: wine adb_test.exe
Change-Id: Icd2a94f8297fefd5c02e6517568fe288b168032c
At some point between Q and master, adb_test.exe stopped working because
it wasn't being linked with -municode?
Test: wine adb_test.exe
Change-Id: I6c20f3b3241cee2052d31d1ca85b8a9738828f6e
* changes:
adb: fdevent: extract Add/Del/SetTimeout.
adb: fdevent: extract Create/Destroy from fdevent_context_poll.
adb: fdevent: move TerminateLoop to fdevent_context.
adb: fdevent: move CheckMainThread logic to fdevent_context.
adb: fdevent: delete FDE_CREATED.
adb: fdevent: move run queue to fdevent_context.
adb: implement fdevent_reset by constructing a new context.
adb: move fdevent implementation out to a separate file.
adb: de-globalize fdevent context.
adb: move fdevent to its own folder.
adb: add superfluous include.
Update adb, fastboot and mount point
Bug: 134359158
Test: build and check if system_ext.img can be flashed
Change-Id: I6219f72242c5fe42a508008c0b1fd218d74da5b6
All fdevents must be created by fdevent_create/fdevent_context::Create
now, so this flag is meaningless.
Test: none
Change-Id: I8489afad07bdb267ddfdb0dbb25d40d3a62f55f6
Make the run queue logic reusable between implementations of fdevent by
moving it to the abstract base class.
Test: adb_test
Change-Id: If2f72e3ddc8007304bca63aa75446fa117267b25
Resolve a merge conflict between internal and aosp by making aosp look
like internal.
Test: none
Change-Id: I7bea6ab61ad45ff20a3d07abf3f73903a7c05585
Merged-In: If73b81ca73ba4d64763cf49c1bbe42de81fa1cb6
Read until we receive FUNCTIONFS_BIND after every USB descriptor setup,
instead of only after initial creation of the control fd, so we properly
handle a rebind caused by a change of the USB configuration.
This reverts commit 55b31933f41b1c550b788fa2054010c51f56111b.
Bug: http://b/133132986
Bug: http://b/135155652
Test: manually enabled/disabled MTP with nonblocking_ffs enabled and disabled
Change-Id: Ibb3f46b8f84854ede47a669a85e07e16a5dd6008
We're only reading FUNCTIONFS_BIND on creation upon the first creation
of the control fd, which results in an abort when rebind happens (e.g.
when MTP is enabled) and we unexpectedly read FUNCTIONFS_BIND in the
second instantiation of the connection.
This reverts commit 2b668d3906.
Bug: http://b/135155652
Test: manually enabled MTP
These CHECKs are expected to happen if the client does the wrong thing,
so we probably shouldn't be aborting in adbd.
Bug: http://b/133872605
Bug: http://b/134695864
Test: treehugger
Change-Id: I875b87a06ba9d399db26f8af1ad47ccf34e9445a
Rework the functionfs logic to avoid rebinding the USB interface
repeatedly.
Bug: http://b/133132986
Test: treehugger
Change-Id: I7f75874efd197764d40b66800a117ff4726d793b
We assign string literals directly to argv[0], which leads to fun
explosions when we attempt to free when the runtime can detect that
a bad free happened, which seems to happen reliably with lld.
Bug: http://b/110800681
Test: `adb shell true` on windows
Change-Id: Ica81e472c31686d80b58c41ff6d2b825baef06fb
Which will dump all the allowed properties, similar to `adb shell
getprop`.
Bug: 134027350
Test: Run the command under rescue mode.
Change-Id: Id668224098006d71ee192c8c2bea5d791d2423c1
* changes:
adb: daemon: Assign valid fd to usb_handle ep0 file descriptor
adbd: respond to device-to-host control transfers.
adbd: read, print, and ignore USB control transfers.
non-aio USB read function was stuck in a loop waiting for more data
because data length parameter is always set 64 for fastbootd commands.
It should be a normal case to get less data than expected
since lengths of these commands are usually less than 64.
Add logic to check this and one more parameter to distinguish
fastbootd from general adbd case.
Bug: 133189029
Test: try various fastbootd commands
Change-Id: I6690324840d78f3f1e04235040301520329976db
Merged-In: I6690324840d78f3f1e04235040301520329976db
Failing to write to the endpoint results in subsequent reads on ep0 to
fail with EL2HLT, so do an empty write to fulfill the transfer.
Bug: http://b/131867920
Test: manually tested with modified auto client
Change-Id: If2eec162ca4b31a9974c7bd5802be51cee9e2708
Merged-In: If2eec162ca4b31a9974c7bd5802be51cee9e2708
(cherry-picked from internal commit af086e9a95)
It seems like we're blowing up when receiving a control transfer that's
intended for Android Auto, because we're not expecting to get the data
for the control transfer in a subsequent read.
Bug: http://b/131867920
Test: none
Change-Id: Icfd642e6dfc02d2ccbdd60c39f89e534298c944d
Merged-In: Icfd642e6dfc02d2ccbdd60c39f89e534298c944d
(cherry-picked from internal commit 12807c7012)
Add Microsoft OS Descriptors so that on Windows, we get automatically
registered with the WinUSB driver instead of requiring a different INF
to be used with device with a different vendor ID.
Bug: http://b/68993980
Test: manually changed the vendor ID on a blueline and connected it to a Windows VM
Change-Id: Id78bae270df9805573a90a86019267b53a3c8252
Kernel does not accept non-zero value of iocb->aio_reserved2.
Bug: 132803232
Test: initialize malloc() memory to non-zero pattern and see what breaks
Change-Id: I65a7e89e3a2c1ba79df1dc2d011d6c76c41afb81
Also, improve the logging in the cases where we do abort.
Bug: http://b/131867920
Test: treehugger
Change-Id: If8ec9f4614ce146e6dbd21cc77587ea81658199b
The original commit broke aosp-master-with-phones, because of
vendor libraries the depended on the int versions of libbase functions.
This patch reverts the revert, and also adds ABI-compatibility shims for
the replaced functions.
This reverts commit 2c58e1924a.
Bug: http://b/131312539
Test: treehugger
Test: forrest run of aosp-master-with-phones
Change-Id: I75cc84ec8d963e20862f7662e8e2f409471f41cc