Commit graph

30625 commits

Author SHA1 Message Date
Mark Salyzyn
fa685b1638 Merge "logd: remove start filtration from flushTo (part deux)" am: 2623b6c55a
am: b8f2089d91

Change-Id: I3cb14b19aaf7180e5721b5178f17e87823418706
2017-05-19 17:03:15 +00:00
Mark Salyzyn
b8f2089d91 Merge "logd: remove start filtration from flushTo (part deux)"
am: 2623b6c55a

Change-Id: I28d9fd4a4db1ff9bb2fd0008a1cb22d7199b35f1
2017-05-19 16:58:14 +00:00
Treehugger Robot
2623b6c55a Merge "logd: remove start filtration from flushTo (part deux)" 2017-05-19 16:51:59 +00:00
Mark Salyzyn
7c466b936a Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb am: 037d2b71dc
am: 219e7200be

Change-Id: Idd6d68a17e51924834e60c85b1d72faa997d6c58
2017-05-19 14:30:35 +00:00
Mark Salyzyn
219e7200be Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb
am: 037d2b71dc

Change-Id: Idcd64fe03a983227c328618216a582dc8ae76b8e
2017-05-19 14:25:08 +00:00
Mark Salyzyn
037d2b71dc Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb
* changes:
  libcutils: fs_config: remove aliases
  libcutils: fs_config test report aliases
  libcutils: fs_config: alias "system/<partition>/" to "<partition>/"
2017-05-19 14:17:02 +00:00
Mark Salyzyn
206ed8e2d6 logd: remove start filtration from flushTo (part deux)
We have already searched for the start point, the start filter check
is paranoia that removes out-of-order entries that we are undoubtably
interested in.  Out-of-order entries occur under reader pressure, as
the writer gets pushed back from in-place sorted order and lands it
at the end for the reader to pick it up.  If this occurred during a
batch run or a logger thread wakeup, the entry could be filtered out
and never output to the reader.

We have to treat exact finds for start in the list as terminal when
we search as they represent restarts, depending on the fact that it
is impossible to have the exact same time reported in two log entries
or requested from a batched reader.  This does break down if a log
entry has xxxxxx000 nanoseconds reported, we fix that by making sure
we never log such a case and slip it by a ns.

Found one case where logcat.tail_time* tests failed which was fixed
with this adjustment.

Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests
Bug: 38046067
Bug: 37791296
Bug: 38341453
Change-Id: I4dd2e2596dd67b8d602160dd79661e01805227a9
2017-05-19 07:15:38 -07:00
Narayan Kamath
49e5109de5 Merge "tombstoned: Support java trace dumps." am: 24bccbcf98
am: eaff9c981c

Change-Id: I8b01cfc2fded72aef274e620c44970e0f67d146d
2017-05-19 10:39:18 +00:00
Narayan Kamath
eaff9c981c Merge "tombstoned: Support java trace dumps."
am: 24bccbcf98

Change-Id: I21b66d35d6276d95e160054c0afa6386232d1f6b
2017-05-19 10:33:47 +00:00
Narayan Kamath
24bccbcf98 Merge "tombstoned: Support java trace dumps." 2017-05-19 10:29:37 +00:00
Dan Albert
def4aae26d Fix test following -p removal.
Just use the environment variable.

Test: nose2
Bug: None
Change-Id: I020c737f8aa7416b46794ce387a12f7959a9ca2a
2017-05-19 00:30:51 -07:00
Elliott Hughes
8cdef644b3 Merge "init should #include <sys/sysmacros.h>" am: 64e3f88d69
am: 29b41dce6d

Change-Id: I75504f62d5e1a5f897c59b6a480ec726fb4494de
2017-05-18 22:59:27 +00:00
Mark Salyzyn
2cf243528f libcutils: fs_config: remove aliases
Covered by the code automatically now.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Iad6ba65e023845aaea7a181b277a7383c44bd937
2017-05-18 15:56:54 -07:00
Mark Salyzyn
fa39110a8f libcutils: fs_config test report aliases
Instead of requiring aliases, let's report when we see
system/<partition>/ all by itself, or in the company of the alias
<partition>/.  Report if we see duplicate entries.  Add checking for
overrides as well.  Report any simple corruptions in internal table
or in the override files.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ia6a7e8c9bc9f553d0c1c313937b511b2073318a9
2017-05-18 15:55:48 -07:00
Elliott Hughes
29b41dce6d Merge "init should #include <sys/sysmacros.h>"
am: 64e3f88d69

Change-Id: I1673d5b22668e0e6e2a0ee83e42dbdd904dcbdb8
2017-05-18 22:55:28 +00:00
Mark Salyzyn
2d37797b68 libcutils: fs_config: alias "system/<partition>/" to "<partition>/"
For the known partitions entrenched in the build system: vendor, oem
and odm only. We will alias entries that reference system/<partition>
and <partition>/ so that if either are specified, the rule will apply
to both possible paths.

Test: gTest libcutils-tests
Bug: 37703469
Change-Id: Ida9405cbed323489a3d0599c1645e9be2c7b9d08
2017-05-18 15:54:31 -07:00
Treehugger Robot
64e3f88d69 Merge "init should #include <sys/sysmacros.h>" 2017-05-18 22:47:59 +00:00
Keun-young Park
939f0b03e8 Merge "add ueventd to shutdown critial process" am: 7fe28d9d9a
am: aa3c4e9def

Change-Id: I0165a3db66d06e9b0314fda3b02171024d63b060
2017-05-18 21:10:20 +00:00
Keun-young Park
aa3c4e9def Merge "add ueventd to shutdown critial process"
am: 7fe28d9d9a

Change-Id: Iee1acf30088b8ee446e4c49281bd07a8833492e2
2017-05-18 21:05:50 +00:00
Keun-young Park
7fe28d9d9a Merge "add ueventd to shutdown critial process" 2017-05-18 20:59:50 +00:00
Keun-young Park
7264bee975 add ueventd to shutdown critial process
- In some devices, some drivers still try to load firmware while shutting
  down, and crashes the kernel. So keep ueventd to prevent such case.

bug: 38203024
Test: reboots
Change-Id: I4f1910723254ccb69f8e9c78e8727fbd8c7eed3e
2017-05-18 20:58:10 +00:00
Josh Gao
36dadca9f0 adb: boolify check_header and check_data.
Test: grep
Change-Id: I8d0c60e500bba855a1afc0877253262246c07fef
2017-05-18 13:40:13 -07:00
Josh Gao
16c5a133ab adb: redirect stdout/stderr before initializing usb.
Avoid printing USB logging to the console.

Test: None
Change-Id: Ib8ad0ad6c559689d0f8feec2e66b42380edd26fb
2017-05-18 13:38:50 -07:00
Tom Cherry
a4c0591513 Merge "fs_mgr: convert libfs_mgr to Android.bp" am: 3d33dae74d
am: 4c4f1f99be

Change-Id: I78210488ae0b19dae8afd3c474be2fdc0e3d8465
2017-05-18 20:31:28 +00:00
Tom Cherry
4c4f1f99be Merge "fs_mgr: convert libfs_mgr to Android.bp"
am: 3d33dae74d

Change-Id: Ic3ce42713289359d90d9ba494be68d27c4f073e8
2017-05-18 20:26:31 +00:00
Tom Cherry
3d33dae74d Merge "fs_mgr: convert libfs_mgr to Android.bp" 2017-05-18 20:18:00 +00:00
Elliott Hughes
51056c49d2 init should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I6428a6344a3ce649bd03ff9e9b0f156425c67f0c
2017-05-18 09:13:15 -07:00
Narayan Kamath
922f6b22fc tombstoned: Support java trace dumps.
The changes here involve :
- Creating and opening a new socket to receive trace dump requests on. Having
  different sockets allows us to install different sets of access control rules.

- A minor refactor to allow us to share common pieces of implementation
  between the java and native dumping code. This will also allow us to
  add a unit test for all file / directory related logic.

There are two java trace specific additions here :
- We use SO_PEERCRED instead of trusting the PID written to the seocket
  because requests come in from untrusted processes.
- Java trace dumps are not interceptible.

kJavaTraceDumpsEnabled is set to false for now but the value of the flag
will be flipped in a future change.

Bug: 32064548
Test: Manual; Currently working on a unit_test for CrashType.

Change-Id: I1d62cc7a7035fd500c3e2b831704a2934d725e35
2017-05-18 12:01:14 +00:00
Dmitry Shmidt
a4866d9e8b Merge "libnetutils: Rename dhcptool to dhcpdbg" am: 9397adabd8
am: 482ca8ee38

Change-Id: I71e9d86d93b002dbfa0a1eaa61393031fae87a38
2017-05-18 01:27:14 +00:00
Dmitry Shmidt
482ca8ee38 Merge "libnetutils: Rename dhcptool to dhcpdbg"
am: 9397adabd8

Change-Id: Ic41199dca7815df78dfdde9fa89be64ca0ec9729
2017-05-18 01:23:48 +00:00
Treehugger Robot
9397adabd8 Merge "libnetutils: Rename dhcptool to dhcpdbg" 2017-05-18 01:11:32 +00:00
Ruchi Kandoi
12ab08b182 Merge "Add the functionality for logging counters." am: 7868a0d82f
am: d94b674d58

Change-Id: I7035a5d20bbf6afb35dad2bacd8d416e8c493f8a
2017-05-17 23:10:48 +00:00
Ruchi Kandoi
d94b674d58 Merge "Add the functionality for logging counters."
am: 7868a0d82f

Change-Id: Ib3afc3d2acd67c750bec4f64d2a831a495b5fd3a
2017-05-17 23:07:16 +00:00
Treehugger Robot
7868a0d82f Merge "Add the functionality for logging counters." 2017-05-17 22:59:55 +00:00
Mark Salyzyn
ef53957a7e Merge "Revert "logd: remove start filtration from flushTo"" am: 8cfd2971ec
am: f111b04f15

Change-Id: Iec53f8ef86ca9edb021f279ef0eeaff0d0a2a26c
2017-05-17 21:44:38 +00:00
Mark Salyzyn
f111b04f15 Merge "Revert "logd: remove start filtration from flushTo""
am: 8cfd2971ec

Change-Id: Ic52a26216b04ee36b15f4665d9c7741079e192ea
2017-05-17 21:41:08 +00:00
Treehugger Robot
8cfd2971ec Merge "Revert "logd: remove start filtration from flushTo"" 2017-05-17 21:30:20 +00:00
David Zeuthen
984757365f Merge "adb: Allow disabling verity on eng builds when using AVB." am: 7ce0f00c08
am: 1ceea342d5

Change-Id: I000b7f411fef7e3b7c170493b94078ff7c5c3f34
2017-05-17 21:20:25 +00:00
David Zeuthen
1ceea342d5 Merge "adb: Allow disabling verity on eng builds when using AVB."
am: 7ce0f00c08

Change-Id: I84768c516232d6f5921f5a5d43f9aa169128ca58
2017-05-17 21:17:06 +00:00
Treehugger Robot
7ce0f00c08 Merge "adb: Allow disabling verity on eng builds when using AVB." 2017-05-17 21:11:46 +00:00
Elliott Hughes
ce49fc9d0a Merge "libcutils should #include <sys/sysmacros.h>" am: c3b931aad3
am: 2668f35d31

Change-Id: If123865b83fd198055d4344bb9cc58376ccc5cd6
2017-05-17 20:51:04 +00:00
Elliott Hughes
2668f35d31 Merge "libcutils should #include <sys/sysmacros.h>"
am: c3b931aad3

Change-Id: Ifbd963ac88e5d4b2d60d48616064a99753f62e3e
2017-05-17 20:47:03 +00:00
Treehugger Robot
c3b931aad3 Merge "libcutils should #include <sys/sysmacros.h>" 2017-05-17 20:39:39 +00:00
Ruchi Kandoi
b63072e4d0 Add the functionality for logging counters.
Also correct clang-format for libmetricslogger

Test: Run libmetriclogger_test
Change-Id: If61f0bdc394a43e249ec4691da70175eeaf4cec6
2017-05-17 13:18:16 -07:00
Mark Salyzyn
eb45db2cf4 Revert "logd: remove start filtration from flushTo"
Regressed by introducing too much overlap in the results.

This reverts commit 982ad208b5.

Bug: 38341453
Change-Id: I9d630a6b9f3e464f523424b640090f7e268da9bd
2017-05-17 19:55:12 +00:00
Elliott Hughes
6903e671eb Merge "Fix "fastboot flashing"." am: 67529d29ca
am: ccf078da71

Change-Id: Idd6aa61bf830ff5e5086388a6ea32b76ed78aea1
2017-05-17 18:54:13 +00:00
Elliott Hughes
ccf078da71 Merge "Fix "fastboot flashing"."
am: 67529d29ca

Change-Id: I53f96e1540333082ff71f89baa1b98b745ca1cbc
2017-05-17 18:50:57 +00:00
Elliott Hughes
d77b537732 libcutils should #include <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I8ca21a74e2856fde09c284aee1343c627d8381e6
2017-05-17 11:36:51 -07:00
David Zeuthen
abddbc2cdf adb: Allow disabling verity on eng builds when using AVB.
Unlike VB1.0, if a device is using AVB then dm-verity is used on any
build (userdebug, eng, etc.). Therefore, we should allow disabling
verity on any build (except USER), not just userdebug. This bug was
pointed out in https://android-review.googlesource.com/#/c/371372/

Bug: 34124301
Test: Manually tested on -eng build on device using AVB.
Change-Id: I314550c13d7458d5d1ef68eb06f98849e11fbe15
2017-05-17 14:28:47 -04:00
Treehugger Robot
67529d29ca Merge "Fix "fastboot flashing"." 2017-05-17 18:25:23 +00:00