Commit Graph

19723 Commits

Author SHA1 Message Date
Ruchi Kandoi 78ed1935e1 Merge "healthd: Remove warning by clang compiler."
am: 08c8b53800

* commit '08c8b53800fbfec28a8ea94f4443e9a3812b1ab3':
  healthd: Remove warning by clang compiler.
2016-02-23 17:36:48 +00:00
Ruchi Kandoi 08c8b53800 Merge "healthd: Remove warning by clang compiler." 2016-02-23 17:34:33 +00:00
Mark Salyzyn 919ffb52b9 Merge "liblog: event log list logging handler"
am: cec3964f65

* commit 'cec3964f6576a779eaec599480d776af948a06dc':
  liblog: event log list logging handler
2016-02-23 15:48:52 +00:00
Mark Salyzyn cec3964f65 Merge "liblog: event log list logging handler" 2016-02-23 15:43:34 +00:00
Dimitry Ivanov 3ef0a43d65 Merge changes Ib80dcce9,Ifef3de75
am: 51c38147f8

* commit '51c38147f85598132068b7b29353b7d24212c7e9':
  nativeloader: Export FindNamespaceByClassLoader
  nativeloader: refactor FindNamespaceByClassLoader method
2016-02-23 05:39:51 +00:00
Dimitry Ivanov 51c38147f8 Merge changes Ib80dcce9,Ifef3de75
* changes:
  nativeloader: Export FindNamespaceByClassLoader
  nativeloader: refactor FindNamespaceByClassLoader method
2016-02-23 05:33:22 +00:00
Mark Salyzyn bd1ad049b2 liblog: event log list logging handler
Based off an initial request and effort by williamluh@google.com

- Added the following functions:

* Composing and Writing:

android_log_context create_android_logger(uint32_t tag)

int android_log_write_list_begin(android_log_context ctx)
int android_log_write_list_end(android_log_context ctx)

int android_log_write_int32(android_log_context ctx, int32_t value)
int android_log_write_int64(android_log_context ctx, int64_t value)
int android_log_write_string8(android_log_context ctx, const char *value)
int android_log_write_float32(android_log_context ctx, float value)

int android_log_write_list(android_log_context ctx, log_id_t id)

* Reading and Interpreting:

android_log_context create_android_log_parser(const char *msg, size_t len)

android_log_list_element android_log_read_next(android_log_context ctx)
android_log_list_element android_log_peek_next(android_log_context ctx)

* Destroy context used above:

int android_log_destroy(android_log_context *ctx);

- Added unit gTests

We moved implemented android_log_buffer_to_string() to the test since
it is an alternate for already existing logprint functionality.
Please move into liblog should it be of some common use, otherwise
as is it is a good means of stessing the reading and interpreting
handlers.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 19235719
Change-Id: I4aa1927e8e6a75f0a129d15a27c891cf1ccd4f5c
2016-02-22 16:04:41 -08:00
Mark Salyzyn cc2bff64fe Merge "liblog: deal with warning messages"
am: 806bb17e76

* commit '806bb17e76d015f6192c50f20a0101573214948a':
  liblog: deal with warning messages
2016-02-22 23:48:45 +00:00
Mark Salyzyn 806bb17e76 Merge "liblog: deal with warning messages" 2016-02-22 23:43:01 +00:00
Ruchi Kandoi e9320b7c92 healthd: Remove warning by clang compiler.
Bug: 27265206
Change-Id: I8f2ec1391952de4a9cdefce0433535608a1e9b59
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-02-22 13:59:31 -08:00
Dimitry Ivanov 0cd10d83e4 nativeloader: Export FindNamespaceByClassLoader
Bug: http://b/27189432
Change-Id: Ib80dcce949276ee620f601c47b20f783708e8e85
2016-02-22 13:48:22 -08:00
Dimitry Ivanov 34fa704df4 nativeloader: refactor FindNamespaceByClassLoader method
FindNamespaceByClassLoader returns android_namespace_t* to make
it suitable for exporting this functionality.

Bug: http://b/27189432
Change-Id: Ifef3de753192178e0184fb114596fe956fde2826
2016-02-22 13:15:28 -08:00
Yabin Cui 0007c4efbe Merge "healthd: support reading charge status from BatteryMonitor."
am: d633106d3e

* commit 'd633106d3e43a77bb509ce1cf259b14f78f246ae':
  healthd: support reading charge status from BatteryMonitor.
2016-02-22 18:41:38 +00:00
Yabin Cui d633106d3e Merge "healthd: support reading charge status from BatteryMonitor." 2016-02-22 18:34:15 +00:00
Josh Gao 2975a58f3c Merge "adb: sysdeps_test: improve smoke test."
am: 0fc006685c

* commit '0fc006685c20134b754cd96f7589ea6f93d93cd2':
  adb: sysdeps_test: improve smoke test.
2016-02-20 02:41:37 +00:00
Josh Gao 0fc006685c Merge "adb: sysdeps_test: improve smoke test." 2016-02-20 02:39:51 +00:00
Josh Gao 2275f7da73 adb: sysdeps_test: improve smoke test.
Make sure that adb_poll sets revents for all of the structs passed in.
Also, zero initialize all of the adb_pollfd structs in the tests.

Change-Id: Ia639679a7e6f77483655f1552e89081c4673aa87
2016-02-19 18:36:09 -08:00
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
Yabin Cui aedf6038dc healthd: support reading charge status from BatteryMonitor.
recovery needs to know whether the battery is charged.

Bug: 26879394
Change-Id: Ie2a1d06e81878efa3ff432c2015d409a625e473e
2016-02-19 18:03:23 -08: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
Mark Salyzyn b525884edb liblog: deal with warning messages
- Fix bug in fake_log_devices when it can not allocate memory
  failing to use the full on-stack buffer as backup.
- remove superfluous code.

Bug: 27265662
Change-Id: I97b6cca5f4ce8ecad9beb3a08353de596d6a4ad1
2016-02-19 14:40:16 -08: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