metricsd should shutdown cleanly when receiving a TERM signal:
* stop the binder watcher.
* wait for the thread to quit.
* Exit cleanly.
Note: This is not directly used as we don't send SIGTERM on shutdown or
when stopping services yet.
Bug: 25670584
Change-Id: I878d1e67474c72d24790f3540470e37a23112a95
Currently one of the udev collector tests is failing due to the lack
of gzip on the device. Since we don't have gzip nor udev in Android builds,
remove the udev collector (and tests) from Android builds.
See http://r.android.com/184708 for discussion on removing the udev
collector completely from the source.
Bug: 25779348
Test: `/data/nativetest/crash_reporter_tests/crash_reporter_tests` passes
Change-Id: I883359ac8219f2e1fa6a78927433dbc0be295fe7
Without this change LogBuffer::prune and LogBuffer::erase
contributes 16.7% and 1.79% respectively. With this change,
they contributes 3.06 and 2.33% respectively. Pruning is
performed roughly 1 in every 255 log entries, a periodic
tamer latency spike.
Bug: 23685592
Change-Id: I6ae1cf9f3559bca4cf448efe8bcb2b96a1914c54
Currently, properties that begin with "ro." are special cased to skip
over the "ro." part of the prefix before matching with entries in
property_contexts. This is not strictly needed however and it is
causing complications with the separated prop files work from Bug
21852512, so it is now removed.
Bug 26425619
Change-Id: I3cd14fa2176f96b3931e5f6a50c4a7bcd3af3da6
weaved::Service::AddCommandHandler() and SetStateProperty() now
expect the trait name as a separate argument.
BUG: 26443877
Change-Id: I2ad587d984375a7ebd70c7dc804b446b66d6be1b
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
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
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
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>
Now that weaved provides a binder interface for its IPC, switch
to using it instead.
BUG: 23782171
Change-Id: Ic3c485f99580fe41e287eaf238f033149787f181
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
/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
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
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
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
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
-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