History log of /system/core/adb/usb_osx.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6c533a7fb9629487c7bd56c6447d7b75b77328eb 27-Sep-2016 Josh Gao <jmgao@google.com> adb: fix IOKit handle leaks on OS X.

Bug: https://code.google.com/p/android/issues/detail?id=219085
Test: Removed sleep in RunLoopThread, compared before/after this patch

Bug: http://b/33283523
(cherry picked from commit b6a2f595151dc6de850f7bc0e2aa5aec3db80213)
Change-Id: Ia65bbedfb7d47bdb02bdfb69778784e5e855900b
/system/core/adb/usb_osx.cpp
71bddf842dd015328676585db4985c5cf739112b 25-Mar-2016 Yabin Cui <yabinc@google.com> adb: use a custom thread to poll for usb devices on mac.

On mac, if the adb server kicks a transport on some error, mac usb driver
will not report a new usb device. So instead of relying on mac usb driver
to report new usb devices, this CL uses a loop to search for usb devices
not exist before. Note that this is also the behavior on windows and linux
host.
`adb reconnect` can be used to verity this CL.

Bug: 25935458
Change-Id: I890e0eb1fae173f2e7a0c962ededa294d821e015
(cherry picked from commit 48d4c0c42afc1cb77c4573ac22adb61d2f92ccd3)
/system/core/adb/usb_osx.cpp
d9db09c3158d3da6aad34fbb926888ceafab3a55 12-Feb-2016 Josh Gao <jmgao@google.com> adb: make adb_thread_func_t return void, add adb_thread_exit.

Windows restricts the return value of threads to 32-bits, even on 64-bit
platforms. Since we don't actually return meaningful values from thread,
resolve this inconsistency with POSIX by making adb's thread abstraction
only take void functions.

Change-Id: I5c23b4432314f13bf16d606fd5e6b6b7b6ef98b5
(cherry picked from commit b5fea14e13bb6e41b36f374c954dc55faeef4627)
/system/core/adb/usb_osx.cpp
1b708d368f29e6053064c9cf6949ab6ebdbb7ac5 12-Dec-2015 Elliott Hughes <enh@google.com> Share the new adb USB diagnostic code with fastboot.

Bug: http://b/26134129
Change-Id: Ieaf0651c7b3f8a028760982091ec63a21a5484ba
/system/core/adb/usb_osx.cpp
663e949b2bbda5dcc2b92e4d1936555019cdd66b 08-Dec-2015 David Pursell <dpursell@google.com> Merge "adb: add help text for USB permission errors."
4f71319df011d796a60a43fc1bc68e16fbf7d321 05-Dec-2015 Elliott Hughes <enh@google.com> Track rename of base/ to android-base/.

Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
/system/core/adb/usb_osx.cpp
d2acbd19312a66cbee2c49f455eddd82b6700d1d 03-Dec-2015 David Pursell <dpursell@google.com> adb: add help text for USB permission errors.

The current permission messages can be confusing for users who don't
know about udev and USB access permissions. This CL adds some checks to
try to identify common udev problems, and adds a link to online
documentation.

Example messages:

1) adb server is in plugdev group but access is still denied:
$ adb devices
List of devices attached
082f59270073e1e3 no permissions (verify udev rules); see [developer.android.com/tools/device.html]

2) plugdev group exists but adb server is not in it:
$ adb shell
error: USB permission failure: udev requires plugdev group membership.
See [developer.android.com/tools/device.html] for more information.

3) plugdev group does not exist:
$ adb shell
error: USB permission failure.
See [developer.android.com/tools/device.html] for more information.

Bug: http://b/25777880
Change-Id: I536565adc12ab657c75151309795674181205db0
/system/core/adb/usb_osx.cpp
aed3c61c4437ebb05eadfb3bf85d6962c30b9935 23-Sep-2015 Yabin Cui <yabinc@google.com> Adb: use VLOG() to replace D() for verbose logging.

As there are too many D(), we can keep both VLOG() and D() now, and get
rid of D() gradually.

Change-Id: I2f1cb70bcab3e82c99fed939341d03f6b2216076
/system/core/adb/usb_osx.cpp
d6ab3c2245b6c71605bad746a535028b717e899a 31-Aug-2015 Yabin Cui <yabinc@google.com> adb: improve names for transport threads.

The old names seems confusing. output_thread was reading remote data and writing to
local sockets. input_thread was reading local sockets data and writing to remote.
This change tries to make it clear by renaming output_thread to read_transport thread,
and renaming input_thread to write_transport thread.

Change-Id: I2e7b4cde7a94d436f3745e9e3ab10780e7caa8ac
/system/core/adb/usb_osx.cpp
49ee7cf9a10f66ffa9a3490c69db5fa46e0a966b 29-Aug-2015 Siva Velusamy <vsiva@google.com> adb: set thread names (linux & mac)

Bug: 23423333
Change-Id: I0069f32ddbae2a10fb130064f721facf45b2cc09
/system/core/adb/usb_osx.cpp
62077d32a245b5a5a687265671219b31f3e4f99c 26-Aug-2015 Elliott Hughes <enh@google.com> Possible Mac build fix.

The error was this:

system/core/adb/usb_osx.cpp:203:74: error: values of type 'UInt32' should not
be used as format arguments; add an explicit cast to 'unsigned int' instead
[-Werror,-Wformat]
snprintf(devpathBuf, sizeof(devpathBuf), "usb:%" PRIu32 "X", locationId);
~~~ ^~~~~~~~~~
(unsigned int)

Which seems to be because on LP64 UInt32 is "unsigned int" but on LP32 it was
"unsigned long". We don't have to care about LP32, so -- if we can -- we're
probably better off just using uint32_t instead of UInt32.

Change-Id: I576f76cf2016ee59caccbc317ef74b6e8d71d722
/system/core/adb/usb_osx.cpp
743883b570b200ff4d73d60798d63136f3e3d82e 19-Aug-2015 Siva Velusamy <vsiva@google.com> Use glog for logging in the OSX USB layer

Change-Id: I8a3a4dfc768fdd335f03dc582c85b410c808aeb7
/system/core/adb/usb_osx.cpp
2d4f852da4881b543c11f82de4af44db88bdf306 14-Aug-2015 Elliott Hughes <enh@google.com> Start iterating USB pipe endpoints from 1.

Bug: http://b/22829602
Change-Id: I5051880730ba8fadae5d78f1d19b5d527610d4a5
/system/core/adb/usb_osx.cpp
d8b48a62810d1d8f6482aba1b710d8ac89c3e40a 13-Aug-2015 Siva Velusamy <vsiva@google.com> adb: On Mac, clear both host and device endpoints at startup

This CL clears both the host and device endpoints right at the
beginning when the bulk endpoints are identified. This is in general
a "good idea", but more specifically for us, it fixes the issue
that sometimes when adb quits, it clears the endpoint on the host,
but not on the device which resulted in a subsequent invocation of
adb was seeing a stall.

Bug: https://code.google.com/p/android/issues/detail?id=182151

Change-Id: I331fa6805c40d1f50c153c010ceecd2f6a4045eb
/system/core/adb/usb_osx.cpp
6e02c24cfcba575c1e97a83fe59bea456eebf1ce 04-Aug-2015 Elliott Hughes <enh@google.com> Include the error code if GetPipeProperties fails.

Bug: http://b/22829602
Change-Id: I90a89e70518053a4581e1862a7dbd5d09e06dadc
/system/core/adb/usb_osx.cpp
c89e0ccd40624e8b2ce30d425e8bed0264fae548 09-May-2015 Dan Albert <danalbert@google.com> Revert "Revert "Split adb_main.cpp into client and daemon.""

This reverts commit 218dbccefa3d874d988e4784bda5e45b7643cb5a.

Change-Id: I74088db34983dc99e316a07c6ddc294340e0eb71
/system/core/adb/usb_osx.cpp
218dbccefa3d874d988e4784bda5e45b7643cb5a 09-May-2015 Dan Albert <danalbert@google.com> Revert "Split adb_main.cpp into client and daemon."

This reverts commit cf07494ac2a101c3afbe23a7d85121553f586cf7.
/system/core/adb/usb_osx.cpp
cf07494ac2a101c3afbe23a7d85121553f586cf7 06-May-2015 Dan Albert <danalbert@google.com> Split adb_main.cpp into client and daemon.

The name "client" is somewhat misleading as it also contains the host
side adb server, but it's a part of the client binary.

Change-Id: I128b7bab213e330eb21b5010cd1fec5f7a62c8af
/system/core/adb/usb_osx.cpp
9b0f354fa25e3d5add516000c761e07c81c3bbc1 05-May-2015 Elliott Hughes <enh@google.com> Simplify adb_thread_create.

Change-Id: I36d6021ef8fbc23e8bcd4ddbe1dac0eba467cc70
/system/core/adb/usb_osx.cpp
dc3b459ff9f0ff71d404ba7198083e532a0dd894 22-Apr-2015 Elliott Hughes <enh@google.com> Add missing null checks after allocations.

Bug: http://b/20317729
Change-Id: I62bb761d48ee59a1f4ddd0cdd0632432305ca2ca
/system/core/adb/usb_osx.cpp
7447dd05bdc12b87687c49ee7ecf0fe50d8ab17a 17-Apr-2015 Dan Albert <danalbert@google.com> Move usb_osx to C++.

Change-Id: I21673211a702cc4f31d4311c36e2a4b22e55fac8
/system/core/adb/usb_osx.cpp