Commit graph

29785 commits

Author SHA1 Message Date
Mark Salyzyn
e4223e034c Merge "liblog: __android_logger_property_bool svelte+eng default" am: 8b318d0c26
am: f58558d6b9

Change-Id: I69168cf8ef5294dfb00742b5fc871c8f269cd6bb
2017-04-19 16:19:31 +00:00
Mark Salyzyn
f58558d6b9 Merge "liblog: __android_logger_property_bool svelte+eng default"
am: 8b318d0c26

Change-Id: I57810f41f8eff2cdbf943613d1fb5acbbcc53469
2017-04-19 16:09:39 +00:00
Mark Salyzyn
8b318d0c26 Merge "liblog: __android_logger_property_bool svelte+eng default" 2017-04-19 14:55:20 +00:00
Mark Salyzyn
b0bf71f166 Merge "logd: report log reader instantiation" am: 0ca7eec9b0
am: 7a8a048f56

Change-Id: I00ea9528b2e6104f7728b8f7e93639c273b6c55e
2017-04-18 23:55:15 +00:00
Mark Salyzyn
7a8a048f56 Merge "logd: report log reader instantiation"
am: 0ca7eec9b0

Change-Id: I7e27b80dbbfb096316d6f19204eca429cdebb59e
2017-04-18 23:53:16 +00:00
Treehugger Robot
0ca7eec9b0 Merge "logd: report log reader instantiation" 2017-04-18 23:46:18 +00:00
Jeff Sharkey
93773bd1f0 Merge "Allocate a GID range for external cache files." am: edaed3ed7a
am: 28e0eae769

Change-Id: Ib3fd9c570e3885971b79e76804f440f7ed618bc4
2017-04-18 22:48:54 +00:00
Jeff Sharkey
28e0eae769 Merge "Allocate a GID range for external cache files."
am: edaed3ed7a

Change-Id: I15399bb3ce95bf52e6ab2d0585598bdf7774c480
2017-04-18 22:43:23 +00:00
Mark Salyzyn
9fcaaba85d liblog: __android_logger_property_bool svelte+eng default
When BOOL_DEFAULT_FLAG_ENG and/or BOOL_DEFAULT_FLAG_SVELTE is set for
flags parameter in __android_logger_property_get_bool, they can not be
overridden by a supplied property value.  Reset these two flags if
there is something in the specified property.

Test: gTest liblog-unit-tests, logcat-unit-tests and logd-unit-tests
Bug: 37425809
Change-Id: I5fc2d727e8c30bc1e781f8b365f44ec62dd36b4d
2017-04-18 15:36:36 -07:00
Treehugger Robot
edaed3ed7a Merge "Allocate a GID range for external cache files." 2017-04-18 22:34:16 +00:00
Chris Fries
5a07296873 Merge "libsparse: Fix verbose_error string usage" am: 0bdf6539d6
am: 006ea1aebc

Change-Id: I52cec282c5c3459628abab603ea0d7048f854fb7
2017-04-18 22:10:29 +00:00
Chris Fries
006ea1aebc Merge "libsparse: Fix verbose_error string usage"
am: 0bdf6539d6

Change-Id: I9769a91fac4a3acf4e3e1c7b02b896217c6d9d3d
2017-04-18 22:00:48 +00:00
Mark Salyzyn
fa3add3364 logd: report log reader instantiation
Helpful instrumentation to determine who is waiting for logger data.

Test: manual
Bug: 37274132
Bug: 37378309
Change-Id: I14fb1d9d15ae413930121048b770852359f06682
2017-04-18 14:59:46 -07:00
Treehugger Robot
0bdf6539d6 Merge "libsparse: Fix verbose_error string usage" 2017-04-18 20:45:09 +00:00
Tom Cherry
8972f887d2 Merge "init: handle sys.powerctl immediately" am: 14ed55bae8
am: e6bfb53196

Change-Id: Ibdcbfdd15957d4ca64ef2f1f084768e9241da27f
2017-04-18 18:27:45 +00:00
Tom Cherry
e6bfb53196 Merge "init: handle sys.powerctl immediately"
am: 14ed55bae8

Change-Id: Ide932edcca1b076665448e465a785abfc1a1cb4c
2017-04-18 18:22:14 +00:00
Tom Cherry
14ed55bae8 Merge "init: handle sys.powerctl immediately" 2017-04-18 18:14:18 +00:00
Chris Fries
a7eeb22efb libsparse: Fix verbose_error string usage
Switch vnsprintf to StringPrintf to avoid off-by-one, and switch
sparse_read.c to cpp.

Test: fastboot flash normal image with smaller sparse limit

Change-Id: Ia399b167625deb271bfd0ee3273071306d71c4d4
2017-04-18 10:53:49 -05:00
Steven Moreland
ae4c956012 Merge "libcutils: compile with BOARD_VNDK_VERSION current" am: f358bed624
am: dd9a91f109

Change-Id: I6006b664c42faa2d135e040321e9cd48589e2710
2017-04-18 14:59:54 +00:00
Steven Moreland
dd9a91f109 Merge "libcutils: compile with BOARD_VNDK_VERSION current"
am: f358bed624

Change-Id: Idc1ad70ec01687eb23f2eff584751088f122e59f
2017-04-18 14:54:52 +00:00
Treehugger Robot
f358bed624 Merge "libcutils: compile with BOARD_VNDK_VERSION current" 2017-04-18 14:46:27 +00:00
Mark Salyzyn
732f30ee8e Merge changes Iec369a50,I3f9f8d56,I78959464,I72ea858e am: 6ad16cda19
am: 7b45da1006

Change-Id: I5969bd70c30e1f4f4e7fbff337a4a1e16ed03176
2017-04-18 14:29:21 +00:00
Mark Salyzyn
7b45da1006 Merge changes Iec369a50,I3f9f8d56,I78959464,I72ea858e
am: 6ad16cda19

Change-Id: I3e44fdd82fb5ec8a1beffa759df82a67556ea16a
2017-04-18 14:23:53 +00:00
Mark Salyzyn
6ad16cda19 Merge changes Iec369a50,I3f9f8d56,I78959464,I72ea858e
* changes:
  logd: instrument tests better for failure
  liblog: log_time add explicit to some constructors.
  logd: iterator corruption paranoia
  logd: regression in handling watermark boundary.
2017-04-18 14:17:12 +00:00
Tom Cherry
98ad32a967 init: handle sys.powerctl immediately
Currently if a process sets the sys.powerctl property, init adds this
property change into the event queue, just like any other property.
The actual logic to shutdown the device is not executed until init
gets to the action associated with the property change.

This is bad for multiple reasons, but explicitly causes deadlock in
the follow scenario:

A service is started with `exec` or `exec_start`
The same service sets sys.powerctl indicating to the system to
shutdown
The same service then waits infinitely

In this case, init doesn't process any further commands until the exec
service completes, including the command to reboot the device.

This change causes init to immediately handle sys.powerctl and reboot
the device regardless of the state of the event queue, wait for exec,
or wait for property conditions.

Bug: 37209359
Bug: 37415192

Test: Init reboots normally
Test: Update verifier can reboot the system
Change-Id: Iff2295aed970840f47e56c4bacc93001b791fa35
2017-04-17 16:40:06 -07:00
Mark Salyzyn
24aa9a41e1 logd: instrument tests better for failure
Failure to open socket misbehaved and told us nothing.

Test: gTest logd-unit-tests
Bug: 37378309
Change-Id: Iec369a50ccb1027e96947465e90d9572c9f4047f
2017-04-17 15:10:26 -07:00
Mark Salyzyn
d87d47f7dd liblog: log_time add explicit to some constructors.
Add explicit to constructors, to prevent implicit conversions.

Test: compile
Bug: 37378309
Change-Id: I3f9f8d561e84c492eafa6528db7c238da072dad8
2017-04-17 15:10:26 -07:00
Mark Salyzyn
3614a0c5d4 logd: iterator corruption paranoia
Add checking for impossible(tm) scenarios within LogBuffer::flushTo:

1) When iterating through the log entries, check if the iterator
   returns two identical element references and break out of the loop.
2) Cap the maximum number of log entries we will skip while holding
   the iterator lock at 4194304, break out of the loop.

We print a message to the kernel logs if we hit these cases.

ToDo: Remove this paranoia at some future date.

Test: gTest liblog-unit-tests logcat-unit-tests and logd-unit-tests
Bug: 37378309
Change-Id: I789594649db14093238828b9f6d1daeca8b780c2
2017-04-17 15:10:26 -07:00
Mark Salyzyn
5836379b21 logd: regression in handling watermark boundary.
Deal with a regression introduced in commit
5a34d6ea43 (logd: drop mSequence from
LogBufferElement) where log_time was compared against nsec() time
miscalculating the watermark boundary.  When dealing with logcat
-t/-T, or any tail reading, add a margin to prune to back off by a
period of 3 seconds (pruneMargin).

Test: gTest liblog-unit-tests logcat-unit-tests and logd-unit-tests
Bug: 37378309
Change-Id: I72ea858e4e7b5fa91741ea84c40d2e7c3c4aa031
2017-04-17 15:10:26 -07:00
Tom Cherry
b7ef4726ff Merge "ueventd: create classes for dev and sys permissions" am: ffa38cfc1e
am: e29fa61725

Change-Id: Ia0f7ea669fe7ee948b1572fd923fab041cf630c2
2017-04-17 21:46:46 +00:00
Steven Moreland
d73be1b96b libcutils: compile with BOARD_VNDK_VERSION current
- moved __android_log_is_debuggable to a new public header
    (log_properties.h)
- vendor version of sched_policy uses ALOG* instead SLOG*

Test: (sanity) liblog-unit-tests
Test: (sanity) libcutils_test (noting b/b/32972117, two tests continue
  to fail)
Test: system/core as a whole makes with BOARD_VNDK_VERSION := current
  now with no problems.
Test: boots/works on internal marlin
Bug: 33241851

(cherry picked from commit 1f83aa424f)

Merged-In: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
Change-Id: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
2017-04-17 14:44:17 -07:00
Tom Cherry
e29fa61725 Merge "ueventd: create classes for dev and sys permissions"
am: ffa38cfc1e

Change-Id: Idc3ecf436d5750564de4ba16f0811c1d76cc609d
2017-04-17 21:42:11 +00:00
Tom Cherry
ffa38cfc1e Merge "ueventd: create classes for dev and sys permissions" 2017-04-17 21:34:12 +00:00
Jeff Sharkey
fa16473921 Allocate a GID range for external cache files.
We can't reuse the GID range for internal cache files, otherwise
we don't have a way to tease apart the difference when deciding if
it's safe to move apps.

Test: builds, boots
Bug: 37193650
Change-Id: I22c4e575cd557636e74c5c73035adb1d4dcbb7f7
2017-04-17 14:50:27 -06:00
Wei Wang
d7652f553c Merge "init.rc: set initial cpuset to all cores" am: 66f44d823f
am: eb9ddd14f1

Change-Id: I5dce107407c04212e667099d1da0d67f96a6322d
2017-04-17 20:15:43 +00:00
Wei Wang
eb9ddd14f1 Merge "init.rc: set initial cpuset to all cores"
am: 66f44d823f

Change-Id: I5caa54781b72126a01171fcf483eca488d90f7b5
2017-04-17 20:10:43 +00:00
Wei Wang
66f44d823f Merge "init.rc: set initial cpuset to all cores" 2017-04-17 20:01:43 +00:00
Chris Fries
b174f19f24 Merge changes from topic '36810152' am: b7826a74f2
am: a14353e664

Change-Id: Iae75cb1bf56186a797f0e7a60e62d361c248866a
2017-04-17 19:41:42 +00:00
Chris Fries
a14353e664 Merge changes from topic '36810152'
am: b7826a74f2

Change-Id: I7ab0cc7268efb9ab6a560c0aa968ec565cac16d0
2017-04-17 19:36:43 +00:00
Tom Cherry
cc054c9da8 ueventd: create classes for dev and sys permissions
Create classes for dev and sys permissions and store these permissions
in std::vector instead of the C list.

Test: boot bullhead
Test: init unit tests

Change-Id: I874039a3db29b4c70149506da8e407123ab7eca2
2017-04-17 19:33:04 +00:00
Chris Fries
b7826a74f2 Merge changes from topic '36810152'
* changes:
  fastboot: Support larger transfers during flash
  fastboot: Cap max size sent to libsparse
  fastboot: add AdbWinUsbApi as a required module
2017-04-17 19:31:38 +00:00
Chris Fries
0ea946c007 fastboot: Support larger transfers during flash
Adding methods to queue and download flashable images by fd instead of
by pointer, so that we can deal with sending large (up to 4GB) files
on windows and linux.  This gets past limitations on linux to read
more than 2GB from a file at a time, as well as memory limitations
on win32, in order to download up to 4GB in a single transfer.

Test: fastboot -w
Test: "flash-all" from nexus factory images site (incl. fastboot -w update)
Test: fastboot flash with large and small image, large and small max-download-size
Test: Sanity check flashing on win32, darwin, linux.
Test: Sanity check 3GB image download (with 3GB max-download-size)
      on win32, darwin, linux.

Bug: 36810152
Change-Id: I528d739d344eb080d59d721dadf3b3b34d4b375e
2017-04-17 09:22:49 -05:00
Elliott Hughes
298ae04ad6 Merge "Add a README.md about our shell and utilities." am: 75d195693b
am: 48f034932b

Change-Id: I61380d247f1f5a3cb903bf35932690e293f17a22
2017-04-15 15:43:33 +00:00
Elliott Hughes
48f034932b Merge "Add a README.md about our shell and utilities."
am: 75d195693b

Change-Id: I05279fbc5de92efa6e8a5fb2a51e702b0e1427d5
2017-04-15 15:40:04 +00:00
Treehugger Robot
75d195693b Merge "Add a README.md about our shell and utilities." 2017-04-15 15:33:41 +00:00
Bowgo Tsai
6f3ec3d759 Merge "Set libavb version into system property for Treble OTA" am: e8311491da
am: 7b08869382

Change-Id: Ic445d12e5fc26a1a534011c7033d79e730538653
2017-04-15 05:55:57 +00:00
Bowgo Tsai
7b08869382 Merge "Set libavb version into system property for Treble OTA"
am: e8311491da

Change-Id: I867972462df8d5830aa520a9d227ca4d8f9f8be2
2017-04-15 05:52:58 +00:00
Bowgo Tsai
e8311491da Merge "Set libavb version into system property for Treble OTA" 2017-04-15 05:49:25 +00:00
Bowgo Tsai
1a898c25f9 Set libavb version into system property for Treble OTA
Set ro.boot.avb_version to "AVB_VERSION_MAJOR.AVB_VERSION_MINOR".
During Treble OTA match, the major version must be the same as that in
the avb metadata on disk, while the minor version can be equal or
greater to that in the avb metadata on disk.

See how avb versioning work on the following link:

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

Also renames AvbHashtreeDisabled() -> hashtree_disabled().

Bug: 35322304
Test: Early mount with AVB, checks [ro.boot.avb_version]: [1.0] exists.
Test: Not enable AVB, checks [ro.boot.avb_version] doesn't exists.

Change-Id: I5aaf476ca53c4fe817779518ba14b68ebcfdc6d6
2017-04-15 09:47:31 +08:00
Elliott Hughes
5a0818a633 Add a README.md about our shell and utilities.
This is definitely a FAQ, and it doesn't make sense for me to maintain
this on Google+ when I have the power to just check it in (and now have
a sensible place to do so).

Bug: N/A
Test: N/A
Change-Id: I649803ac846917a45f4b7b89cffe5b450179c479
2017-04-14 17:59:55 -07:00