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
Make the home directory for adb shell be /data/local/tmp and
automatically change into that directory.
Change-Id: Ib5cc6e1ecdd31a37e986cf03836f7589ebd40868
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
* 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
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
Add long arguments file, rotate_kbytes, rotate_count, format,
dividers, clear, buffer_size, last, buffer, binary, statistics
and prune.
Bug: 21615139
Change-Id: Ieb1bbe3d47e6711a1e91c74522630d39f8981621
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
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
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
Add parsing to recognize optional chatty effective
percentage field as reported in the logger statistics.
Bug: 22855208
Change-Id: Id9c5e4a907ed0f9319beb9ddbfa27f4844bffc7d
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
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
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
This CL converts metricsd, libmetrics and metrics_collector to use
Binder to pass metrics samples.
Bug: 25670685
Change-Id: I657faecdf4ed1226ab30ce69e062028463437e7b
Also, inline the bulk_read and bulk_write functions which were only
being used by one other function.
Bug: http://b/25847115
Change-Id: I218a869030219f606577a5529601c542488115e0
If __system_property_area_init() fails, there is a fundamental issue
with the system and we should abort from init.
Bug: 21852512
Change-Id: I05d7978ba3bcc347027a6d9443de7cdd229033d2
This will make it easier to catch formatting nits.
This style is based on the Google style guide (well known publicly) and
follows the Chromium style changes we have adopted.
Bug: 25887990
Change-Id: If9562223752dfe611a32c341e703338f806bcc0f