Commit Graph

32146 Commits

Author SHA1 Message Date
Mark Salyzyn f4dbbea20c Merge changes I596b8706,I262c0377,Iaf2bee97 am: 030b4d1b08 am: 3447f72d43
am: fa80674a19

Change-Id: I94bad3a2c64194c2377de4277c066bbd3030f823
2017-04-14 21:43:15 +00:00
Mark Salyzyn fa80674a19 Merge changes I596b8706,I262c0377,Iaf2bee97 am: 030b4d1b08
am: 3447f72d43

Change-Id: If957237f25beff6343f726ba1723b3486dbaf8dd
2017-04-14 21:39:34 +00:00
Mark Salyzyn 3447f72d43 Merge changes I596b8706,I262c0377,Iaf2bee97
am: 030b4d1b08

Change-Id: Id2f09fb60bc772a55206c70b3385fa0651e83233
2017-04-14 21:37:07 +00:00
Mark Salyzyn 030b4d1b08 Merge changes I596b8706,I262c0377,Iaf2bee97
* changes:
  liblog: allow event tags to include some punctuations
  liblog: logprint supports number of seconds time event field
  logcat: test: standardize rest() to let logs land when injecting
2017-04-14 21:33:23 +00:00
Mark Salyzyn 5bc976b112 Merge "logd: statistics truncate name" am: 42d524f73d am: 7f9719be48
am: 00c87bcf73

Change-Id: I81de78de58de4809004a42a3b352bd25780d5e05
2017-04-14 21:05:03 +00:00
Mark Salyzyn 00c87bcf73 Merge "logd: statistics truncate name" am: 42d524f73d
am: 7f9719be48

Change-Id: I3751a3acb99562a20a1cdfe728e4e3fe210c69f9
2017-04-14 20:56:50 +00:00
Mark Salyzyn 7f9719be48 Merge "logd: statistics truncate name"
am: 42d524f73d

Change-Id: I0070356dbf0fc18babb3720ed038b5db2245e295
2017-04-14 20:54:47 +00:00
Treehugger Robot 42d524f73d Merge "logd: statistics truncate name" 2017-04-14 20:48:43 +00:00
Josh Gao 5d6593c5f7 Merge changes from topics 'adb_thread', 'adb_loopback' am: 0301b3217b am: 750dfee974
am: da1f886ed8

Change-Id: I0a20514a043312c069e81166cd7b980ce3e54490
2017-04-14 20:14:43 +00:00
Josh Gao 86a55ba49d adb: kill adb_thread_{create, join, detach, exit}. am: e1dacfc1b6 am: d56eebd6c2
am: ae80841ac7

Change-Id: I0a28c88e5735f73dc1a833764aab70a59ae8bbc9
2017-04-14 20:14:34 +00:00
Josh Gao 368e043a7b adb: don't try to resolve 'localhost' am: 46de1d7f03 am: 32d7ede78b
am: 677a73e5f1

Change-Id: I3e939fbea6cb3f3b7cf36040a81655d5ef0acae2
2017-04-14 20:14:26 +00:00
Josh Gao da1f886ed8 Merge changes from topics 'adb_thread', 'adb_loopback' am: 0301b3217b
am: 750dfee974

Change-Id: I0553a8c70ac8a04bd2a32138e2bdd5f63e894258
2017-04-14 20:10:04 +00:00
Josh Gao ae80841ac7 adb: kill adb_thread_{create, join, detach, exit}. am: e1dacfc1b6
am: d56eebd6c2

Change-Id: Ifde4ae5035c4caf5df66c640bfc28e163dd60b5a
2017-04-14 20:09:58 +00:00
Josh Gao 677a73e5f1 adb: don't try to resolve 'localhost' am: 46de1d7f03
am: 32d7ede78b

Change-Id: If87595c35e362f1fa5c34cba4d7bc1766ec51cd0
2017-04-14 20:09:53 +00:00
Josh Gao 750dfee974 Merge changes from topics 'adb_thread', 'adb_loopback'
am: 0301b3217b

Change-Id: I18578729590be59de526dbda364627b28503a092
2017-04-14 20:08:12 +00:00
Josh Gao d56eebd6c2 adb: kill adb_thread_{create, join, detach, exit}.
am: e1dacfc1b6

Change-Id: I5e0324b33d40f873d196946cee7591de0b7b949c
2017-04-14 20:08:04 +00:00
Josh Gao 32d7ede78b adb: don't try to resolve 'localhost'
am: 46de1d7f03

Change-Id: Ie419c5ddd80938760d7eaa3f50605c9874ca33d7
2017-04-14 20:07:56 +00:00
Josh Gao 0301b3217b Merge changes from topics 'adb_thread', 'adb_loopback'
* changes:
  adb: statically link libbase into the tests.
  adb: kill adb_thread_{create, join, detach, exit}.
  adb: don't try to resolve 'localhost'
2017-04-14 20:04:04 +00:00
Mark Salyzyn 01bdb04be6 liblog: allow event tags to include some punctuations
event_log_tag parser complains about a period (.) in the name,
we would consider such an enhancement to the tag names possible.
I expect we would want to be able to support alphanumerics,
underscore (_), period (.), minus (-), at (@) and comma (,) for
starters as they are present in the other text log buffer tags.

We introduce a local endOfTag function that is used during parsing and
during android_lookupEventTagNum for submitting new tags.  This
function caused us to enforce const char more closely.  By filtering
in both places we resolve an issue that could have plagued us if
garbage requests were made.

Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
Bug: 31456426
Change-Id: I596b8706e843719ddac07ec40e1cd2875c214bed
2017-04-14 12:56:06 -07:00
Mark Salyzyn 5768d3d976 liblog: logprint supports number of seconds time event field
Add s to report time in seconds.  The time could be a period, duration
or monotonic, expanded to seconds, minutes, hours and days.  gTest has
to acquire a dynamic tag allocation as there are no users of this
feature yet.

Looking to the future, audio media logging has binary content similar
to the binary events structures Android logging uses and they have
a definition of a duration field in their internal binary logging, so
may be of use when we unify the logs.

Test: gTest logcat-unit-tests --gtest_filter=*.descriptive
Bug: 31456426
Change-Id: I262c03775983b3bc7b1b00227ce2bb2b0f357bec
2017-04-14 12:54:25 -07:00
Mark Salyzyn 46186a7238 logcat: test: standardize rest() to let logs land when injecting
Add an internal rest() function to set the standard for how long we
should wait for a log message to land end to end into the logs.  Add
a retry on -EBUSY for all descriptive tests along with a rest() after
log injection so the tests can try to survive heavy Denial Of Service
(DOS) loads.  Some of the resting was done at a coarse 1 second, when
200ms will do just fine.

Fix a few pesky issues surrounding test reliability and correctness:
- stdint.h include missing.
- missing a logcat_executable, means logcatd.descriptive testing was
  testing logcat instead.
- count of interfering tests is 3 now: logcat, liblogcat and logcatd, if
  they all run in the same PID, we have to not fail.
- Added a missed opportunity to add uniqueness to logcat.descriptive sync
  test.

Test: gTest logcat-unit-tests
Bug: 31456426
Change-Id: Iaf2bee97878957f654613bb2e78e32379bb8d1b7
2017-04-14 12:50:59 -07:00
Steven Moreland dddd275b2a Merge "libsync: vendor_available" into oc-dev
am: 54cd7e0d2c

Change-Id: If04cdfb69741fec75323881b2d6feddd5c1b919c
2017-04-14 19:47:56 +00:00
TreeHugger Robot 54cd7e0d2c Merge "libsync: vendor_available" into oc-dev 2017-04-14 19:36:33 +00:00
Steven Moreland c5f60563cc Merge "libutils: include what you use" into oc-dev
am: 2679d09d48

Change-Id: I52420aa2efbd1e063d089fe793b84d5d0364575c
2017-04-14 19:01:56 +00:00
TreeHugger Robot 2679d09d48 Merge "libutils: include what you use" into oc-dev 2017-04-14 18:58:01 +00:00
Steven Moreland a89bf6f569 libbase: fix build breakage
am: 72b9d28423

Change-Id: Iaa42db457bcac149ab0833fc15911aaeecaeb328
2017-04-14 18:31:09 +00:00
Steven Moreland 72b9d28423 libbase: fix build breakage
Two changes were merged at the same time that conflicted.

Test: builds
Change-Id: Ia6c730804cd5a3b2655e6d69b8e4f346d198dabb
2017-04-14 11:23:36 -07:00
Steven Moreland 04ad6ea1eb Merge "libbacktrace: make vendor_available" into oc-dev
am: cc4226e5ff

Change-Id: I8bf228b0cd91c690ff93e1880dcc892fb75baec4
2017-04-14 18:04:10 +00:00
Steven Moreland 9aebb1e0f5 Merge "libbase: make vendor_available" into oc-dev
am: 129eb45b0d

Change-Id: Ia6fe3fdf40397420f57aa016e5a647631e46804b
2017-04-14 18:03:57 +00:00
Steven Moreland e36b83f63c Merge "libutils: export libbacktrace headers" into oc-dev
am: 7225b34bda

Change-Id: I1675518965e0de45a29b9ff3bc643601b6b4866a
2017-04-14 18:03:39 +00:00
TreeHugger Robot cc4226e5ff Merge "libbacktrace: make vendor_available" into oc-dev 2017-04-14 17:59:29 +00:00
TreeHugger Robot 129eb45b0d Merge "libbase: make vendor_available" into oc-dev 2017-04-14 17:59:15 +00:00
TreeHugger Robot 7225b34bda Merge "libutils: export libbacktrace headers" into oc-dev 2017-04-14 17:57:23 +00:00
Steven Moreland 8da9613b3f libutils: include what you use
These includes are included transitively by liblog, but not by the VNDK
version of liblog.

Bug: 33241851
Test: links with BOARD_VNDK_VERSION := current
Change-Id: Ide4aee3cacad2a2bf6bd0cbdf0254c6c245f4020
2017-04-14 17:06:33 +00:00
Steven Moreland e4070ba602 Merge "libbase: add libbase_headers" into oc-dev
am: 3a5394edef

Change-Id: I9cc773db0c323f101957747715eab1bd1b701496
2017-04-14 16:16:50 +00:00
TreeHugger Robot 3a5394edef Merge "libbase: add libbase_headers" into oc-dev 2017-04-14 16:03:40 +00:00
Steven Moreland 5b099bc1c9 libsystem_headers: export libaudio_system_headers
am: c83ea95654

Change-Id: Ifc63b3b88ed7330db99dc712d2dc590d71440a50
2017-04-14 15:42:01 +00:00
Todd Poynor 6b2a0c21a5 Merge changes I6a29c678,I76212f65 am: e771b69e72 am: 8e7ba95674
am: d2a6783e25

Change-Id: I1fe4daee66dac02fd424d0438d771d93af914f84
2017-04-14 14:41:52 +00:00
Todd Poynor d2a6783e25 Merge changes I6a29c678,I76212f65 am: e771b69e72
am: 8e7ba95674

Change-Id: If8aa875c3238da829a2ed8ccc52598386c0f63af
2017-04-14 14:34:28 +00:00
Todd Poynor 8e7ba95674 Merge changes I6a29c678,I76212f65
am: e771b69e72

Change-Id: Icfa83c8939b8fc9fc43f47051d0e42ce9111f48b
2017-04-14 14:28:00 +00:00
Treehugger Robot e771b69e72 Merge changes I6a29c678,I76212f65
* changes:
  reboot: fix owner and permissions of last_reboot_reason file
  init.rc: create /data/misc/reboot owned by system
2017-04-14 14:16:20 +00:00
Steven Moreland 8f56c1ecd7 libbase: add libbase_headers
Test: can include headers in other soong modules
Bug: 33241851
Change-Id: Ie3d11d1559f5aae46125695fd1f3a63da8e429ae
2017-04-14 00:55:36 -07:00
Bowgo Tsai 4d70aa5541 Merge changes from topic 'avb-early-mount' am: d7381375bb am: 04989a7a4b
am: 0b2d83a64b

Change-Id: I3911b1be010b7f79f2b3975a9264eb914044392f
2017-04-14 06:40:58 +00:00
Steven Moreland 4c0e956c76 libbacktrace: make vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 33241851
Test: build and flash internal marlin
Test: m -j libbacktrace
Test: build with BOARD_VNDK_VERSION := current
Change-Id: Idab4880e011416ebc40b225205c30fb5ed8661db
2017-04-13 23:37:12 -07:00
Bowgo Tsai 0b2d83a64b Merge changes from topic 'avb-early-mount' am: d7381375bb
am: 04989a7a4b

Change-Id: I45d89c806076842ee75a772b1a8bbba2157eb46c
2017-04-14 06:34:00 +00:00
Steven Moreland d0b26edf30 libsync: vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 33241851
Test: build and flash internal marlin
Test: m -j libsync
Test: build with BOARD_VNDK_VERSION := current
Change-Id: I5b23d2c1f41b842e5a9b7ea257921133b80c3f98
2017-04-13 23:28:39 -07:00
Bowgo Tsai 04989a7a4b Merge changes from topic 'avb-early-mount'
am: d7381375bb

Change-Id: I842610d5812420b93ef43d008f29abff83d9206c
2017-04-14 06:27:02 +00:00
Treehugger Robot d7381375bb Merge changes from topic 'avb-early-mount'
* changes:
  fs_mgr: support AVB in fs_mgr_update_verity_state()
  init: support early_mount with vboot 2.0 (external/avb/libavb)
2017-04-14 06:20:42 +00:00
Steven Moreland d3b4b2c96f libutils: export libbacktrace headers
This is used in CallStack.h.

Test: m -j libutils
Test: links
Test: trying to compile with BOARD_VNDK_VERSION := current
Bug: 33241851
Change-Id: If7258e7b38000a72fd520f725030fb0038f90167
2017-04-13 21:11:28 -07:00
Bowgo Tsai aaf70e77dc fs_mgr: support AVB in fs_mgr_update_verity_state()
fs_mgr_update_verity_state() is invoked by 'verity_update_state' in
init.rc. It will then set property "partition.system.verified" and
"partition.vendor.verified" to verify_mode. We should support this for
AVB as well.

Also change the order of static libs in init to fix the build error
after this change:
  system/extras/ext4_utils/ext4_crypt.cpp:69: error: undefined reference to 'property_get'

Bug: 35416769
Test: Mount /system and /vendor with vboot 2.0 (AVB), check the following properties exist.
      - [partition.system.verified]: [2]
      - [partition.vendor.verified]: [2]
Test: Mount /system and /vendor with vboot 1.0, check the following properties exist.
      - [partition.system.verified]: [0]
      - [partition.vendor.verified]: [0]

Change-Id: I4328d66a8cb93f26e7960e620a0b2292d5f15900
2017-04-14 12:10:49 +08:00