- This is considered an Android Private function, not exported
for general use.
- goal is to record a file's content into a series of log
messages into pmsg, to be retrieved after a reboot for
transfer to a persistent location.
- filename reference is converted to a tag-unique
"<dirbase>:<filebase>".
- buffer and length representing the filename contents are
recorded, along with a sequence number placed into the nsec
time field to ANDROID_LOG_PMSG_FILE_MAX_SEQUENCE.
- Add a gTest for this function.
Bug: 27176738
Change-Id: If93df3ae8bfc1bb75516d4a1fd8dae0301af644b
Create config_logger, logger and logger_read to house the log
interfaces. Add fake_logger, logd_logger and pmsg_logger to
house the write and read transports. Allows for an easier and
direct path to add new transports to the library.
SideEffects: None, logger benchmark performance unaffected
Bug: 27176738
Bug: 27405083
Change-Id: I01b38637334a5242905c8c89f6ab0a92e2540008
This is intended to be used by user space daemons that are part of
access-controlled NVRAM HAL implementations for Brillo. Because there
might be sensitive data flowing through the daemon, we'd like to run
it as a separate user.
BUG: 27764637
Change-Id: If6ad7923af3c650963ee9e926f732001b6a8cb5d
As logging macros uses `if xxx else yyy` style, it is reported as an
error when DCHECK() is compiled with -Wdangling-else option. Because
after preprocess, DCHECK(x) becomes:
if (EnableDChecks)
if (x)
;
else
LogMessage(FATAL) << yyy;
This CL avoids compilation error by replacing `if xxx else yyy`
with `xxx && yyy` or `!(xxx) || yyy`.
Bug: 26962895
Change-Id: Ib0bf242cc04a238ec31a1ab66b53fc8a5b5ed28f
Try to print as much content as possible should the application
logging only submit content as part of a tag with an empty message.
We search for the first non-printable ascii character in the tag, in
order to split it up for printing.
Applications (such as com.yahoo.mobile.client.android.weather) that
malform their log messages will no longer be punished by truncating
the content, but this should never be considered advocacy for their
bad behavior.
Bug: 27585978
Change-Id: Idb0680e8d6a6ad2bef5150661905acccb5b70afb
This CL allows enabling of multiple consoles. A service can be
mapped to a specific console by providing the optional argument,
IE "tty0", to "console" service attribute as follows:
service fbconsole /system/bin/sh
class core
console tty0
disabled
user shell
group shell log readproc
seclabel u:r:shell:s0
Bug: None
Change-Id: I3b24e7f6848bbe5c6475f11334c04ec536e6af88
Tracked-On: https://jira01.devtools.intel.com/browse/BP-289
Signed-off-by: Viorel Suman <viorel.suman@intel.com>
libmetric's HistogramSnapshotManager::PrepareDeltas now takes the
iterators for the histogram collection to work on, instead of getting
a global one.
Change-Id: I3997ea7d2c330431379d055b0cb876069bddf395
This was actually nonfunctional until f5e8f0b, because it was using kill
after privileges were dropped. This doesn't seem necessary after the
changes to the sibling thread ptrace logic, though.
Bug: http://b/27427439
Change-Id: I6bffbc14e0cf5e377bbfa39c945518e0d436c223
This CL allows enabling of multiple consoles. The expected format
of "androidboot.console" kernel parameter is a list of available
consoles, as follows:
androidboot.console=tty0:ttyS0
A service can be mapped to a specific console by providing the
optional argument, IE "tty0", to "console" service attribute as follows:
service fbconsole /system/bin/sh
class core
console tty0
disabled
user shell
group shell log readproc
seclabel u:r:shell:s0
Bug: None
Change-Id: I3f8556425c8651bd121995869700f18b23365d55
Tracked-On: https://jira01.devtools.intel.com/browse/BP-289
Use sigtimedwait on SIGCHLD to watch our forked worker processes for
failure, so that we can guarantee that we always resume/kill the target
process if libunwind crashes.
Bug: http://b/27427439
Change-Id: I5a5da1f1abd7dc9d01223f5b3778e946e2d47d20
This list contains libraries that should directly or indirectly
be accessible to apps for the platform. Note that this list is
not device specific but rather device class specific.
For now we have 2 separate lists; one for Android Phones and Tablets,
and another one for Android Wear devices.
Bug: http://b/27546414
Bug: http://b/22548808
Change-Id: I83de5e3cf67392d0e9af66f70123898bd5997146
(cherry picked from commit 4b0e963872)
Adds operating system version and security patch level to the boot
image header. This change take into use one of the existing unused
fields to preserve compatibility.
Note: All information is packed into a single field, because there
are a lot of existing devices that break if the first unused field
is set to a non-zero value.
Bug: 27498078
Bug: 22914603
Change-Id: I24953129e06019b95014a050e916fe4f5c199286
- We actually are logging in a signal handler, the title is bluster
to remind developers. It is not a reliable path though as it can
lock up. Our goal is to minimize the chances of a lockup regardless
in the name of stability only. The test remains to catch regression
in the name of code quality and reliability. Expected to be
>99.999% reliable.
- Add a new _correct_ duplicate test that uses signal to release a
semaphore to a thread that performs the task. This path is expected
to be 100% reliable.
Bug: 27405083
Change-Id: Ibb7cf4b13e34ebfac2db2af8724b7db7a27f81a8
This change introduces new metrics to discern boot time on encrypted devices:
* post_decrypt_time_elapsed
* boot_decryption_complete
* boot_complete_post_decrypt
* boot_complete_no_encryption
Bug: 27497357
Change-Id: I8d3a411029bd6a45f80589ff67c408593e133a87
Remove references to SELinux policy files in /data/security
from libselinux/android.c. In the process all code that is
apparently related to handling an alternate policy and/or
reloading the policy has been removed.
Bug: 26544104
Change-Id: I47bf76ac3c26c5d71f92a21ffac2b17ba14262ea
This adds an NVRAM HAL module implementation which interfaces with the
Trusty NVRAM app.
BUG: 23524282
Change-Id: Ibfee13baccc2c5369786a078f2feffcd4eb7a139