Commit Graph

18923 Commits

Author SHA1 Message Date
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
Dimitry Ivanov 619ffb4f5b Revert "Temporary disable linker-namespaces"
This reverts commit c18ac7cd2b.
2015-12-31 14:11:34 -08:00
Mark Salyzyn 727aeb6686 Merge "logd: build breakage aosp-brillo-master @ 2508494" 2015-12-30 21:46:54 +00:00
Mark Salyzyn ff8b8e838b logd: build breakage aosp-brillo-master @ 2508494
Change-Id: I38e506bc997c6e9759a064b517f9372a27d0e510
2015-12-30 13:46:07 -08:00
Mark Salyzyn 554630f94e Merge "logd: isMonotonic improvements" 2015-12-30 21:31:58 +00:00
Mark Salyzyn 2ed826a69f Merge changes Ibdc76bc0,I98738c66
* changes:
  logd: liblog: whitelist "snet_event_log"
  liblog: add __android_log_is_loggable checking to writer
2015-12-30 18:20:07 +00:00
Mark Salyzyn 6aa21b225d logd: liblog: whitelist "snet_event_log"
Dangerous bridge to cross to whitelist, who is special, who is not?
Rationalized as these events are used to catch exploits on platform.
As it stands no one should be allowed to block any messages in the
security context, not even for development purposes.

Bug: 26178938
Change-Id: Ibdc76bc0fe29ba05be168b623af1c9f41d7edbd2
2015-12-30 10:07:19 -08:00
Mark Salyzyn a014004752 liblog: add __android_log_is_loggable checking to writer
Add __android_log_is_loggable() checking for all buffers except
LOG_ID_SECURITY. Return -EPERM if blocked. Since we are sniffing
the log tag, check validity and return -EINVAL.

NB: Try not to call __android_log_is_loggable() in native code within
a signal handler. Both here, and in the system properties, there
are locking paths that are not guaranteed to play well in that
environment. This has also been the case for the log writer path
even before this change. All attempts have been made to use trylock,
and to use a more expensive code path when contention occurs rather
than lead to deadlock.

Bug: 19544788
Bug: 26178938
Change-Id: I98738c662f6328189a6703251eb8721a05e956f9
2015-12-30 10:03:37 -08:00
Mark Salyzyn 10b82b6834 logd: isMonotonic improvements
Use 1972 as a right delineation. Otherwise use half way point
between the monotonic and realtime. Treat correction factor as
unsigned, ensure that any wrapping to a negative value is
dropped or set to EPOCH. Acknowledge that we can get a more
accurate time track by acquiring the time rather than relying on
healthd timestamp.

Bug: 26331432
Change-Id: I09075fca58676a30cf7d87baf2d4b0f53795abaa
2015-12-29 11:34:29 -08:00
Mark Salyzyn b5e821316d Merge "logd: Add worst pid of system filter" 2015-12-29 17:37:55 +00:00
Mark Salyzyn bec3c3def9 logd: Add worst pid of system filter
- Add a new statistic that reports per pid and log_id for AID_SYSTEM
- Add a new pruning filter ~1000/! boolean
- Use this new statistic to prune on worst pid within AID_SYSTEM

Bug: 26029733
Bug: 21615139
Bug: 22855208
Change-Id: Iab5dd28f807dcf03d276372853883f3b6afa8294
2015-12-29 09:32:35 -08:00
Mark Salyzyn 420b64160c Merge "logpersist: missing X" 2015-12-29 15:33:52 +00:00
Mark Salyzyn 3bab2a9096 logpersist: missing X
Signed-off-by: LawrenceSY_Kuo@asus.com
Bug: 19608716
Change-Id: I90e0313262a02906dec71417b995fc725f78a292
2015-12-29 07:31:37 -08:00
Pavlin Radoslavov 0f0498ad50 Merge "Use GID "wakelock" to control access to kernel wakelock" 2015-12-29 01:24:15 +00:00
Pavlin Radoslavov 17d80c84e1 Use GID "wakelock" to control access to kernel wakelock
* Added new kernel GID named "wakelock" (AID_WAKELOCK = 3010)
* Changed the group access for /sys/power/wake_lock and
  /sys/power/wake_unlock from "system" to "wakelock"
* Added "wakelock" to the list of groups for the healthd process/service

Bug: 25864142
Change-Id: Ieabee9964cccec3107971a361a43aa9805164aa9
2015-12-28 14:57:28 -08:00
Dan Willemsen 3fb7d97689 Merge "Limit adb_test to first multilib" 2015-12-22 22:05:31 +00:00
Bertrand Simonnet c947a13772 Merge "metricsd: Replace scoped_ptr with unique_ptr." 2015-12-22 19:11:19 +00:00
Mark Salyzyn f58fb531ff Merge "liblog: build break" 2015-12-22 18:53:16 +00:00
Mark Salyzyn 31ca3c3770 liblog: build break
Some compilers erroneously see uninitialized use, even despite all
accesses being behind !not_locked. Confirmed initialization does not
affect expected performance.

Bug: 26178938
Bug: 26029733
Bug: 17760225
Change-Id: Ib36ed8dd2c4b196ca84ef79a9531625dcee77e15
2015-12-22 10:49:35 -08:00
Mark Salyzyn 6cc75a68bd Merge "logd: Allow flags "eng" and "svelte" in boolean" 2015-12-22 18:12:57 +00:00
Mark Salyzyn 2427d34152 Merge "liblog: is loggable is flaky" 2015-12-22 18:12:15 +00:00