Commit graph

21429 commits

Author SHA1 Message Date
James Hawkins
c0188da289 bootstat: Record the time since factory reset on init.
Bug: 25448351
Change-Id: I71905a598e74f41c18a96d469c7a6ddd5a2e07fb
(cherry picked from commit 53684ea625)
2016-02-24 13:19:46 -08:00
Josh Gao
280cc0a639 Don\'t create tombstone directory. am: cb9625cbe5 am: 99b8a56616 am: 0cf99e2b61 am: 338f1802ee am: 3ee4a0be2a am: 7f0d750b2d am: 41f72f0537
am: f740908c5b  -s ours

* commit 'f740908c5b5f39b47b9ddbe1e54ce27204e1c1aa':
  Don't create tombstone directory.
2016-02-24 20:19:01 +00:00
Nick Kralevich
24f4d6495e ensure /data/tombstones exists on all Android devices am: e2796207ee am: 9660c6759e am: 4d4eb0db97 am: 6d7ce7b14c am: 077a9ffe40 am: bf8ace32ef am: a03485daa5
am: 9b26997a1f

* commit '9b26997a1fb3fa05886fbe3b66eff656b7c1bc66':
  ensure /data/tombstones exists on all Android devices
2016-02-24 20:01:22 +00:00
Josh Gao
f740908c5b Don\'t create tombstone directory. am: cb9625cbe5 am: 99b8a56616 am: 0cf99e2b61 am: 338f1802ee am: 3ee4a0be2a am: 7f0d750b2d
am: 41f72f0537

* commit '41f72f05370fd7fa651131daec5ecd4e89afc9f5':
  Don't create tombstone directory.
2016-02-24 19:56:08 +00:00
Nick Kralevich
9b26997a1f ensure /data/tombstones exists on all Android devices am: e2796207ee am: 9660c6759e am: 4d4eb0db97 am: 6d7ce7b14c am: 077a9ffe40 am: bf8ace32ef
am: a03485daa5

* commit 'a03485daa5491b4315d01d0ef881c4876882db54':
  ensure /data/tombstones exists on all Android devices
2016-02-24 19:56:00 +00:00
Josh Gao
41f72f0537 Don\'t create tombstone directory. am: cb9625cbe5 am: 99b8a56616 am: 0cf99e2b61 am: 338f1802ee am: 3ee4a0be2a
am: 7f0d750b2d

* commit '7f0d750b2d8907816b3d9b171f2eebda38be6e03':
  Don't create tombstone directory.
2016-02-24 19:49:23 +00:00
Nick Kralevich
a03485daa5 ensure /data/tombstones exists on all Android devices am: e2796207ee am: 9660c6759e am: 4d4eb0db97 am: 6d7ce7b14c am: 077a9ffe40
am: bf8ace32ef

* commit 'bf8ace32efb4903642b0e372a5fe939685686467':
  ensure /data/tombstones exists on all Android devices
2016-02-24 19:49:12 +00:00
Josh Gao
7f0d750b2d Don\'t create tombstone directory. am: cb9625cbe5 am: 99b8a56616 am: 0cf99e2b61 am: 338f1802ee
am: 3ee4a0be2a

* commit '3ee4a0be2ae8b21a2235278c88d40b4feb3ddd08':
  Don't create tombstone directory.
2016-02-24 19:37:01 +00:00
Nick Kralevich
bf8ace32ef ensure /data/tombstones exists on all Android devices am: e2796207ee am: 9660c6759e am: 4d4eb0db97 am: 6d7ce7b14c
am: 077a9ffe40

* commit '077a9ffe402c0776328bd5a4e85230bba458dc47':
  ensure /data/tombstones exists on all Android devices
2016-02-24 19:36:45 +00:00
Josh Gao
3ee4a0be2a Don\'t create tombstone directory. am: cb9625cbe5 am: 99b8a56616 am: 0cf99e2b61
am: 338f1802ee

* commit '338f1802ee7d87bb4ea2f3fe9ef1c72e1784188b':
  Don't create tombstone directory.
2016-02-24 19:31:16 +00:00
Nick Kralevich
077a9ffe40 ensure /data/tombstones exists on all Android devices am: e2796207ee am: 9660c6759e am: 4d4eb0db97
am: 6d7ce7b14c

* commit '6d7ce7b14c906eff4488bddb0338a38f57eac1de':
  ensure /data/tombstones exists on all Android devices
2016-02-24 19:31:04 +00:00
Josh Gao
338f1802ee Don\'t create tombstone directory. am: cb9625cbe5 am: 99b8a56616
am: 0cf99e2b61

* commit '0cf99e2b618ac5c8a495f607b1978fcd9e3ee827':
  Don't create tombstone directory.
2016-02-24 19:25:50 +00:00
Nick Kralevich
6d7ce7b14c ensure /data/tombstones exists on all Android devices am: e2796207ee am: 9660c6759e
am: 4d4eb0db97

* commit '4d4eb0db978bca41727ed21406da42332367de7d':
  ensure /data/tombstones exists on all Android devices
2016-02-24 19:25:38 +00:00
Josh Gao
0cf99e2b61 Don\'t create tombstone directory. am: cb9625cbe5
am: 99b8a56616

* commit '99b8a5661614c3b973ab421ecff4ae40249c1579':
  Don't create tombstone directory.
2016-02-24 19:11:53 +00:00
Nick Kralevich
4d4eb0db97 ensure /data/tombstones exists on all Android devices am: e2796207ee
am: 9660c6759e

* commit '9660c6759e165ddbc91f823672ba9631199ae9dc':
  ensure /data/tombstones exists on all Android devices
2016-02-24 19:11:42 +00:00
Josh Gao
99b8a56616 Don\'t create tombstone directory.
am: cb9625cbe5

* commit 'cb9625cbe54f009c216a1f50fcaee15ee3478357':
  Don't create tombstone directory.
2016-02-24 19:05:34 +00:00
Nick Kralevich
9660c6759e ensure /data/tombstones exists on all Android devices
am: e2796207ee

* commit 'e2796207ee5a1ff2ebea30bdcf6d2c2553546b86':
  ensure /data/tombstones exists on all Android devices
2016-02-24 19:05:12 +00:00
Glenn Kasten
6bceddcaee Merge "Restore audio tee sink" into nyc-dev 2016-02-24 16:40:23 +00:00
William Luh
5cb3200b5c Add macro to call event logger for errors. DO NOT MERGE am: 769cba57e4 -s ours am: 43c0f28c11 am: ec0d1037ab am: 785f82c09d
am: 041cb4aa55  -s ours

* commit '041cb4aa55a3a1dee488dfa954772d67103a5566':
  Add macro to call event logger for errors. DO NOT MERGE
2016-02-24 04:29:31 +00:00
William Luh
041cb4aa55 Add macro to call event logger for errors. DO NOT MERGE am: 769cba57e4 -s ours am: 43c0f28c11 am: ec0d1037ab
am: 785f82c09d

* commit '785f82c09d113126e6575d257df2bbf8b0823afe':
  Add macro to call event logger for errors. DO NOT MERGE
2016-02-24 03:01:13 +00:00
William Luh
785f82c09d Add macro to call event logger for errors. DO NOT MERGE am: 769cba57e4 -s ours am: 43c0f28c11
am: ec0d1037ab

* commit 'ec0d1037ab53465734934f2c91a5e0c015881633':
  Add macro to call event logger for errors. DO NOT MERGE
2016-02-24 02:54:36 +00:00
William Luh
ec0d1037ab Add macro to call event logger for errors. DO NOT MERGE am: 769cba57e4 -s ours
am: 43c0f28c11

* commit '43c0f28c1135bd1f1640441e3fa259be04aa04b0':
  Add macro to call event logger for errors. DO NOT MERGE
2016-02-24 02:46:27 +00:00
William Luh
43c0f28c11 Add macro to call event logger for errors. DO NOT MERGE
am: 769cba57e4  -s ours

* commit '769cba57e446be099c792516486a304a18ee2952':
  Add macro to call event logger for errors. DO NOT MERGE
2016-02-24 02:39:45 +00:00
Josh Gao
7b84c9bf93 Merge changes from topic 'adb_cherrypick' into nyc-dev
* changes:
  adb: sysdeps_test: improve smoke test.
  adb: check for an error response from adbd between each write.
  adbd: restore the old error handling behavior.
  adb: change unsigned to uint32_t in sync struct definitions.
  adb: detect when the client disconnects in wait-for-device.
  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.
  adb: fix clang-format for access modifier dedent.
  Add missing liblog dependency
  adb: sysdeps_win32: actually change ExitThread to _endthreadex.
  adb: make adb_thread_func_t return void, add adb_thread_exit.
  adb: redact reference to secret internal time machine.
  adb: mkdirs fixes
  adb: sysdeps: add support for joining threads.
  adb: allow wine's output for sysdeps_win32 strerror test.
  adb: setsid() for adb host server.
  adb: make ctrl-c when spawning a daemon not kill the daemon.
  adb: fix mkdirs test.
2016-02-24 00:50:36 +00:00
Jesse Hall
2f9cd05c47 Merge "native_loader: add libvulkan.so to public native library list" into nyc-dev 2016-02-24 00:50:10 +00:00
Jesse Hall
dee3d96c01 native_loader: add libvulkan.so to public native library list
Change-Id: I2228af5ec4b815631a9c5ca745718807d58028a3
2016-02-23 16:16:47 -08:00
William Luh
769cba57e4 Add macro to call event logger for errors. DO NOT MERGE
Bug:23180694
Change-Id: I566a290334345f48013029534efef3e08e726e40
2016-02-23 16:04:34 -08:00
Glenn Kasten
845a4ffef8 Restore audio tee sink
Bug: 27323882
Change-Id: I1131c0537942c8f7cbf9ff6cc6847ab7e93e6187
2016-02-23 15:23:46 -08:00
Mohamad Ayyash
5dac46ac94 Merge "Revert "Revert "Update make_ext4fs_internal param-list to match new implementation""" into nyc-dev 2016-02-23 22:54:27 +00:00
Yabin Cui
959dea3585 Merge "healthd: support reading charge status from BatteryMonitor." into nyc-dev 2016-02-23 22:42:58 +00:00
Dimitry Ivanov
f44ecde588 nativeloader: Export FindNamespaceByClassLoader
Bug: http://b/27189432
Change-Id: Ib80dcce949276ee620f601c47b20f783708e8e85
(cherry picked from commit 0cd10d83e4)
2016-02-23 11:50:44 -08:00
Dimitry Ivanov
c914ebd484 nativeloader: refactor FindNamespaceByClassLoader method
FindNamespaceByClassLoader returns android_namespace_t* to make
it suitable for exporting this functionality.

Bug: http://b/27189432
Change-Id: Ifef3de753192178e0184fb114596fe956fde2826
(cherry picked from commit 34fa704df4)
2016-02-23 11:50:28 -08:00
Dimitry Ivanov
32912090e6 Merge "Move libnativeloader headers into libnativeloader." into nyc-dev 2016-02-23 19:45:22 +00:00
Yabin Cui
b0580d710f healthd: support reading charge status from BatteryMonitor.
recovery needs to know whether the battery is charged.

Bug: 26879394
Change-Id: Ie2a1d06e81878efa3ff432c2015d409a625e473e
(cherry picked from commit aedf6038dc)
2016-02-23 11:01:21 -08:00
Yabin Cui
126f4d65ca Merge "healthd: separate libbatterymonitor for use in recovery." into nyc-dev 2016-02-23 18:55:54 +00:00
James Hawkins
85def183bd Merge "bootstat: Record metrics for factory_reset and time_since_factory_reset." into nyc-dev 2016-02-23 18:52:55 +00:00
Yabin Cui
f6dbc6d4b8 healthd: separate libbatterymonitor for use in recovery.
Bug: 26879394

Change-Id: I97b5b4994c42988ce43f5085b8b4b25e9e80c9fa
(cherry picked from commit e98e177a34)
2016-02-23 10:52:43 -08:00
Yabin Cui
ac3387b71b healthd: init members of BatteryMonitor.
Bug: 26879394
Change-Id: I09a6c78137f91a0c88bf4ba1e8890b4ec31dcf2c
(cherry picked from commit db04a49a6f)
2016-02-23 10:46:38 -08:00
Mark Salyzyn
9dd6510dd0 liblog: event log list logging handler
(cherry pick from commit bd1ad049b2)

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-23 07:45:49 -08:00
Josh Gao
fa3e0bc67f 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
(cherry picked from commit 2275f7da73)
2016-02-22 15:57:09 -08:00
Josh Gao
da8119596f 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
(cherry picked from commit afcdcd703e)
2016-02-22 15:57:09 -08:00
Josh Gao
4d74811cd4 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
(cherry picked from commit 20a96c7d79)
2016-02-22 15:57:09 -08:00
Josh Gao
8d68591c46 adb: change unsigned to uint32_t in sync struct definitions.
Change-Id: I9757ab853cfad1a2e1393ef32bcab222ab84acef
(cherry picked from commit 69469c4e9f)
2016-02-22 15:57:09 -08:00
Josh Gao
cd2039e484 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
(cherry picked from commit 09855472f4)
2016-02-22 15:57:08 -08:00
Josh Gao
b582fa3bd8 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
(cherry picked from commit 022d447e9e)
2016-02-22 15:57:08 -08:00
Josh Gao
c1d252bec2 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
(cherry picked from commit 6487e74a59)
2016-02-22 15:57:08 -08:00
Josh Gao
8443fd994a 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
(cherry picked from commit b6232b96dd)
2016-02-22 15:57:08 -08:00
Josh Gao
addab3d84d adb: don't emulate fdevent or socketpair on Windows.
Change-Id: I16cf7d4427eb79f36db39e91f85402a268fa72f5
(cherry picked from commit 3777d2ecc0)
2016-02-22 15:57:08 -08:00
Josh Gao
0b57ef735a 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
(cherry picked from commit 5da522ec45)
2016-02-22 15:57:08 -08:00
Dimitry Ivanov
8b642e42b4 Add missing liblog dependency
Bug: http://b/27171986
Change-Id: Ia7f03c72de9a8e5d61896bde6b4b1af396376f54
(cherry picked from commit 01f21da732)
2016-02-22 15:57:08 -08:00