Commit graph

13 commits

Author SHA1 Message Date
Josh Gao
f806a3c303 fastboot: gracefully handle failure to open a USB device on OS X.
High Sierra restricts opening some USB devices (e.g. the touchbar)
to processes that have specific entitlements. Ignore devices that we
can't open.

Bug: http://b/64292422
Test: manual
Change-Id: I6074b53a365b8d936610bafea60244f8bba1a33f
2017-08-18 18:25:44 -07:00
Elliott Hughes
c8cad2cbfc Merge "Revert "Get fastboot working on OS X"" 2017-02-03 18:40:46 +00:00
Elliott Hughes
35c1a6203e Revert "Get fastboot working on OS X"
This reverts commit 81c24f6f86.

Change-Id: If2f7220ff00582c3e1b38917352ab961ded48642
2017-02-03 01:28:42 +00:00
Keith Mok
d23afb5980 fastboot: Workaround for touchbar hang on MBP 2016
fastboot will try to set usb configuration on connected
usb devices. When it tries to change the usb configuration
on iBridge device on MBP 2016 model, it hangs, and frozen
the touchbar. Skip set usb configuration.

Bug: https://code.google.com/p/android/issues/detail?id=231129
Change-Id: Ib055fc0524d26092555fc135588fa362e70eeb39
2017-01-26 19:57:09 +00:00
David Pursell
0b15663830 fastboot: create Transport object (take 2).
(Second upload of this CL; original upload had the wrong version of
usb_windows.cpp that caused a compilation error. Fixed error and
re-tested.)

This CL creates a Transport object to provide a generic interface for
various transports. Specifically this is designed to be able to add UDP
support to fastboot in an upcoming CL without changing the main program
logic.

Also includes some minor code style fixes and replaces malloc/free
in the USB implementation files with smart pointers and std::string.

Bug: http://b/22029765
Change-Id: I1175bbce08690fbd15f51e68166be9b3e9973ea0
2015-11-16 09:31:07 -08:00
David Pursell
c0504e1873 Revert "fastboot: create Transport object."
This broke some stuff, will look into it Monday.

This reverts commit 6f233a7799.

Change-Id: I155bc85d21fda3b0ba1e5e17839059797fb15509
2015-11-14 00:15:57 +00:00
David Pursell
6f233a7799 fastboot: create Transport object.
This CL creates a Transport object to provide a generic interface for
various transports. Specifically this is designed to be able to add UDP
support to fastboot in an upcoming CL without changing the main program
logic.

Also includes some minor code style fixes and replaces malloc/free
in the USB implementation files with smart pointers and std::string.

Bug: http://b/22029765
Change-Id: I68641af0da7d13db4647f5e20a18d04d67f0b327
2015-11-13 11:08:17 -08:00
Matt Reimer
81c24f6f86 Get fastboot working on OS X
Get fastboot working on OS X by calling USBDeviceOpen() before
calling SetConfiguration().

Change-Id: I5034721d5f33ef18273153ff40eb940baa8261cd
2015-08-19 14:46:17 -07:00
Elliott Hughes
2d4f852da4 Start iterating USB pipe endpoints from 1.
Bug: http://b/22829602
Change-Id: I5051880730ba8fadae5d78f1d19b5d527610d4a5
2015-08-13 16:00:12 -07:00
Elliott Hughes
2ae8d2ebae More Mac fastboot failure debugging.
Bug: http://b/22829602
Change-Id: I27738883eb545ed72eaae55fe3a077e6d1421302
2015-08-07 10:49:36 -07:00
Elliott Hughes
6e02c24cfc Include the error code if GetPipeProperties fails.
Bug: http://b/22829602
Change-Id: I90a89e70518053a4581e1862a7dbd5d09e06dadc
2015-08-06 10:48:19 -07:00
Elliott Hughes
fbcb93abe2 Fix Mac fastboot build.
Change-Id: I516c07cee39845caaa47608604eeb30ce15f06cb
2015-06-24 13:28:24 -07:00
Elliott Hughes
20750ad823 Move fastboot's Mac OS code to C++.
Change-Id: I4f452860a401a115b6e8349237923949f2f476d1
2015-06-24 11:17:28 -07:00
Renamed from fastboot/usb_osx.c (Browse further)