Commit Graph

19704 Commits

Author SHA1 Message Date
Josh Gao fe07481ff9 Merge changes I4a8aa840,I9708f2a3
am: 44b08c722d

* commit '44b08c722d05f650c9b6872e28c73affe68eb55a':
  adb: check for an error response from adbd between each write.
  adbd: restore the old error handling behavior.
2016-02-20 02:29:54 +00:00
Josh Gao 44b08c722d Merge changes I4a8aa840,I9708f2a3
* changes:
  adb: check for an error response from adbd between each write.
  adbd: restore the old error handling behavior.
2016-02-20 02:28:22 +00:00
Josh Gao 0640b14df2 Merge changes I9757ab85,Idac80a24
am: 2e70b2d5d8

* commit '2e70b2d5d82d6776fe8715de97220a8d7b11afd2':
  adb: change unsigned to uint32_t in sync struct definitions.
  adb: detect when the client disconnects in wait-for-device.
2016-02-20 02:12:46 +00:00
Josh Gao 2e70b2d5d8 Merge changes I9757ab85,Idac80a24
* changes:
  adb: change unsigned to uint32_t in sync struct definitions.
  adb: detect when the client disconnects in wait-for-device.
2016-02-20 02:11:07 +00:00
Josh Gao afcdcd703e adb: check for an error response from adbd between each write.
When sending a file, do a 0-timeout poll to check to see if an error has
occurred, so that we can immediately report failure.

Bug: http://b/26816782
Change-Id: I4a8aa8408a36940bfda7b0ecfa5d13755f4aa14d
2016-02-19 18:01:09 -08:00
Josh Gao 20a96c7d79 adbd: restore the old error handling behavior.
Restore the previous file sync error handling behavior of reporting
failure, and then consuming packets from the other end until receiving a
DONE packet.

Bug: http://b/26816782
Change-Id: I9708f2a36c072547e191fa0b6b42dffc31f8a2f2
2016-02-19 18:01:09 -08:00
Josh Gao 38d258ef70 Merge changes I6541bb13,I486055bb,Id6ac1c54,I16cf7d44
am: 4a9084228a

* commit '4a9084228a447658dc7beda9334dad0b1f8bb780':
  adb: make fdevent_test, socket_test compile on Windows.
  adb: add fd exhaustion test, fix errno reporting in sysdeps_win32.
  adb: move win32 fd base to 2048, fix fd allocation.
  adb: don't emulate fdevent or socketpair on Windows.
2016-02-20 01:44:14 +00:00
Josh Gao 4a9084228a Merge changes I6541bb13,I486055bb,Id6ac1c54,I16cf7d44
* changes:
  adb: make fdevent_test, socket_test compile on Windows.
  adb: add fd exhaustion test, fix errno reporting in sysdeps_win32.
  adb: move win32 fd base to 2048, fix fd allocation.
  adb: don't emulate fdevent or socketpair on Windows.
2016-02-20 01:41:09 +00:00
Josh Gao 69469c4e9f adb: change unsigned to uint32_t in sync struct definitions.
Change-Id: I9757ab853cfad1a2e1393ef32bcab222ab84acef
2016-02-19 14:37:04 -08:00
Josh Gao 09855472f4 adb: detect when the client disconnects in wait-for-device.
Avoid leaking a thread and its associated resources when a user cancels
wait-for-device.

Bug: http://b/26966721
Bug: https://code.google.com/p/android/issues/detail?id=199088
Change-Id: Idac80a24e9739ddd24e500fe14826a78f350c018
2016-02-19 14:35:48 -08:00
Colin Cross fccaa02a76 Merge "libmemunreachable: fix long timeout on error"
am: ee127f3d6b

* commit 'ee127f3d6b20c45e90f277d5571260b0250f0349':
  libmemunreachable: fix long timeout on error
2016-02-19 22:11:36 +00:00
Colin Cross ee127f3d6b Merge "libmemunreachable: fix long timeout on error" 2016-02-19 22:04:26 +00:00
Colin Cross b1b7923efe libmemunreachable: fix long timeout on error
The collection thread should unblock the parent when it fails in order
to prevent a 100 second timeout delay.  Also reduce the timeout to 30
seconds, and fix a few log messages.

Change-Id: I47f9ce4f645c453810fec57bef557c32a665eefb
2016-02-19 14:00:17 -08:00
Elliott Hughes bdf9d18c34 Merge "Remove dead code from debuggerd."
am: fbaefc4d9d

* commit 'fbaefc4d9d4e7e40ec0262123cd54762b81ed47a':
  Remove dead code from debuggerd.
2016-02-19 19:42:29 +00:00
Elliott Hughes fbaefc4d9d Merge "Remove dead code from debuggerd." 2016-02-19 19:36:22 +00:00
Josh Gao 022d447e9e adb: make fdevent_test, socket_test compile on Windows.
Switch pthread_* to use the adb_thread_* abstractions to allow the fdevent
and socket tests to compile on Win32.

Bug: http://b/27105824
Change-Id: I6541bb1398780b999837e701837d7f86a5eee8ca
2016-02-19 11:24:51 -08:00
Josh Gao 6487e74a59 adb: add fd exhaustion test, fix errno reporting in sysdeps_win32.
Add a test for FD exhaustion, and fix cases where we weren't properly
setting errno.

Change-Id: I486055bb9ead31089ce76b210c11de9e973f3256
2016-02-19 11:24:51 -08:00
Josh Gao b6232b96dd adb: move win32 fd base to 2048, fix fd allocation.
Windows has a maximum fd limit of 2048, so we can avoid collision with
real file descriptors by starting from there. Also, fds would be
previously be allocated by a linear walk from the last allocated FD,
instead of the lowest available FD, as required by POSIX. Keep track of
the lowest available file descriptor to make things feel more familiar.

Change-Id: Id6ac1c54f4f7964a6cdfa8d3f4f96262e4881964
2016-02-19 11:24:51 -08:00
Josh Gao 3777d2ecc0 adb: don't emulate fdevent or socketpair on Windows.
Change-Id: I16cf7d4427eb79f36db39e91f85402a268fa72f5
2016-02-19 11:24:51 -08:00
Elliott Hughes 6da1353863 Remove dead code from debuggerd.
system/core/debuggerd/debuggerd.cpp:683:5: warning: Value stored to 'logsocket' is never read
    logsocket = -1;
    ^           ~~

Bug: http://b/27264392
Change-Id: I8eab8a02b67f219c32aea49e4d4957e5642df38f
2016-02-19 10:41:17 -08:00
James Hawkins 0f5d443d0c Merge "system/core: Cleanup direct calls to opendir by containing in a std::unique_ptr."
am: bd04bb0d29

* commit 'bd04bb0d297c1a7cd5aabdc258b1829905fb067d':
  system/core: Cleanup direct calls to opendir by containing in a std::unique_ptr.
2016-02-19 17:51:44 +00:00
James Hawkins bd04bb0d29 Merge "system/core: Cleanup direct calls to opendir by containing in a std::unique_ptr." 2016-02-19 17:49:13 +00:00
Yabin Cui a90f7761bf Merge "healthd: separate libbatterymonitor for use in recovery."
am: 219806bc7a

* commit '219806bc7a2b07de4655b3421149f32e2f729e01':
  healthd: separate libbatterymonitor for use in recovery.
2016-02-19 17:38:26 +00:00
Yabin Cui 219806bc7a Merge "healthd: separate libbatterymonitor for use in recovery." 2016-02-19 17:32:00 +00:00
Yabin Cui e98e177a34 healthd: separate libbatterymonitor for use in recovery.
Bug: 26879394

Change-Id: I97b5b4994c42988ce43f5085b8b4b25e9e80c9fa
2016-02-18 22:14:25 -08:00
Colin Cross 5e7b8ba391 Merge "imprecise mark and sweep native memory leak detector"
am: 6288b28fc7

* commit '6288b28fc794f1fbb5b667b74868b06ce35cac36':
  imprecise mark and sweep native memory leak detector
2016-02-19 04:29:00 +00:00
Colin Cross 6288b28fc7 Merge "imprecise mark and sweep native memory leak detector" 2016-02-19 04:19:41 +00:00
Samuel Tan 941d48f0ee Merge "libutils: add String8 and String16 std_string utility methods"
am: fb0670d650

* commit 'fb0670d65056ea26a9c57f62c5265b3958c88eff':
  libutils: add String8 and String16 std_string utility methods
2016-02-19 03:23:34 +00:00
Samuel Tan fb0670d650 Merge "libutils: add String8 and String16 std_string utility methods" 2016-02-19 03:18:31 +00:00
Samuel Tan 450b9b7068 Merge "libutils: remove whitespace from String8 files"
am: e771e846a8

* commit 'e771e846a815b70ad4dde169c636625ed0368bfa':
  libutils: remove whitespace from String8 files
2016-02-19 02:34:41 +00:00
Samuel Tan e771e846a8 Merge "libutils: remove whitespace from String8 files" 2016-02-19 01:07:47 +00:00
Samuel Tan 9ac4e005b4 libutils: add String8 and String16 std_string utility methods
Add utility methods that convert String16 and String8 into
std::string.

Also, remove a repeated include of <utils/Unicode.h> in
String16.h, since it is not used in that header file,
and is already included in String16.cpp.

BUG: 27200800
Change-Id: I5238aeb70689499763060a99dff9950fbb7adb3e
TEST: libutils builds successfully.
2016-02-18 17:04:23 -08:00
Samuel Tan 95fd527065 libutils: remove whitespace from String8 files
Remove trailing whitespace from String8 header and
cpp files.

BUG: None
Change-Id: Ie77da3f0fbce9cdce20225ce1310cf62295179a4
2016-02-18 17:04:20 -08:00
Josh Gao 728da79e9c Merge "adb: fix clang-format for access modifier dedent."
am: d5126ddf71

* commit 'd5126ddf7119461d1dbd549f832bfb944f109225':
  adb: fix clang-format for access modifier dedent.
2016-02-18 23:08:20 +00:00
Josh Gao d5126ddf71 Merge "adb: fix clang-format for access modifier dedent." 2016-02-18 23:00:51 +00:00
James Hawkins 588a2cad7f system/core: Cleanup direct calls to opendir by containing in a
std::unique_ptr.

Bug: 26643633
Change-Id: Ia3491fdbff086558da694ae949cf08e4c89d0307
2016-02-18 14:52:46 -08:00
Josh Gao 5da522ec45 adb: fix clang-format for access modifier dedent.
It was previously -1 (the default from Google style, since it uses 2
space indentation), instead of -2.

Change-Id: I1865505ce17a2cc13b85de58bda55c3b1dfcf08c
2016-02-18 14:52:07 -08:00
Elliott Hughes 71bb9c6a99 Merge "Remove logcat\'s false dependency on a libutils header file."
am: d3289ac581

* commit 'd3289ac581816861721b81f7100794fad075c497':
  Remove logcat's false dependency on a libutils header file.
2016-02-17 22:18:41 +00:00
Elliott Hughes d3289ac581 Merge "Remove logcat's false dependency on a libutils header file." 2016-02-17 22:10:35 +00:00
Todd Poynor 6355bc8d5b Merge "healthd: Add "No UI" operation for charger mode"
am: fdd26c961d

* commit 'fdd26c961d654df7ab068591a9fce7945719c90d':
  healthd: Add "No UI" operation for charger mode
2016-02-17 21:39:40 +00:00
Todd Poynor fdd26c961d Merge "healthd: Add "No UI" operation for charger mode" 2016-02-17 21:36:36 +00:00
Todd Poynor 7c5a3e12a4 healthd: Add "No UI" operation for charger mode
Boards can opt to have charger mode be passive, with no screen UI or key
processing, the same as for recovery mode, via BOARD_CHARGER_NO_UI.  The
minui and associated libs and charging image files are not built into the
executable in this case.

Always select charger No UI operation for Brillo devices.

Bug: 27170356
Change-Id: Ibe71498743353b01ce5b6521e42ed94d75547547
2016-02-17 21:35:03 +00:00
Mark Salyzyn c10b039d28 Merge "fake_log_device: long lived allocations"
am: 3fd5649424

* commit '3fd56494242a42d5a684f64e1292d8a354dc60c6':
  fake_log_device: long lived allocations
2016-02-17 21:22:19 +00:00
Mark Salyzyn 3fd5649424 Merge "fake_log_device: long lived allocations" 2016-02-17 21:19:48 +00:00
Elliott Hughes b3639658ed Merge "Remove two bogus libutils dependencies."
am: fd9619004b

* commit 'fd9619004b8ce5be093657142aef989bee14fb82':
  Remove two bogus libutils dependencies.
2016-02-17 20:24:12 +00:00
Elliott Hughes 0a475f8dd2 Merge "Remove libbase\'s libutils dependency."
am: b3a77b1198

* commit 'b3a77b119858b9f5a1267b7c41b6646032f12db9':
  Remove libbase's libutils dependency.
2016-02-17 20:24:04 +00:00
Mark Salyzyn 0085a135b9 fake_log_device: long lived allocations
Use static space for long lived allocations as they
will appear to act like a memory leak. Resort to a
larger on-stack iovec to reduce the chances of an
allocation. Fix bug in writer where not enough size
was available for "security" buffer name. Minor
transitions to more consistent coding style.

Bug: 27107691
Change-Id: I68c918e7b916b1ae3b04829d48b3eddaa0a7e739
2016-02-17 12:22:18 -08:00
Elliott Hughes fd9619004b Merge "Remove two bogus libutils dependencies." 2016-02-17 20:01:04 +00:00
Elliott Hughes b3a77b1198 Merge "Remove libbase's libutils dependency." 2016-02-17 20:00:38 +00:00
Elliott Hughes b9e53b4d2d Remove logcat's false dependency on a libutils header file.
Change-Id: Idf499d77e88d2ee7d5b1050eaf45ba29481793a4
2016-02-17 11:58:01 -08:00