Commit Graph

18923 Commits

Author SHA1 Message Date
Nick Kralevich 715c4dc3f9 init.rc: restorecon_recursive /sys/kernel/debug
If /sys/kernel/debug is present, make sure it has all the appropriate
SELinux labels.

Labeling of /sys/kernel/debug depends on kernel support
added in commit https://android-review.googlesource.com/122130

This patch depends on an external/sepolicy change with the
same Change-Id as this patch.

Change-Id: Id1d6a9ad6d0759d6de839458890e8cb24685db6d
2015-12-07 17:00:40 -08:00
Nick Kralevich 173eb396c7 adb: Make HOME=/data/local/tmp
Make the home directory for adb shell be /data/local/tmp and
automatically change into that directory.

Change-Id: Ib5cc6e1ecdd31a37e986cf03836f7589ebd40868
2015-12-07 16:56:12 -08:00
Mark Salyzyn e13efa6112 Merge "liblog: print message payload of zero length"
am: 50413c7626

* commit '50413c7626c7598ccb062d7d1156e5cfa1b2cb8e':
  liblog: print message payload of zero length
2015-12-08 00:31:59 +00:00
Mark Salyzyn 50413c7626 Merge "liblog: print message payload of zero length" 2015-12-08 00:27:30 +00:00
Tao Bao 97df395683 rootdir: Execute update_verifier for A/B update.
update_verifier verifies the updated partitions and marks the current
slot as having booted successfully. It needs to be triggered prior to
the start of the framework, otherwise it won't be able to fall back to
the old system without a data wipe.

Bug: 26039641
Change-Id: I6fd183cdd3dfcc72feff2a896368158875b28591
2015-12-07 16:23:13 -08:00
Mark Salyzyn d7bcf40ee6 liblog: print message payload of zero length
logcat will crash if the log message payload is of zero length. Side
effect of possible log messages from LogKlog in eng and userdebug
builds, or lower level logging calls.

NB: The referenced bug cited an example of this native crash, this
    does not fix the problem cited in the bug about the
    com.android.music shutdown.

Bug: 25774695
Change-Id: I5c7a6ad8db640ba9bc8d34fab04ba7cc2a9a426a
2015-12-07 16:14:40 -08:00
Dimitry Ivanov 17f119eade Merge "Native loader as a separate library"
am: beceb6ef53

* commit 'beceb6ef53b736879a962992c43fa318e3ea2999':
  Native loader as a separate library
2015-12-07 23:58:01 +00:00
Dimitry Ivanov beceb6ef53 Merge "Native loader as a separate library" 2015-12-07 23:45:50 +00:00
Mark Salyzyn 154e1c15ae Merge changes Ib441cecf,Ieb1bbe3d,I3e63e430,I531b4317,I8dd60545, ...
am: d1379a8aed

* commit 'd1379a8aedb7b80edac8849d2e64ceffa409632e':
  logcat: Add --wrap timeout
  logcat: Add low hanging fruit long arguments
  logcat: Add long arguments to logcat, support for pid filter
  liblog: Support for ANDROID_LOG_WRAP mode flag on reader
  logd: test wakeup on wrap timeout
  logd: wakeup on wrap or timeout
2015-12-07 23:21:13 +00:00
Mark Salyzyn 660d17b25c Merge "logd: test: leniency towards background cgroup"
am: 3ea02e8eca

* commit '3ea02e8eca9fc0f2122d73a1d117292514256fcf':
  logd: test: leniency towards background cgroup
2015-12-07 23:19:10 +00:00
Mark Salyzyn b62b7783ac Merge "logd: test: statistics report chatty effective percentage"
am: 2e2d2edc59

* commit '2e2d2edc59244e56f93f1e7746ebc5e1ef5ea775':
  logd: test: statistics report chatty effective percentage
2015-12-07 23:16:53 +00:00
Mark Salyzyn 28a96aeedc Merge "liblog: test: liblog.android_logger_get_ failure"
am: 8ca9a775f7

* commit '8ca9a775f7d8a5db68c7b42ec42aad969bd6d5e3':
  liblog: test: liblog.android_logger_get_ failure
2015-12-07 23:16:48 +00:00
Mark Salyzyn d2fb3e10ee Merge "logd: liblog: logcat: switch to android_log_clockid() (2)"
am: 69504d646d

* commit '69504d646d0cfdad28307b5ca7a8b98552e5cb06':
  logd: liblog: logcat: switch to android_log_clockid() (2)
2015-12-07 23:16:33 +00:00
Mark Salyzyn a64dd2d0b4 Merge "Revert "logd: liblog: logcat: switch to android_log_clockid()""
am: b566435b02

* commit 'b566435b02d90663b5a26ba795bfb2f0102e8833':
  Revert "logd: liblog: logcat: switch to android_log_clockid()"
2015-12-07 23:14:42 +00:00
Mark Salyzyn 8acc9bc1cb Merge "logd: liblog: logcat: switch to android_log_clockid()"
am: 9eca0e775b

* commit '9eca0e775b8462788e988218c8582bf341dfdfeb':
  logd: liblog: logcat: switch to android_log_clockid()
2015-12-07 23:14:23 +00:00
Elliott Hughes e2a9563be1 Merge "Track rename of base/ to android-base/."
am: 912ed3d8ca

* commit '912ed3d8ca78d840a1d19543a205d787fbfbf235':
  Track rename of base/ to android-base/.
2015-12-07 23:14:17 +00:00
Elliott Hughes f2584be414 Rename base/ to android-base/.
Bug: http://b/26023797
Change-Id: Ie6c63bf86bed05faab87d290de6f34d9af3532a8
2015-12-07 14:31:53 -08:00
Mark Salyzyn d1379a8aed Merge changes Ib441cecf,Ieb1bbe3d,I3e63e430,I531b4317,I8dd60545, ...
* changes:
  logcat: Add --wrap timeout
  logcat: Add low hanging fruit long arguments
  logcat: Add long arguments to logcat, support for pid filter
  liblog: Support for ANDROID_LOG_WRAP mode flag on reader
  logd: test wakeup on wrap timeout
  logd: wakeup on wrap or timeout
2015-12-07 22:27:13 +00:00
Mark Salyzyn 41ba25f864 logcat: Add --wrap timeout
Always ANDROID_LOG_WRAP_DEFAULT_TIMEOUT seconds (2 hours).
--wrap takes argument, the argument is currently ignored.

Future: Add new API that allows setting of wrap timeout.

Bug: 25929746
Bug: 21615139
Change-Id: Ib441cecfb6e4264c18adb70c705314440ba85e65
2015-12-07 14:24:02 -08:00
Mark Salyzyn f8bff87c65 logcat: Add low hanging fruit long arguments
Add long arguments file, rotate_kbytes, rotate_count, format,
dividers, clear, buffer_size, last, buffer, binary, statistics
and prune.

Bug: 21615139
Change-Id: Ieb1bbe3d47e6711a1e91c74522630d39f8981621
2015-12-07 14:24:02 -08:00
Kristian Monsen 562e513d4b logcat: Add long arguments to logcat, support for pid filter
Bug: 21615139
Change-Id: I3e63e43067f8089c18658e4100e901fb2a9630ae
2015-12-07 14:24:02 -08:00
Mark Salyzyn f8e546e609 liblog: Support for ANDROID_LOG_WRAP mode flag on reader
If ANDROID_LOG_WRAP is specified, add timeout=3600 to the reader
request. logd will comply by going to sleep with the socket open.
If the start time is about to wrap or get pruned in the specified log
buffers, then wakeup and dump the logs; or wakeup on timeout,
whichever comes first.

Bug: 25929746
Change-Id: I531b4317a20abcf3ba87d78c68fa2f268a4488ab
2015-12-07 14:24:02 -08:00
Mark Salyzyn fc9f5b8af4 logd: test wakeup on wrap timeout
Change-Id: I8dd605452f1fef7706a627eedc251e39bb2e34cc
2015-12-07 14:24:02 -08:00
Mark Salyzyn b75cce0389 logd: wakeup on wrap or timeout
If a timeout is specified for the reader, then go to sleep
with the socket open. If the start time is about to get
pruned in the specified log buffers, then wakeup and dump
the logs; or wakeup on timeout, whichever comes first.

Bug: 25929746
Change-Id: I7d2421c2c5083b33747b84f74d9a560d3ba645df
2015-12-07 14:24:02 -08:00
Steve Fung 8ed101bab5 crash_reporter: Fix unit tests
- Removed obsolete unit tests.
- Fix remaining unit tests for Android.

Change-Id: I1665447d375178d2bcf941fec3585c8f96cd2bac
2015-12-07 14:21:00 -08:00
Daniel Rosenberg 9b432054dc fastboot: Re-add set_active as a command.
It turns out that adding a -- allows suffixes
starting with - to work fine, and there are
edge cases where calling set_active twice in
a command is useful, so the command version
has been re-added.

Change-Id: I528c258bf23ade61db530eb27586c1a1721896bc
2015-12-07 13:42:48 -08:00
Mark Salyzyn 3ea02e8eca Merge "logd: test: leniency towards background cgroup" 2015-12-07 20:59:34 +00:00
Dimitry Ivanov ac1b1919f8 Native loader as a separate library
Extracted native loader to separate library in order to
be able to reuse it for NativeActivities related native code
in libandroid_runtime.so

Bug: http://b/22548808
Change-Id: Ibcf5ddcdc5aba22e32e4b72887840e9c171c1986
2015-12-07 12:59:02 -08:00
Mark Salyzyn 2e2d2edc59 Merge "logd: test: statistics report chatty effective percentage" 2015-12-07 19:30:51 +00:00
Mark Salyzyn 8ca9a775f7 Merge "liblog: test: liblog.android_logger_get_ failure" 2015-12-07 19:30:40 +00:00
Mark Salyzyn 074f542476 logd: test: leniency towards background cgroup
Accepting a new lower standard of performance due to
the realities of the background cgroup.

Change-Id: Icd85050ffbf7f0129dd4c053323faedd0ff74048
2015-12-07 11:26:12 -08:00
Mark Salyzyn f33657da4d logd: test: statistics report chatty effective percentage
Add parsing to recognize optional chatty effective
percentage field as reported in the logger statistics.

Bug: 22855208
Change-Id: Id9c5e4a907ed0f9319beb9ddbfa27f4844bffc7d
2015-12-07 11:10:04 -08:00
Mark Salyzyn 7d8939ec1d liblog: test: liblog.android_logger_get_ failure
Change-Id: I8f74eca7857fe4cd6fa979d7bdeeda2b6a3e596b
2015-12-07 11:08:59 -08:00
Mark Salyzyn 69504d646d Merge "logd: liblog: logcat: switch to android_log_clockid() (2)" 2015-12-07 19:08:33 +00:00
Mark Salyzyn ba7a9a016b logd: liblog: logcat: switch to android_log_clockid() (2)
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I38dee773bf3844177826b03a26b03215c79a5359
2015-12-07 18:45:31 +00:00
Mark Salyzyn b566435b02 Merge "Revert "logd: liblog: logcat: switch to android_log_clockid()"" 2015-12-07 18:31:44 +00:00
Mark Salyzyn 9e18cdcebd Revert "logd: liblog: logcat: switch to android_log_clockid()"
This reverts commit 77b5696b1d.

Change-Id: I7711bf1a7e3f72ed29a2498d7287b725a0e624bd
2015-12-07 18:30:58 +00:00
Mark Salyzyn 9eca0e775b Merge "logd: liblog: logcat: switch to android_log_clockid()" 2015-12-07 18:16:29 +00:00
Elliott Hughes 912ed3d8ca Merge "Track rename of base/ to android-base/." 2015-12-07 17:49:14 +00:00
Erik Kline c40da92e5b Listen on dualstack sockets.
Change-Id: Id6eff59c65a7f7e190ab9aa93625e32a9806ae6c
2015-12-07 16:09:39 +09:00
Erik Kline 7e16cc15b5 Switch from using sockaddr to sockaddr_storage.
This is to ensure sufficient space is always available.

Change-Id: Ifa87b93ecdc90dcacbfb24446c872344da6703d3
2015-12-07 16:07:46 +09:00
Elliott Hughes 4f71319df0 Track rename of base/ to android-base/.
Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
2015-12-04 22:00:26 -08:00
Elliott Hughes ce0c6c5fee Merge "Add a symlink android-base/ pointing to base/."
am: 1efab7acc5

* commit '1efab7acc5d5b69dced70b6d04070d36f7c9632d':
  Add a symlink android-base/ pointing to base/.
2015-12-04 23:25:17 +00:00
Elliott Hughes 1efab7acc5 Merge "Add a symlink android-base/ pointing to base/." 2015-12-04 23:22:00 +00:00
Elliott Hughes 7f24c45b7d Add a symlink android-base/ pointing to base/.
This lets us move things over piece by piece without breaking anything.

Change-Id: I06fc29572f63c4af9675888987acdcdea086711d
2015-12-04 15:18:27 -08:00
Mark Salyzyn 77b5696b1d logd: liblog: logcat: switch to android_log_clockid()
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I3c4e3e6b87f6676950797f1f0e203b44c542ed43
2015-12-04 14:49:19 -08:00
Tom Cherry 265f525e21 Remove ANDROID_PROPERTY_WORKSPACE
Bug 23290008

Change-Id: I95babe735444ada10c67594ace700cae5d1ec0b3
2015-12-04 14:11:02 -08:00
Bertrand Simonnet d093c4bb5e Merge changes Id186dc54,Ie8fee841
am: f2eafd21a6

* commit 'f2eafd21a66f4b97bde4b18328407bb53820516e':
  metricsd: Allows introspecting the metrics.
  metrics: Remove user action logic.
2015-12-04 21:23:03 +00:00
Bertrand Simonnet f2eafd21a6 Merge changes Id186dc54,Ie8fee841
* changes:
  metricsd: Allows introspecting the metrics.
  metrics: Remove user action logic.
2015-12-04 21:17:50 +00:00
Bertrand SIMONNET b13527d14e metricsd: Allows introspecting the metrics.
This CL adds a dump command to metrics_client that will dump the
histograms, aggregated by metricsd since it started, in a human readable
format.
This is useful for developers to ensure that their code uses libmetrics
correctly and the reported values are correct.

Sample output (redacted to fit the commit message):
$ metrics_client -d
Histogram: hello recorded 5 samples, average = 54.8 (flags = 0x1)
0   ...
9   --------O                 (1 = 20.0%) {0.0%}
16  O                         (0 = 0.0%) {20.0%}
29  --------O                 (1 = 20.0%) {20.0%}
54  ------------------------O (3 = 60.0%) {40.0%}
100 O                         (0 = 0.0%) {100.0%}
$

Bug: 25817310
Test: * Send a histogram with metrics_client.
      * `metrics_client -d` shows it.

Change-Id: Id186dc5463403ca9181ee9eef8f46b5e809b8714
2015-12-04 13:14:58 -08:00