Commit graph

14717 commits

Author SHA1 Message Date
Mark Salyzyn
e9451e7ef8 logd: Add LogUtils.h
(cherry pick from commit 5ac5c6b193)

Move prototypes from LogBufferElement.h to LogUtils.h

Change-Id: I55e42e17e6c997e35b2b78b87fd2f84f8f393282
2015-11-16 08:53:04 -08:00
Mark Salyzyn
4efc87e5eb logd: klogd deal with nuls in dmesg
(cherry pick from commit 151beac76d)

Switch to using string and length in all transactions, treating
trailing nuls the same as spaces.

ToDo: change dumpstate (bugreport) to use logcat -b printable _regardless_

Bug: 23517551
Change-Id: I42162365e6bf8ed79d356e7b689a673902116fdb
2015-11-16 08:53:04 -08:00
Mark Salyzyn
f9e4d0b6b5 logd: log_strtok_r deal with nuls
(cherry pick from commit ea1a241107)

Rename to log_strntok_r and change from dealing with strings
to dealing with a string and an associated length.

Bug: 23517551
Change-Id: Ia72f1305a53f55eeef9861ac378fb8205fd2378e
2015-11-16 08:53:04 -08:00
Mark Salyzyn
26499e41ae liblog: logprint: printable nul
(cherry pick from commit faa92e9915)

Change-Id: I57d1f86ce040ad196c558bb72ac0464af793c214
2015-11-16 08:53:04 -08:00
Mark Salyzyn
3f78f93302 logd: klogd: sniff for time correction on Mediatek
(cherry pick from commit 2d159bf3b5)

Need some more flexibility when parsing kernel messages
cluttered with extra fluff. This is the minimal relaxation
we can do to the rules to ensure that we work on all
possible devices and kernels when sniffing for time
correction information.

We want to minimize any future maintenance, keep in mind
klogd is a "userdebug" or "eng" feature and is disabled
in "user" builds. Manage expectations.

Bug: 23517551
Change-Id: I026d074e14fb2550e728683e85a973bd87e78a9c
2015-11-16 08:53:04 -08:00
Mark Salyzyn
540cfe8e6b logd: klogd and Mediatek part deux
(cherry pick from commit 47dba71f24)

- switch to an open coded strnrchr
- validity checking on n, taglen and b values.

Bug: 23517551
Change-Id: I568e25c5aa6d8474835454a0e83b19c2921b7986
2015-11-16 08:53:04 -08:00
Mark Salyzyn
39888aef13 liblog: logcat: Add year and zone to date on each line
(cherry pick from commit f28f6a9ba2)

- '-v year' modifier adds the four digit year prefix
- '-v <timezone>' modifier sets and prints the timezone suffix
- Only promise in logcat to support UTC as a timezone since
  all others are based on the configured environment
- '-v zone' modifier toggles the timezone suffix on or off
- '-T YYYY-MM-DD HH:MM:SS.mmm...' format is added

Bug: 23668700
Change-Id: I7521c1efb7455dc9a25434fce72a69a65dcf72ea
2015-11-16 08:53:04 -08:00
Mark Salyzyn
5c3835d943 logd: switch asprintf to std::string
(cherry pick from commit 73160acc5c)

Bug: 23350706
Change-Id: I715cdd4563a09de3680081947a3439f0cac623be
2015-11-16 08:53:04 -08:00
Mark Salyzyn
8a7f778c01 logd: white and black switch to std::string
(cherry pick commit from b332f1c427)

Bug: 23350706
Change-Id: I92f21aee0a9702f63e8465851d0f35007b0469a7
2015-11-16 08:53:04 -08:00
Mark Salyzyn
2a2b0d1c6e logd: statistics switch to std::string
(cherry pick from commit decbcd9c41)

Bug: 23350706
Change-Id: I5564898c4f67b8fcc43cee64604855f789409482
2015-11-16 08:53:04 -08:00
Andreas Gampe
244f32fa2d Logd: Handle unused variable and fields
(cherry pick from commit d75564f9b8)

For build-system CFLAGS clean-up.

Bug: 18632512
Change-Id: If81d6705b44e9a29f64c44c56ea633c031e831b7
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
ff1160b28f rootdir: Allow board specific folders and symlinks in root directory
Building without ramdisk requires a way to specify board specific
directoryies and symlinks in the root directory at build time.

Change-Id: I11301e98228bc4761f3aee177a546146651b9f25
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
a852aacb56 Fix "adb remount" for when the root directory is in system.img
When the root directory has been built into system.img, it is
mounted at /.

Change-Id: If01d12efeaa53b4ae59e801a6e9b802a9ae5882d
2015-11-16 08:53:04 -08:00
Tao Bao
096c4f2d8a Set mode bits for /system/etc/recovery.img.
/system/etc/recovery.img defaults to 0644. Change it to 0440.

Bug: 22641135
Change-Id: I45cdb0cc1b58f35fbcd0f16e7cc6c4eef63b0b74
(cherry picked from commit b602e6f9a3)
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
fd2f0b4dc4 fs_mgr: Add support for A/B partitions
Allow partitions to be marked as A/B partitions
using the slotselect flag in fstab. The partitions
can be identified by appending the correct suffix
to the block device listed in the fstab. The suffix
is provided by the bootloader through a command line
parameter or the device tree, and can be found in
ro.boot.slot_suffix or read from the boot_control HAL.

Change-Id: I6846d80e857f95bfb8f282f4ab81167394613bbe
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
6a5a81a3d6 rootdir: Create symlinks in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some symlinks init.rc would during the build.

Change-Id: I4e7726f38c0f9cd9846c761fad1446738edb52c0
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
c906751994 Skip mounting /, just mark block device as ro if needed.
Change-Id: I7fbb636d296abc1caab6c7bf88017684c9df7759
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
c97e1cb39d Remove creation of root directory folders
Folders in the root directory are now created during the build,
as we may be building without a ramdisk, and when we do that,
the root directory will be read-only.  With those changes,
these mkdirs will never need to run.

Change-Id: I49c63e8bfc71d28e3f938ed41f81d108359fa57a
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
4c9c516d20 rootdir: Create cache folder in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some folders init.rc would during the build.

Change-Id: I312104ff926fb08d98ac8256b76d01b0a90ea5e5
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
9262546184 rootdir: Create folders in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some folders init.rc would during the build.

Change-Id: I157ccbebf36bee9916f3f584551704ec481ae1d1
2015-11-16 08:53:04 -08:00
Daniel Rosenberg
a39317ca94 libcutils: fs_config: Add folders normally created in init.rc
When the ramdisk is built into the system image, we need to create
those folders during the build.

Change-Id: I40881940c75e379d7599dc1f743b35fbc7cc66e8
2015-11-16 08:53:04 -08:00
Todd Kjos
ed60788968 Actively mangage EAS schedtune nodes
Move foreground tasks to /sys/fs/cgroup/stune/boost/tasks (boosted
weight in EAS scheduler). Move background tasks to
/sys/fs/cgroup/stune/tasks (default weight). For services started
with init, set "foreground" services to boosted.

Change-Id: I0e489fad9510727c13e6754dabaf311c2391f395
2015-11-16 08:53:04 -08:00
Mark Salyzyn
1589fa1bda logcat: continue where we left off
am: 5b0d59dde8

* commit '5b0d59dde85162fa9ef3a32464c0f1b81d7e05cb':
  logcat: continue where we left off
2015-11-12 23:44:18 +00:00
Mark Salyzyn
5b0d59dde8 logcat: continue where we left off
Issue introduced as part of new logcatd functionality in
commit f3555d9427

Faulty logic, add a gTest to confirm.

Bug: 19608716
Change-Id: Ic1b97def25e03e69faae4398a3dff2ff0f88545e
2015-11-12 11:51:41 -08:00
Jon Larimer
7b5fa175fa Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev am: 809d5a0158 am: fd56dc41c7 -s ours am: 362f13d74a am: 702fe6d486 -s ours am: ea1e6a59e7 am: 088639a20f -s ours am: 55263d2ae3
am: 99cd21ef5c

* commit '99cd21ef5c3548613d8a614551b858a5c47985fc':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:52:49 +00:00
Jon Larimer
ae1f2bfe92 Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-dev am: 5280061b56 am: 442a830e9b -s ours am: 93a3871abb am: 089ad5e98a -s ours am: 2f1562eb10
am: 9f1b1caa78

* commit '9f1b1caa787fdb9f66f32eda38d46f1b4e75b209':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:52:44 +00:00
Jon Larimer
ec73aeaaab Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-mr1-dev am: f84eef3fca -s ours am: d0ed7943b8 -s ours am: a1da204980
am: 7755770ac9

* commit '7755770ac930c8a7bf14a140e92330cee382fd16':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:52:38 +00:00
Jon Larimer
99cd21ef5c Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev am: 809d5a0158 am: fd56dc41c7 -s ours am: 362f13d74a am: 702fe6d486 -s ours am: ea1e6a59e7 am: 088639a20f -s ours
am: 55263d2ae3

* commit '55263d2ae3696baaa574ee896e3a8b0546aa5628':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:45:04 +00:00
Jon Larimer
9f1b1caa78 Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-dev am: 5280061b56 am: 442a830e9b -s ours am: 93a3871abb am: 089ad5e98a -s ours
am: 2f1562eb10

* commit '2f1562eb10279531524f54ca7c129ead66ab3673':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:44:57 +00:00
Jon Larimer
7755770ac9 Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-mr1-dev am: f84eef3fca -s ours am: d0ed7943b8 -s ours
am: a1da204980

* commit 'a1da204980891f9e59a41d7a41d510f3f05d34bf':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:44:50 +00:00
Jon Larimer
55263d2ae3 Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev am: 809d5a0158 am: fd56dc41c7 -s ours am: 362f13d74a am: 702fe6d486 -s ours am: ea1e6a59e7
am: 088639a20f  -s ours

* commit '088639a20fc388e8d4dcf1ed471b31086c43bc83':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:41:08 +00:00
Jon Larimer
2f1562eb10 Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-dev am: 5280061b56 am: 442a830e9b -s ours am: 93a3871abb
am: 089ad5e98a  -s ours

* commit '089ad5e98ab8a4b2d4ea00c6a88d61b963797c90':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:41:02 +00:00
Jon Larimer
a1da204980 Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-mr1-dev am: f84eef3fca -s ours
am: d0ed7943b8  -s ours

* commit 'd0ed7943b8a2f3d0000391f18899c77566a0be1a':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:40:55 +00:00
Jon Larimer
088639a20f Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev am: 809d5a0158 am: fd56dc41c7 -s ours am: 362f13d74a am: 702fe6d486 -s ours
am: ea1e6a59e7

* commit 'ea1e6a59e7dd8d4674a2116ec5893cdf801e6339':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:37:57 +00:00
Jon Larimer
089ad5e98a Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-dev am: 5280061b56 am: 442a830e9b -s ours
am: 93a3871abb

* commit '93a3871abbd16a3e0dee6ab8e7e87356620efeac':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:37:51 +00:00
Jon Larimer
d0ed7943b8 Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-mr1-dev
am: f84eef3fca  -s ours

* commit 'f84eef3fca156cd9a9f2f09f305a6fd6c898f14b':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 20:37:43 +00:00
Jon Larimer
ea1e6a59e7 Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev am: 809d5a0158 am: fd56dc41c7 -s ours am: 362f13d74a
am: 702fe6d486  -s ours

* commit '702fe6d486d2bdd920010d681b046a3396b4021a':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 14:02:59 +00:00
Jon Larimer
702fe6d486 Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev am: 809d5a0158 am: fd56dc41c7 -s ours
am: 362f13d74a

* commit '362f13d74a5c57f4e2ba4f0de341896e79732dcf':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 13:59:19 +00:00
Jon Larimer
5c3c0236c3 Merge "Add macro to call event logger for errors." into mnc-dev am: d028c6fa7f
am: bc1ef58505

* commit 'bc1ef5850501c5694f262c3ab844df4cc4846bcc':
  Add macro to call event logger for errors.
2015-11-11 13:55:57 +00:00
Jon Larimer
362f13d74a Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev am: 809d5a0158
am: fd56dc41c7  -s ours

* commit 'fd56dc41c70a58541b9ed25f4c97ffe3fea19536':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 13:55:57 +00:00
Jon Larimer
fd56dc41c7 Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev
am: 809d5a0158

* commit '809d5a01586d00ee91d13fb8d034d12584ba3314':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 13:50:40 +00:00
Jon Larimer
93a3871abb Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-dev am: 5280061b56
am: 442a830e9b  -s ours

* commit '442a830e9b0415460749016394b3a71b9df2af13':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 13:50:39 +00:00
Jon Larimer
bc1ef58505 Merge "Add macro to call event logger for errors." into mnc-dev
am: d028c6fa7f

* commit 'd028c6fa7fe135a3b454a1773ba59cafbba4b49e':
  Add macro to call event logger for errors.
2015-11-11 13:46:21 +00:00
Jon Larimer
442a830e9b Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-dev
am: 5280061b56

* commit '5280061b5668d87b99ff4f9ef883a3fed944bce4':
  Add macro to call event logger for errors. DO NOT MERGE
2015-11-11 13:46:21 +00:00
Jon Larimer
d028c6fa7f Merge "Add macro to call event logger for errors." into mnc-dev 2015-11-11 13:42:38 +00:00
Jon Larimer
f84eef3fca Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-mr1-dev 2015-11-11 13:42:37 +00:00
Jon Larimer
5280061b56 Merge "Add macro to call event logger for errors. DO NOT MERGE" into lmp-dev 2015-11-11 13:42:35 +00:00
Jon Larimer
809d5a0158 Merge "Add macro to call event logger for errors. DO NOT MERGE" into klp-dev 2015-11-11 13:42:33 +00:00
William Luh
f6891c025a Add macro to call event logger for errors.
Bug:23180694
Change-Id: I566a290334345f48013029534efef3e08e726e40
2015-11-10 22:34:08 +00:00
William Luh
9a86c283cd Add macro to call event logger for errors. DO NOT MERGE
Bug:23180694
Change-Id: I566a290334345f48013029534efef3e08e726e40
2015-11-10 22:33:46 +00:00