Commit graph

29917 commits

Author SHA1 Message Date
Elliott Hughes
ccf078da71 Merge "Fix "fastboot flashing"."
am: 67529d29ca

Change-Id: I53f96e1540333082ff71f89baa1b98b745ca1cbc
2017-05-17 18:50:57 +00:00
Treehugger Robot
67529d29ca Merge "Fix "fastboot flashing"." 2017-05-17 18:25:23 +00: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
Josh Gao
425aefdcf0 adb: libusb: recognize devices with multiple interfaces.
A bug was introduced by commit 8bf37d7a wherein we accidentally only
look at the first interface of a device when checking whether a USB
device was an ADB device or not.

Bug: http://b/38201318
Test: none
Change-Id: I8e8e0963c77cd2cb03538d926ab735f4b57e52b7
2017-05-12 17:08:50 -07:00
Josh Gao
3f60a968e3 adb: libusb: wait for devices to become accessible.
Android's host linux libusb uses netlink instead of udev for device
hotplug notification, which means we can get hotplug notifications
before udev has updated ownership/perms on the device.

When detecting a new device, poll the device file for a while until we
can access it, before trying to open it.

Bug: http://b/38170349
Test: manually incrased timeout and chmodded a device betwen 0 and 664
Change-Id: I3c714f630940df02b407442592301e2bbb3d9653
2017-05-12 17:08:50 -07:00
Josh Gao
6da1cd49b5 adb: libusb: switch to hotplug for device detection.
Switch from polling in a loop to using libusb's hotplug API to detect
when devices arrive and leave. Use this to remove devices that were
inaccessible when they're unplugged.

Bug: http://b/38170349
Test: plugged in device
Change-Id: Id157412eb46834debecb0cd45b47b1ced50c2274
2017-05-12 17:08:50 -07:00
Josh Gao
723258a4c7 adb: silence noise.
Remove logging statements that don't provide any benefit.

Test: none
Change-Id: Ib7c26fbdb019f4d6bbce2b7fb192cb5e6066e53f
2017-05-12 17:08:50 -07:00
Mark Salyzyn
236daaf478 Merge "liblog: tests: crashes in logcat.descriptive"
am: f218210f6e

Change-Id: I4efdd4e727d32f06f2c352c0c211cc51b5bbe0e9
2017-05-12 22:11:53 +00:00
Treehugger Robot
f218210f6e Merge "liblog: tests: crashes in logcat.descriptive" 2017-05-12 21:58:22 +00:00
Mark Salyzyn
f7690d9196 liblog: tests: crashes in logcat.descriptive
scanTagLine has some loops that do not check for a terminating nul,
problematic for responses from the logger via __getEventTag.

Test: gTest logcat-unit-tests --gtest_filter=*.descriptive
Bug: 37791296
Change-Id: Ib4e900b765b407bdee43e009d6625fe289863ddc
2017-05-12 13:07:08 -07:00
Tom Cherry
ee178d6976 Merge "Enable libprocessgroup on host bionic"
am: 44673da3eb

Change-Id: I88fed3b3b93d3102fa6322b2254e18fffe350d51
2017-05-12 02:31:39 +00:00
Treehugger Robot
44673da3eb Merge "Enable libprocessgroup on host bionic" 2017-05-12 02:28:06 +00:00
David Zeuthen
fb4d8b0bac Merge "fs_mgr: Update for new libavb API."
am: 5ed7d39857

Change-Id: Iaccfaae0cc8884ef6352c4c338690a31a8d18f75
2017-05-12 01:36:19 +00:00
Treehugger Robot
5ed7d39857 Merge "fs_mgr: Update for new libavb API." 2017-05-12 01:17:45 +00:00
Tom Cherry
efa81080fd Enable libprocessgroup on host bionic
Bug: 31559095

Test: Build
Change-Id: I1ee9fb492137c6c16f0d02586393837616127972
2017-05-11 17:55:04 -07:00
Elliott Hughes
c9d545855a Merge "Fix "fastboot oem"."
am: dbe9ab1074

Change-Id: I71c0d2eceaf4153f853196d07688558b3979a033
2017-05-12 00:42:37 +00:00
Treehugger Robot
dbe9ab1074 Merge "Fix "fastboot oem"." 2017-05-11 23:40:59 +00:00
Mark Salyzyn
1423041905 Merge "logd: validate and fill in socket credentials"
am: 17254f59a2

Change-Id: I987d058e7245f5cb9a3603b3f52f7fa947d5dea7
2017-05-11 22:14:10 +00:00
Mark Salyzyn
ed1e53fc77 Merge "logcat: test: inject for *.event_tag_filter"
am: 2841b4efe0

Change-Id: Ic1fb5ed5bb304ab4a6fa3e55414a07e73c5d546b
2017-05-11 22:13:48 +00:00
Elliott Hughes
29d5d7d718 Fix "fastboot oem".
Broken by d6365a7052.

Bug: https://issuetracker.google.com/38216236
Test: "fastboot oem uart enable"
Change-Id: I672d5b96bb16fd77e7af61115b8a38606c691ea8
2017-05-11 15:05:13 -07:00
Treehugger Robot
17254f59a2 Merge "logd: validate and fill in socket credentials" 2017-05-11 21:49:30 +00:00
Treehugger Robot
2841b4efe0 Merge "logcat: test: inject for *.event_tag_filter" 2017-05-11 21:48:38 +00:00