Commit Graph

18946 Commits

Author SHA1 Message Date
Mark Salyzyn 4690640760 logd: unaligned access on security buffer
Bug: 26485626
Change-Id: I990447ca59982bb2de15decda575fd0e2838b5ed
2016-01-12 10:09:31 -08:00
Elliott Hughes e4b332c7e4 Merge "libnetutils: Check socket() return value" 2016-01-12 04:46:37 +00:00
Dimitry Ivanov cd60e4bdd6 Merge "Make libwebviewchromium_plat_support.so public" 2016-01-11 17:59:30 +00:00
Jorge Lucangeli Obes 6fe9930722 Merge "adbd: Depend only on libminijail." 2016-01-08 23:59:32 +00:00
Elliott Hughes 46798ecd17 Merge "Improve dumb terminal support (emacs is dumb)." 2016-01-08 23:53:30 +00:00
Elliott Hughes d68ad69d1d Improve dumb terminal support (emacs is dumb).
Bug: http://b/26444032
Change-Id: Iaff4b09b613fd30ab7c4c73e096da34f37e0de07
2016-01-08 15:47:07 -08:00
Jorge Lucangeli Obes fd3c12d224 Merge "adbd: Remove check for set_supplementary_gids." 2016-01-08 22:49:00 +00:00
Alex Vakulenko c480b8e6dd Merge "metricsd: Split out the trait name from the command name" 2016-01-08 22:00:35 +00:00
Alex Vakulenko ba95a94e3e metricsd: Split out the trait name from the command name
weaved::Service::AddCommandHandler() and SetStateProperty() now
expect the trait name as a separate argument.

BUG: 26443877
Change-Id: I2ad587d984375a7ebd70c7dc804b446b66d6be1b
2016-01-08 13:51:15 -08:00
Alex Vakulenko b50bc6b360 Merge "metrics: Switch to use Binder interface to weaved" 2016-01-08 21:50:07 +00:00
Jorge Lucangeli Obes 218eb7c820 adbd: Depend only on libminijail.
With https://android-review.googlesource.com/#/c/195460,
adbd can depend only on libminijail, without having to include its
dependencies.

Bug: 26099611
Change-Id: I2312d8584dda88b4a4619d3100d0983fa2833ba5
2016-01-08 13:33:01 -08:00
Colin Cross 5e19382e1c Merge "debuggerd_test: provide stub selinux/android.h" 2016-01-08 20:49:47 +00:00
Colin Cross 710056efb8 Merge "libinit: depend on libselinux" 2016-01-08 20:49:42 +00:00
Bertrand Simonnet f9f4ee8b72 Merge "init: Allows shutting down cleanly." 2016-01-08 20:48:34 +00:00
Dimitry Ivanov 90bf68e8d1 Make libwebviewchromium_plat_support.so public
Add libwebviewchromium_plat_support.so to the list
of public libraries.

Bug: http://b/26461431
Change-Id: I958a1182198bf59d9b6fc818953212ce505d6bdd
2016-01-08 12:35:38 -08:00
Bertrand SIMONNET b7e03e82b8 init: Allows shutting down cleanly.
When ro.build.shutdown_timeout is set, init will send a SIGTERM signal to
all services on reboot. The normal shutdown process will continue once
all services have exited or after the shutdown timeout
(ro.build.shutdown_timeout).

If ro.build.shutdown_timeout is not set, we assume a 0s timeout.

Bug: 26216447
Test: manual: Ask to reboot. All services exit cleanly.

Change-Id: If921f6e8d87211e500ac9fa86f3e1eabe02d18cf
2016-01-08 11:12:15 -08:00
Jorge Lucangeli Obes fd79a5d9c1 adbd: Remove check for set_supplementary_gids.
With https://android-review.googlesource.com/#/c/195400, Minijail will
check for this failure so there's no need to do it here, which allows
to simplify the code.

Bug: 26099611
Change-Id: I7c876fdcab874ed403f82bdd5a4048c0f1e5db58
2016-01-08 10:56:20 -08:00
Elliott Hughes 19616ce100 Merge "init.rc: Reland "mkdir /data/misc/vold"" 2016-01-08 17:12:53 +00:00
Yu Ning c1149ff0c3 init.rc: Reland "mkdir /data/misc/vold"
Creation of /data/misc/vold was first introduced by commit 25775e8. It
then got reverted, probably inadvertently, by:

 commit 2e24bcfdce
 Author: Paul Lawrence <paullawrence@google.com>
 Date:   Fri May 22 18:31:55 2015 +0000

     Revert "Set up crypto for user directories in init."

This folder is required by vold. In its absence, if one tries to format
an SD card as internal storage, an error will occur, with the following
message printed to logcat:

 01-08 06:31:48.389  1002  1069 E vold    : Failed to persist key

Restoring /data/misc/vold fixes this bug.

This fix has been verified on the emulator, which currently does not
allow its virtual SD card to be adopted, but another CL will be uploaded
to enable that.

Change-Id: Ibb87ee821630a038a6f9b7b6a9da50fe03ca690d
Signed-off-by: Yu Ning <yu.ning@intel.com>
2016-01-08 14:51:32 +08:00
Alex Vakulenko 53ca76f2f3 metrics: Switch to use Binder interface to weaved
Now that weaved provides a binder interface for its IPC, switch
to using it instead.

BUG: 23782171
Change-Id: Ic3c485f99580fe41e287eaf238f033149787f181
2016-01-07 16:20:04 -08:00
Bertrand Simonnet a649a7df15 Merge "Fix documentation." 2016-01-07 01:22:23 +00:00
Bertrand SIMONNET 146360b4a6 Fix documentation.
This fixes the documentation for UploadService and the README file:
* stop mentioning Chrome OS as we forked the code.
* update the histogram declaration workflow. It is not tied to Chrome's
  histograms.xml file anymore.
* update the architecture explanation of metricsd. We split
  metrics_daemon into two daemons and are now using binder to log
  metrics.
* convert README to markdown to make it prettier when viewed in gitiles.

Bug: 26314417

Change-Id: I1e492f1211c1784e65dd4d3e473bb9aacefc3b5d
2016-01-06 17:19:30 -08:00
Josh Gao bf867cac7e Merge "WA: Fix adb wait-for-device command" 2016-01-07 01:19:19 +00:00
Jorge Lucangeli Obes 23c2ffb0aa Merge "Use specific users for metricsd/metrics_collector." 2016-01-06 21:33:09 +00:00
Mark Salyzyn 1a5bac2069 Merge "Revert "logd: liblog: whitelist "snet_event_log""" 2016-01-06 21:22:04 +00:00
Jorge Lucangeli Obes b8827122a8 Use specific users for metricsd/metrics_collector.
/data/misc/metricsd only needs to be accessed by metricsd.
/data/misc/metrics_collector only needs to be accessed by
metrics_collector.

/data/misc/metrics needs to be writable by metrics_collector
and readable by metricsd. Make it 0750 metrics_collector:system
and keep running metricsd as group 'system' to allow reading.

Bug: 26337609
Change-Id: I169573cc547f154daa8b65c5f13bdc20964a3f2c
2016-01-06 13:19:25 -08:00
Mark Salyzyn 0ee8de3c2d Revert "logd: liblog: whitelist "snet_event_log""
Callers will not guarantee that they can or will ratelimit, we need to
retain the ability to blacklist snet_event_log as a result.

This reverts commit 6aa21b225d.

Bug: 26178938
Change-Id: Ibf47d2e23a84c56f5f72d02312c698df7ff2b601
2016-01-06 21:19:23 +00:00
Daniel Rosenberg 6bb8f752ec Merge "fastboot: Add "--slot other"" 2016-01-06 20:50:12 +00:00
Daniel Rosenberg 275d091441 Merge "fastboot: correct set_active behavior" 2016-01-06 19:43:06 +00:00
Daniel Rosenberg c1743ba0d4 fastboot: Add "--slot other"
This allows you to flash to a slot other than the current one
without needing to enter the name of the slots.

Change-Id: I6bf8c29817be0a29b1abb005f1e72056cee126df
2016-01-06 19:42:01 +00:00
Daniel Rosenberg 15174d9bc7 fastboot: correct set_active behavior
Removed automatic reboot attached to set_active,
and fixed documentation error.

Change-Id: Idbb1639dc80870c17a6622dc78a7d78c88e268ab
2016-01-05 19:35:54 -08:00
Todd Poynor 89faffc066 Merge "metrics_collector: Fix build of tests" 2016-01-06 01:32:06 +00:00
Todd Poynor 4b50bf3a9a metrics_collector: Fix build of tests
IMetricsCollectorService implementation moved from libmetricscollectorservice
to metrics_collector executable, which means it needs to be compiled into test
main as well.

Bug: None
Change-Id: I29b0a3ae6164d2256366d61c3a3639d22b943a69
2016-01-05 17:27:36 -08:00
Dan Willemsen 392867cff1 Merge "Turn off -Wdate-time for crasher" 2016-01-06 00:23:37 +00:00
Todd Poynor b256a47064 Merge "Remove metrics collector service trampoline" 2016-01-06 00:01:50 +00:00
Josh Gao b8e9ebf8b4 Merge "debuggerd: fork and drop privileges when dumping." 2016-01-06 00:01:09 +00:00
Josh Gao e7a9e52740 debuggerd: fork and drop privileges when dumping.
Bug: http://b/25195825
Change-Id: I913d8425232e79df3f7a051a8cc63de9c60f4780
2016-01-05 15:59:01 -08:00
Todd Poynor b77ae4506f Remove metrics collector service trampoline
No longer needed to trampoline between RTTI and non-RTTI compiles.

Move the service impl from libmetricscollector service to the
metrics_collector executable, now that RTTI is no longer used (and the impl
is not used by binder clients).

Other fixups, including:
* Move service registration and binder watcher to metrics_collector main.
* Compile libmetricscollectorservice with clang just because.

Bug: 26292405
Change-Id: Iae8115c13b203ff03d49bf7678d5eb3ede30e855
2016-01-05 15:48:04 -08:00
Jorge Lucangeli Obes 8688dba547 Merge "android_filesystem_config.h: Add Brillo users." 2016-01-05 22:59:18 +00:00
Jorge Lucangeli Obes 4ae18025f7 android_filesystem_config.h: Add Brillo users.
-metrics_collector and metricsd gather and upload device metrics.
-webservd is part of the Weave (Brillo remote setup and management) stack.

Bug: 26337609
Change-Id: Icf6ce75e64293adbe773f2ee65e80629f2eeb737
2016-01-05 14:43:40 -08:00
Dan Willemsen 0491eb2632 Merge "liblog: Update Android.bp to match Android.mk" 2016-01-05 21:45:56 +00:00
Dan Willemsen d68c35a9ce liblog: Update Android.bp to match Android.mk
Change-Id: Ic887493c03d133a566a96c1c5b65dcd67e5d7131
2016-01-05 13:09:35 -08:00
Mark Salyzyn 796d3ec8f4 Merge "logd: document ro.logd.size" 2016-01-05 17:27:28 +00:00
Mark Salyzyn 66607ebc0e logd: document ro.logd.size
Bad comment advise in LogBuffer.cpp results in partners failing to
considering using ro.logd.size to set the platform buffer size
default.

NB: It is not good practice to increase the log buffer size to deal
with logspam, as increases will result in logd scale issues getting
closer to hitting the background cgroup cpu cap. Once we hit that
cap, logd spirals, pruning old entries slower than the incoming log
entries. logd.writer will take 100% cpu.

Change-Id: If4a7a74f300d078eeaed0ffd3eb3fd77d1f9fe90
2016-01-05 09:09:18 -08:00
Leo Sartre 94e0776eb8 WA: Fix adb wait-for-device command
Without -s argument, adb wait-for-device will make a call to
acquire_one_transport() with sinfo->serial.c_str() == "".
Waiting for acquire_one_transport() to be reworked to use std::string
rather than const char * for serial, work around this by passing NULL
when sinfo->serial is not initialized in host_service_to_socket().

Change-Id: Ifef53e0e82850364f5029ee36560376f2a4a5104
Signed-off-by: Leo Sartre <leox.sartre@intel.com>
2016-01-05 12:13:24 +01:00
Alex Vakulenko 946d8152b2 Merge "libbinderwrapper: Add BinderWrapper::GetOrCreateInstance()" 2016-01-04 21:02:21 +00:00
Alex Vakulenko 08c9891c9c libbinderwrapper: Add BinderWrapper::GetOrCreateInstance()
In libraries relying on binder it is useful to be able to obtain an
existing copy of BinderWrapper or create one if it doesn't exist.

This allows to abstract the actual RPC (binder) from clients who have
no other dependencies on this RPC.

BUG: 23782171
Change-Id: Ie775d3d8ab83d75e38abc7e1385eb39a363555ef
2016-01-04 12:56:27 -08:00
Alex Vakulenko 5b7563a085 Merge "Disable RTTI in crash_reporter and metricsd" 2016-01-04 20:02:13 +00:00
Alex Vakulenko 2096029743 Disable RTTI in crash_reporter and metricsd
There is no longer a reliance on RTTI in libbrillo, so disable RTTI
in the rest of Brillo codebase.

Bug: 26292405
Change-Id: I2751a2ac973a74741a82f5cd949fc0adaf2449a6
2016-01-04 11:12:48 -08:00
Dimitry Ivanov 100001a537 Merge "Revert "Temporary disable linker-namespaces"" 2016-01-04 17:15:44 +00:00