Commit graph

30037 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Dmitry Shmidt
d3b2d4ff2e libnetutils: Rename dhcptool to dhcpdbg
Also print warning that IP will not allow full connectivity.

Test: Manual

Change-Id: I264c478f07236108a01e766c5264897c2000f008
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-05-17 10:47:28 -07:00
Chris Wren
d28d543c48 Merge "port metrics_logger to v2 format"
am: 75a8233c7e

Change-Id: Ia17401c174b3ecbd7f45c141d192987e75d85bdd
2017-05-17 17:25:20 +00:00
Treehugger Robot
75a8233c7e Merge "port metrics_logger to v2 format" 2017-05-17 17:21:55 +00:00
Chris Wren
936fbbdef8 port metrics_logger to v2 format
Bug: 34450377
Test: manual, needs to be a cross-language test
Change-Id: Ib89a48f2c52428deff863b0c28f3c10e7333c8a2
(cherry picked from commit 081492552c)
2017-05-17 10:18:26 -07:00
Dmitry Shmidt
1f47a6ba48 Merge "libnetutils: Restore dhcptool"
am: b03d5a4ba6

Change-Id: I3c348f92ffdbaaac1bbb66a6f9d89fca7a65ef32
2017-05-16 23:17:53 +00:00
Treehugger Robot
b03d5a4ba6 Merge "libnetutils: Restore dhcptool" 2017-05-16 23:13:57 +00:00
Dmitry Shmidt
bc592761c9 libnetutils: Restore dhcptool
Despite it is not used for network management, it is
very convenient tool for wifi bringup and debugging.

Test: Manual

Change-Id: I045301acc2dd15d0e68d6b99c8e214865f19ebad
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-05-16 14:24:18 -07:00
Elliott Hughes
70b0e94f80 Merge "Remove libbase's trivial libutils-headers dependency."
am: 337b4dd661

Change-Id: I929930dbe7e013d8be608b06c76b5af33b527351
2017-05-16 17:59:06 +00:00
Treehugger Robot
337b4dd661 Merge "Remove libbase's trivial libutils-headers dependency." 2017-05-16 17:51:14 +00:00
Mark Salyzyn
27d54dd4ac Merge "logd: remove start filtration from flushTo"
am: c8c49988b1

Change-Id: I7be86455b6bb3930e8e37810208f237df202af31
2017-05-16 15:21:23 +00:00
Treehugger Robot
c8c49988b1 Merge "logd: remove start filtration from flushTo" 2017-05-16 15:11:34 +00:00
Bowgo Tsai
d1a2aac294 Merge "fs_mgr: support different dm-verity error modes"
am: b9b95ee3a9

Change-Id: I2761343b66be35c01ee4365f2ff004b7f912a117
2017-05-16 01:09:30 +00:00
Treehugger Robot
b9b95ee3a9 Merge "fs_mgr: support different dm-verity error modes" 2017-05-16 01:04:34 +00:00
Elliott Hughes
282ec458be Remove libbase's trivial libutils-headers dependency.
Bug: N/A
Test: builds
Change-Id: I59eb464a0127564a42775bf19b516ad8a53ee235
2017-05-15 17:31:15 -07:00
Elliott Hughes
1eec97af07 Fix "fastboot flashing".
...without breaking "fastboot oem". Turns out the bootloader actually needs
to know whether it's getting a "flashing" or "oem" command.

Bug: http://b/38321935
Test: "fastboot flashing unlock" "fastboot oem uart enable"
Change-Id: I2b3c0b42b01e3c884aa794fa273034a366985089
2017-05-15 16:53:53 -07:00
Mark Salyzyn
6f9051ea1b Merge "logcat: -v thread help missing"
am: 3cfc1ab89d

Change-Id: I7a04e1da3697de84f73e3f831e220299a483b7fb
2017-05-15 22:57:50 +00:00
Treehugger Robot
3cfc1ab89d Merge "logcat: -v thread help missing" 2017-05-15 22:52:29 +00:00
Mark Salyzyn
982ad208b5 logd: remove start filtration from flushTo
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.

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
Change-Id: Icbde6b33dca7ab98348c3a872793aeef3997d460
2017-05-15 15:13:20 -07:00
Josh Gao
66ca192ac3 Merge changes I8e8e0963,I3c714f63,Id157412e,Ib7c26fbd
am: 55ddb99527

Change-Id: If947b8e8efd9ad873defabe3f6fea3caacf394ed
2017-05-15 20:51:16 +00:00
Josh Gao
55ddb99527 Merge changes I8e8e0963,I3c714f63,Id157412e,Ib7c26fbd
* changes:
  adb: libusb: recognize devices with multiple interfaces.
  adb: libusb: wait for devices to become accessible.
  adb: libusb: switch to hotplug for device detection.
  adb: silence noise.
2017-05-15 20:45:06 +00:00
Mark Salyzyn
c74f8d91a5 logcat: -v thread help missing
KISS documentation for -v thread added

Test: manual logcat -v --help
Bug: 37030280
Change-Id: If1ad9d3862a68dfe570b524c36efd4fae5b03262
2017-05-15 13:41:16 -07:00
Mark Salyzyn
daae7558e8 Merge "logd: logcat --clear respect pruneMargin"
am: 3d0186b97e

Change-Id: If4e8c488530dc4ef20129806c5c84ffb68d0a40b
2017-05-15 20:35:17 +00:00
Treehugger Robot
3d0186b97e Merge "logd: logcat --clear respect pruneMargin" 2017-05-15 20:27:06 +00:00
Dmitry Shmidt
0f0ee1beeb Merge "fastboot: Add DTS partition support for 'flashall' command"
am: b8e428110b

Change-Id: I80bd3be921d7091ad9d5d7e1b3f1cb4cc03084a6
2017-05-15 19:35:41 +00:00
Treehugger Robot
b8e428110b Merge "fastboot: Add DTS partition support for 'flashall' command" 2017-05-15 19:28:29 +00:00
Dmitry Shmidt
de8c08c612 fastboot: Add DTS partition support for 'flashall' command
Hikey960 has DTS partiton for DT image

Test: Manual
Bug: 38310807

Change-Id: I9f8e9b27ed40ebdd225f3c4e4b30f53e7cdb5ee7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-05-15 10:25:31 -07:00
Mark Salyzyn
0878a7c167 logd: logcat --clear respect pruneMargin
While a reader is present, consider it a success, and not busy, if a
buffer is pruned down to pruneMargin plus one second of additional
margin of logspan.  If not busy, no need to trigger any mitigations
regarding the readers, or to report any errors.

Side Effects are we no longer mitigate the reader when performing
chatty filtration. This is a positive side effect because we were
getting --wrap wakeups that seemed premature.

Add kickMe() and isBusy() methods to ease maintenance and uniformity
of actions.

Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
Test: manual: 'logcat -b all -c' repeat in a loop, at various logging
      load levels, simultaneously 'logcat -b' all in another session.
Bug: 38046067
Change-Id: I3d0c8a2d416a25c45504eda3bfe70b6f6e09ab27
2017-05-15 07:01:42 -07:00
Bowgo Tsai
6879cc1e2e fs_mgr: support different dm-verity error modes
AVB is going to support different modes to handle dm-verity errors.
See the following CL for more details:

  - https://android-review.googlesource.com/#/c/392873/

The verity mode is controlled by bootloader through androidboot.veritymode in
kernel command line. fs_mgr should read the value from there and specify the
corresponding flag when loading dm-verity table into kernel.

Also removes some unused #include libraries.

Bug: 38157502
Test: Manually tested different dm verity modes:
      - "restart_on_corruption" (androidboot.veritymode=enforcing)
      - "ignore_corruption" (androidboot.veritymode=logging)
      - None, default mode is EIO in kernel (androidboot.veritymode=eio)

Change-Id: I80e1e817a148b54fb67ba58112d376dc2cf37c98
2017-05-13 13:24:12 +08:00
Elliott Hughes
dce08d5572 Merge "Add libkeyutils."
am: 81824ebf1f

Change-Id: I096f8f0333313ca1425d6d285b07b9c199c1d90e
2017-05-13 00:32:08 +00:00
Elliott Hughes
81824ebf1f Merge "Add libkeyutils." 2017-05-13 00:28:28 +00:00