Commit Graph

16622 Commits

Author SHA1 Message Date
Elliott Hughes e329a3ec1b Merge "Remove watchprops." 2015-08-11 02:51:58 +00:00
Elliott Hughes e8606c85c5 Remove watchprops.
Since watchprops would have to be rewritten anyway in the upcoming properties
rewrite, there seems little point in rewriting it for toybox first. Let's
see how many people actually use watchprops and decide whether it's worth
the effort...

Change-Id: I996e7209bc81633ee66602f09f130226336d9987
2015-08-10 19:27:18 -07:00
Elliott Hughes 6396f64fd7 am 61ff977b: am 1f36ae49: Merge "adb: win32: write ACK to separate pipe instead of stdout"
* commit '61ff977ba49f43d87fed86eb5b2e2bfc279f902b':
  adb: win32: write ACK to separate pipe instead of stdout
2015-08-11 01:50:26 +00:00
Elliott Hughes 61ff977ba4 am 1f36ae49: Merge "adb: win32: write ACK to separate pipe instead of stdout"
* commit '1f36ae49b97d4b72fa9aca9bb6b4131acec5bccf':
  adb: win32: write ACK to separate pipe instead of stdout
2015-08-11 01:44:47 +00:00
Elliott Hughes 1f36ae49b9 Merge "adb: win32: write ACK to separate pipe instead of stdout" 2015-08-11 01:38:55 +00:00
Elliott Hughes d0f0f88e3b am b6798ebb: am 5a1f9a3e: Merge "Remove the USB vendor id whitelist from fastboot."
* commit 'b6798ebbff08e2d2d0c1cc98a74b13976b4cdadc':
  Remove the USB vendor id whitelist from fastboot.
2015-08-11 00:44:01 +00:00
Elliott Hughes b6798ebbff am 5a1f9a3e: Merge "Remove the USB vendor id whitelist from fastboot."
* commit '5a1f9a3ef033e85c35ba8e6df9810f95f287aa5f':
  Remove the USB vendor id whitelist from fastboot.
2015-08-11 00:34:48 +00:00
Elliott Hughes 5a1f9a3ef0 Merge "Remove the USB vendor id whitelist from fastboot." 2015-08-11 00:28:21 +00:00
Bertrand SIMONNET 8715c9396a metricsd: Remove unused Chrome OS specific files.
Change-Id: Iff19b6c83731c4eedebe20d307c079afb1e21491
2015-08-10 15:57:47 -07:00
Bertrand SIMONNET 52e5b99983 metricsd: Relicense as Apache 2.
MODULE_LICENSE_BSD and NOTICE were removed as the license is no longer
different from the rest of system/core.

BUG: 23086670
Change-Id: I1e83ef2ecb9c721150f8aab283c9ff960337da8c
2015-08-10 15:57:47 -07:00
Bertrand SIMONNET ed6ca6f8c6 metricsd: Add Android.mk.
This builds:
* metrics_client: command line interface to log metrics.
* libmetrics: shared library used by services to log metrics.
* metrics_daemon: background daemon responsible for aggregating the
  metrics log and upload it periodically.

BUG: 22879597

Change-Id: I79adc4953d5bfd541df955fbc77d3549f5bbd26b
2015-08-10 15:57:39 -07:00
Gaurav Shah 532df43310 am bd1b5f34: am cd285d7d: Merge "crash_reporter: Fix initial compile issues with Android toolchain"
* commit 'bd1b5f34def4d7f6066a6803503f1260db659c97':
  crash_reporter: Fix initial compile issues with Android toolchain
2015-08-10 22:54:28 +00:00
Gaurav Shah 9ca8f2fdf1 am 22f14b0f: am b889d7e4: Merge "crash_reporter: Remove Chrome collector, CrOS build files, DBus"
* commit '22f14b0fe420e4d77b66f207da0ff2068c863658':
  crash_reporter: Remove Chrome collector, CrOS build files, DBus
2015-08-10 22:54:27 +00:00
Gaurav Shah 118cd2d95b am 795ad6c7: am f06041d7: Merge "metricsd: Rename metrics to metricsd."
* commit '795ad6c74488f8f9f202010be4a0b3df30d2d0de':
  metricsd: Rename metrics to metricsd.
2015-08-10 22:54:25 +00:00
Gaurav Shah 8c8c6d653a am 0e8acc3c: am 011b2bc3: Merge "metrics: Add a CLI flag to disable dbus."
* commit '0e8acc3c1646fe49f594f211a3fba45a917c0633':
  metrics: Add a CLI flag to disable dbus.
2015-08-10 22:54:24 +00:00
Gaurav Shah 594e128fd2 am fb44650a: am dc15f4cd: Merge "metrics: Enable for non-official builds."
* commit 'fb44650a03df364f8f46a9fe1c96b6a2321c2044':
  metrics: Enable for non-official builds.
2015-08-10 22:54:22 +00:00
Gaurav Shah bd1b5f34de am cd285d7d: Merge "crash_reporter: Fix initial compile issues with Android toolchain"
* commit 'cd285d7d26e42eee91daf55be3378da595fee5ad':
  crash_reporter: Fix initial compile issues with Android toolchain
2015-08-10 22:45:11 +00:00
Gaurav Shah 22f14b0fe4 am b889d7e4: Merge "crash_reporter: Remove Chrome collector, CrOS build files, DBus"
* commit 'b889d7e420eb0dcdda526259b54942e2aef28a0a':
  crash_reporter: Remove Chrome collector, CrOS build files, DBus
2015-08-10 22:45:10 +00:00
Gaurav Shah 795ad6c744 am f06041d7: Merge "metricsd: Rename metrics to metricsd."
* commit 'f06041d7f4c6fcfa91fcffde77d40f0a68760267':
  metricsd: Rename metrics to metricsd.
2015-08-10 22:45:09 +00:00
Gaurav Shah 0e8acc3c16 am 011b2bc3: Merge "metrics: Add a CLI flag to disable dbus."
* commit '011b2bc3ebba01de7acec1a6ed7a287a492b6fa0':
  metrics: Add a CLI flag to disable dbus.
2015-08-10 22:45:08 +00:00
Gaurav Shah fb44650a03 am dc15f4cd: Merge "metrics: Enable for non-official builds."
* commit 'dc15f4cd926a35e4b2f85804fbad218a90365abe':
  metrics: Enable for non-official builds.
2015-08-10 22:45:06 +00:00
Gaurav Shah cd285d7d26 Merge "crash_reporter: Fix initial compile issues with Android toolchain" 2015-08-10 22:41:36 +00:00
Gaurav Shah b889d7e420 Merge "crash_reporter: Remove Chrome collector, CrOS build files, DBus" 2015-08-10 22:41:26 +00:00
Gaurav Shah f06041d7f4 Merge "metricsd: Rename metrics to metricsd." 2015-08-10 22:41:00 +00:00
Gaurav Shah 011b2bc3eb Merge "metrics: Add a CLI flag to disable dbus." 2015-08-10 22:40:47 +00:00
Gaurav Shah dc15f4cd92 Merge "metrics: Enable for non-official builds." 2015-08-10 22:40:32 +00:00
Steve Fung de0bc2a23b am b949867c: am 855b618f: Merge "crash_reporter: Fix header include paths"
* commit 'b949867c14bc3fa756549c98f5a446412b299c40':
  crash_reporter: Fix header include paths
2015-08-10 22:33:40 +00:00
Elliott Hughes e1746fda6a Remove the USB vendor id whitelist from fastboot.
Change-Id: I661a0538776d4ba74fcee37e2964d987eb861342
2015-08-10 15:30:54 -07:00
Steve Fung b949867c14 am 855b618f: Merge "crash_reporter: Fix header include paths"
* commit '855b618fbabc032f3ba1eb2232e1766e76298cba':
  crash_reporter: Fix header include paths
2015-08-10 22:27:00 +00:00
Bertrand SIMONNET da21ac0751 metricsd: Rename metrics to metricsd.
This makes the import path less confusing:
* metrics/metrics_library.h is imported from the exported headers.
* metricsd/* for includes by the metrics daemon itself.

BUG: 22879597
Change-Id: I9f44ea3a548cae39d4546fcd724e8007f6dd4bd0
2015-08-10 15:26:01 -07:00
Bertrand SIMONNET fec4d2cc3f metrics: Add a CLI flag to disable dbus.
DBus is not setup in several targets and the metrics_daemon will crash
if it cannot connect to DBus.
Running metrics daemon without dbus allows us to test the daemon in any
target.

BUG: 22879597

Change-Id: Ica69c8e96c3df794a210a0fa3d44f85a98a660f0
2015-08-10 15:26:01 -07:00
Bertrand SIMONNET bae5dcce9b metrics: Enable for non-official builds.
The metrics uploader used to be disabled for non-official images to
avoid polluting the production data with possibly wrong measurements.
This is inconvenient for developers as they can only be sure that a new
metric was added properly until the changes reached a product device.

Instead, this CL change the metrics daemon to upload metrics iff the
consent file exists.
To ensure that testing data does not pollute the production data, we set
the channel to UNKNOWN and the version to 0.0.0.0 when the image is not
official (implied by channel and version missing).

BUG: 22879597

Change-Id: If03847090b732cc06270cbcc8b386b5f9e544a3d
2015-08-10 15:26:01 -07:00
Steve Fung 855b618fba Merge "crash_reporter: Fix header include paths" 2015-08-10 22:17:31 +00:00
Steve Fung 8bafb3da8f crash_reporter: Fix initial compile issues with Android toolchain
Fix some issues to get crash_reporter to compile on Android.

C++ source:
* bits/wordsize.h is used for __WORDSIZE, but is unavailable for most
  Android toolchain architectures.  It instead is available in sys/cdefs.h

Flex source:
* The Flex compiler toolchain doesn't link against the default fl library
  using -lfl.  Thus there is no yywrap() function defined.  Since the
  default fl library implementation just returns 1 (true), instead add a
  directive to disable yywrap.
* The index(..) function has been deprecated in favor of strchr(..)
* Add a directive to disable the "deprecated conversion from string constant
  to 'char*'" warning in the generated code.
* Remove warning suppression for the input() function which doesn't get
  generated with Flex v2.5.39 and the arguments passed in the build command.

Bug: 22874187
Change-Id: I6d7dcf5f801010aeae06db9f0628a6652ee269ee
2015-08-10 15:10:32 -07:00
Steve Fung c8b741428c crash_reporter: Remove Chrome collector, CrOS build files, DBus
Removed the ChromeOS specific code so that the code compiles.  The code
removed is not needed when running on Android, and includes:
* Chrome collector
* ChromeOS build's gyp file
* ChromeOS-specific DBus calls
* ChromeOS-specific collector path logic
* Chrome bypass logic in user collector

Bug: 22672752
Change-Id: I3c7d87c971a181d8f73293519318e3602d142927
2015-08-10 15:10:22 -07:00
Bertrand Simonnet c6087a2ddb am 7d41a8c8: am 6ada1665: Merge "metrics: Remove send to autotest."
* commit '7d41a8c8d0bfec11e4c1b06f7e9b41cd15a59d18':
  metrics: Remove send to autotest.
2015-08-10 21:53:56 +00:00
Bertrand Simonnet a3400a2c7a am 1ed51e42: am 9372228f: Merge "metrics: Consolidate constants in constants.h."
* commit '1ed51e429a5f1d3430cd1cdf243f6db1e998c7b8':
  metrics: Consolidate constants in constants.h.
2015-08-10 21:53:54 +00:00
Bertrand Simonnet 7d41a8c8d0 am 6ada1665: Merge "metrics: Remove send to autotest."
* commit '6ada1665c9b3f6ffea34d0c15ba9be96d7ff58a8':
  metrics: Remove send to autotest.
2015-08-10 21:47:10 +00:00
Bertrand Simonnet 1ed51e429a am 9372228f: Merge "metrics: Consolidate constants in constants.h."
* commit '9372228f4eb387a6919e95627539cd6776d1dc6c':
  metrics: Consolidate constants in constants.h.
2015-08-10 21:47:09 +00:00
Bertrand Simonnet 6ada1665c9 Merge "metrics: Remove send to autotest." 2015-08-10 21:43:07 +00:00
Bertrand Simonnet 9372228f4e Merge "metrics: Consolidate constants in constants.h." 2015-08-10 21:42:49 +00:00
Bertrand Simonnet 7c2696630f am f69a27f8: am 182673ec: Merge "metrics: Cleanup the system profile setter."
* commit 'f69a27f80e461a435a260dbee0c1550df49aca78':
  metrics: Cleanup the system profile setter.
2015-08-10 21:42:40 +00:00
Bertrand Simonnet 077a839bd7 am 73e5c768: am 38f55079: Merge "metrics: Disable stat collection."
* commit '73e5c7680a11f1a53db958be14232e8843e9c9cc':
  metrics: Disable stat collection.
2015-08-10 21:42:39 +00:00
Bertrand SIMONNET 475dfa6891 metrics: Remove send to autotest.
This code is no longer used and can be removed.

BUG: 22879597

Change-Id: I59a51597f4c3699aa7952b0553144ad0ee03ebde
2015-08-10 14:42:03 -07:00
Bertrand SIMONNET bd3505e634 metrics: Consolidate constants in constants.h.
Instead of hardcoding system specific constants (like path) in
every file, consolidate them into the constants.h.

BUG: 22879597

Change-Id: I615be017774db629bf43398db7f70e9ef7263a52
2015-08-10 14:42:03 -07:00
Bertrand Simonnet f69a27f80e am 182673ec: Merge "metrics: Cleanup the system profile setter."
* commit '182673ec6cd7538661cc76a984cded725d03f456':
  metrics: Cleanup the system profile setter.
2015-08-10 21:33:01 +00:00
Bertrand Simonnet 73e5c7680a am 38f55079: Merge "metrics: Disable stat collection."
* commit '38f55079aaefd339ce7b851323be4c9d7f0c01b8':
  metrics: Disable stat collection.
2015-08-10 21:33:00 +00:00
Bertrand Simonnet 182673ec6c Merge "metrics: Cleanup the system profile setter." 2015-08-10 21:28:16 +00:00
Bertrand Simonnet 38f55079aa Merge "metrics: Disable stat collection." 2015-08-10 21:27:52 +00:00
Tom Cherry 4ad60fbae5 init: replace strdup() in parse_config()
Previously, the action, command, and service structs contained char*s
that referenced memory within the buffer returned by the strdup() of
the input buffer of parse_config.  This prevented this entire memory
region from being freed, leaking contents that would never be referenced again.

The changes to convert the previous action, command, and service
structs to C++ classes created explicit ownership of the contents within
each class in the form of std::strings.  With these changes, there are
no remaining references to the memory allocated by this strdup(), which
can now be freed.

This commit replaces the strdup() with std::vector<char> to allow for
the copied string to be freed when it goes out of scope instead of
relying on the C strdup() and free() functions.

Change-Id: Id0a5f711e33363082ba201afda6b26043998cb1c
2015-08-10 14:26:03 -07:00