Commit graph

34673 commits

Author SHA1 Message Date
Daniel Rosenberg
b7c118522f Add derive_gid flag for mounting sdcardfs
Turns on the derive_gid feature for sdcardfs. This was moved
under a mount flag in the kernel.

Test: If the derive_gid flag is supported, the first mount
      should succeed. If the flag is not, the second should
      succeed.
Bug: 63245673
Change-Id: If1c1bce13d14120732e420252cb5605d33ce7c40
2017-09-20 16:04:50 -07:00
Treehugger Robot
2dd3b6e349 Merge "Base: Delete ostream<< with std::string*" 2017-09-20 21:58:39 +00:00
Treehugger Robot
3b5538965e Merge changes I45fbac4a,Ie390459d
* changes:
  bootstat: validate last kmsg and bootreason content more carefully
  bootstat: clang-format rebase
2017-09-20 20:17:19 +00:00
Dan Willemsen
0f048675b2 Enable libdemangle and libunwindstack on host bionic
libunwindstack_test:UnwindTest.* are all failing, but at least this
builds.

Test: Enable host bionic; m
Test: out/soong/host/linux_bionic-x86/nativetest64/libdemangle_test/libdemangle_test
Test: out/soong/host/linux_bionic-x86/nativetest64/libunwindstack_test/libunwindstack_test
Change-Id: Ie6c774ecb4d7a467b5ea7ae977833e9cba178f2d
2017-09-20 13:16:13 -07:00
Tom Cherry
7dcf076700 Merge "Remove comments and code about ro.boot.slot" 2017-09-20 19:21:18 +00:00
Treehugger Robot
90e9c1f06a Merge "libmetricslogger: Lookup tag ID by name at runtime." 2017-09-20 18:40:21 +00:00
Mark Salyzyn
a16e437e9d bootstat: validate last kmsg and bootreason content more carefully
Establish a tighter trust relationship with digitization of the
battery level.  Validate the reboot reason collected from the last
kmsg.  Validate the last reboot reason before using for enhancing
system reboot reason.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63636262
Change-Id: I45fbac4a33c09295cda89de3b73c93a884033e3b
2017-09-20 11:28:02 -07:00
Mark Salyzyn
14b1e6d63d bootstat: clang-format rebase
Code style has drifted too far from our current clang-format
settings.

Test: compile
Side-Effects: none
Bug: 63736262
Change-Id: Ie390459db123cfadf09aa06c8dafb1ae69a72af8
2017-09-20 11:27:56 -07:00
Andreas Gampe
4ef5011a7b Base: Delete ostream<< with std::string*
In most reasonable cases, this is actually a bug. So delete the
operator overload and let the compiler complain.

Test: m
Change-Id: I7d66ec2f33cc46588b6f549876241871f19ce995
2017-09-20 10:54:20 -07:00
Tom Cherry
f4ec2c50a3 Remove comments and code about ro.boot.slot
ro.boot.slot_suffix is the correct parameter.

Bug: 37663204
Test: boot sailfish
Change-Id: I72f94b3c611a2280d0732321dd8de88b0530a3cd
2017-09-20 10:14:44 -07:00
Mark Salyzyn
22a10f6766 Merge "bootstat: refine kernel panic details" 2017-09-20 14:45:17 +00:00
Treehugger Robot
15a14d1ad9 Merge "init: fix typo" 2017-09-20 00:35:30 +00:00
James Hawkins
b2f4244f52 libmetricslogger: Lookup tag ID by name at runtime.
This allows the removal of the hardcoded value (which can become obsolete).

Bug: 65991710
Test: none
Change-Id: I4c9c668dbfe728852ab70d2a0ac8e6bb82a77ad3
2017-09-19 16:37:00 -07:00
Mark Salyzyn
6461089bf8 bootstat: refine kernel panic details
If bootloader reports kernel_panic, gives us permission for a
deeper check of which kind occurred.  Resolve a problem with
some kernels that do not have the 'sysrq: SysRq :' log stutter.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: Idb8978de7a4f4e3c671c6ab7efc5ebe841f7bbd8
2017-09-19 16:30:05 -07:00
Treehugger Robot
8f3989b820 Merge "libmetricslogger: Fix one incorrect (deprecated) logtag and one duplicate logtag." 2017-09-19 22:39:25 +00:00
Tom Cherry
a141907ecf init: fix typo
Test: build
Change-Id: I2f6ff60356087f9fd6c6f24e3923d70b9e93dcf8
2017-09-19 13:13:17 -07:00
James Hawkins
2dcca295a6 libmetricslogger: Fix one incorrect (deprecated) logtag and one
duplicate logtag.

Bug: 65841976
Bug: 65961260
Test: none
Change-Id: I6491c3c05e3a56b45d4a77cfa83f8e14eb226e64
2017-09-19 12:03:47 -07:00
Tom Cherry
f5dba11085 Merge "init: use protobuf for serialization of persistent properties" 2017-09-19 17:07:00 +00:00
Tom Cherry
a97faba653 init: use protobuf for serialization of persistent properties
I probably should have done this from the start...  There's a shim to
convert my manually serialized format to protobuf, and since that has
not yet shipped, it'll be reverted in a short period of time.

Test: init unit tests
Test: upgrade from legacy and intermediate property formats successfully
Change-Id: Iad25f6c30d0b44d294230a53dd6876222d1c785b
2017-09-19 09:56:31 -07:00
Mark Salyzyn
e42278d114 Merge "bootstat: reduce overall boot time" 2017-09-19 14:40:14 +00:00
Mark Salyzyn
834e89c25a Merge "bootstat: battery test fails on QC devices" 2017-09-19 14:38:39 +00:00
Mark Salyzyn
557a9d4054 bootstat: reduce overall boot time
Run bootstat as a oneshot service rather than as a series of inline
exec commands.  exec commands impact boot time.

Test: cts-tradefed run cts-dev --module CtsBootStatsTestCases
      system/core/bootstat/boot_reason_test.sh all
         (make sure it filters out new init reports)
Bug: 65736247
Change-Id: Ic9d509a8cbee4bc1e278081de1001e25ae0915fd
2017-09-19 07:36:34 -07:00
Mark Salyzyn
8a30fcabcb bootstat: battery test fails on QC devices
Send the message multiple times into the last dmesg log so that one
may be picked up without data corruption.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: Ie42ad1940b1eb4915e4cf6cc61815d0275a70ffe
2017-09-19 07:36:34 -07:00
Mark Salyzyn
b04f454216 Merge "bootstat: bootloader stat files misspelled" 2017-09-19 14:35:36 +00:00
Mark Salyzyn
25246ddfe6 bootstat: bootloader stat files misspelled
Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I6620c9965f4af8b6a3829f1f4cdcc9b691471a71
2017-09-19 14:34:42 +00:00
Mark Salyzyn
ae054903af Merge "bootstat: reboot cold, warm and hard tests failed" 2017-09-19 14:32:57 +00:00
Tom Cherry
424ed42fb4 Merge "init: add exec_background command" 2017-09-18 21:33:26 +00:00
Mark Salyzyn
08b0256ea1 bootstat: reboot cold, warm and hard tests failed
If the bootloader insists on reporting reboot for cold, warm and
hard, we need to reconstruct canonical reason from the
persist.sys.boot.reason property.

Some log lines contained bootstate, letting their noise through
during testing, changed regex to look for bootstat[^e].

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I3788c6cf8aca7fc73dd01bf95acb596d18ed7ee4
2017-09-18 21:03:10 +00:00
Treehugger Robot
2fb5fa336b Merge "bootstat: Log the ro.boot.bootreason property through the new platform_reason Tron field." 2017-09-18 19:36:40 +00:00
Tom Cherry
3631c545b8 init: add exec_background command
This command functions similarly to `exec` except that it does not
cause init to halt executing commands until the process has
terminated.  It is useful for launching simple one time background
tasks.

Bug: 65736247
Test: create an exec_background service and see it function properly
Change-Id: I719c8b85479b65201770aedc0a13191303007c11
2017-09-18 12:19:47 -07:00
Isaac Chen
06c65ed667 Merge "Enable HAS_VFP_D32 for 32-bit armv8 crasher" 2017-09-18 01:58:02 +00:00
Treehugger Robot
48b68b4944 Merge "libbacktrace: make Backtrace::FormatFrameData static." 2017-09-15 23:13:02 +00:00
James Hawkins
5240f204ed bootstat: Log the ro.boot.bootreason property through the new platform_reason Tron field.
Bug: 63584589
Test: none
Change-Id: Ifd6f3d4432d764b5ffc7db10dec5e573214f7c97
2017-09-15 16:01:57 -07:00
Tom Cherry
b92415cee2 Merge "init: fix crash when reboot is triggered by a builtin" 2017-09-15 21:08:52 +00:00
Tom Cherry
3633a4014a init: fix crash when reboot is triggered by a builtin
Builtin commands may set the sys.powerctl property, which causes
reboot to be immediately processed.  Unfortunately, part of the reboot
processing involves clearing the action queue, so when this scenario
happens, ActionManager::ExecuteOneCommand() can abort due to its state
being unexpectedly changed.

Longer term, the real fix here is to split init and property service.
In this case, the property sets will be sent to property service and
the reboot will only be processed once property service responds back
to init that the property has been set.  Since that will not happen
within the action queue, there will be no risk of failure.

Short term, this change sets a flag in init to shutdown the device
before the next action is run, which defers the shutdown enough to fix
the crash, but continues to prevent any further commands from running.

Bug: 65374456
Test: force bullhead into the repro case and observe that it no longer
      repros

Change-Id: I89c73dad8d7912a845d694b095cab061b8dcc05e
2017-09-15 21:07:41 +00:00
Bill Yi
1eca62a8ce Merge remote-tracking branch 'aosp/oreo-cts-dev' into HEAD 2017-09-15 13:44:35 -07:00
Tom Cherry
db7b8f5e28 Merge "init: fix hiding of move constructors of Result<T>" 2017-09-15 20:18:21 +00:00
Tom Cherry
d1c9cd0499 init: fix hiding of move constructors of Result<T>
This is needed to have Result<Result<T>> work correctly.

Test: init unit tests
Change-Id: If7d23d1ea13f3727b567d3baf0eee1d8d0e5a196
2017-09-15 20:17:38 +00:00
Treehugger Robot
4ed58aff38 Merge "Mark libziparchive as VNDK in Android.bp" 2017-09-15 16:23:46 +00:00
Treehugger Robot
5d1e740e7f Merge "Mark the modules as VNDK in Android.bp" 2017-09-15 16:23:30 +00:00
Isaac Chen
6dc21a5ac5 Enable HAS_VFP_D32 for 32-bit armv8 crasher
Android.bp assumed only an armv7-a-neon core needs to set HAS_VFP_D32.
In fact, an armv8 core also has 32 double-word floating point registers
for A32 and T32 ISAs (AArch32 or 32-bit armv8).

Bug: 65568426
Test: lunch aosp_arm64; emulator # on oc-mr1-dev; boot to home screen.
      Check crashglue.o actually uses VFP_D16-31 for 32-bit armv8 core.
Change-Id: I34584a27fa24a55bb4809ccd7f99a8122971df0e
2017-09-15 15:31:22 +08:00
Jae Shin
0dd4b6aa39 Merge "gatekeeperd: use std::unique_ptr" 2017-09-15 07:00:07 +00:00
Justin Yun
919cc55a7e gatekeeperd: use std::unique_ptr
std::unique_ptr is available in this scope. Substitute the UniquePtr to
std::unique_ptr.

Bug: 63686260
Test: build and boot
Merged-In: Ib8ea3fb5c49c0e92d962f65f1139b073168f8698
Change-Id: Ib8ea3fb5c49c0e92d962f65f1139b073168f8698
(cherry picked from commit 68b0ec6487)
2017-09-15 01:12:43 +00:00
Justin Yun
096114d85c Mark libziparchive as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
    enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: Iec5d3496e91a99f3e6b0c816c67ad279672ff36a
Change-Id: Iec5d3496e91a99f3e6b0c816c67ad279672ff36a
(cherry picked from commit 4e7e5b3ba053d013f2c4ae79d02722b874c629fb)
2017-09-15 01:07:40 +00:00
Jae Shin
8c3e940324 Merge changes I60f883c0,Ie5955865
* changes:
  Mark libsync as LL-NDK
  Fix NDK libsync to match ndk/sync.h
2017-09-15 01:02:53 +00:00
Jiyong Park
b87f884b99 Mark libsync as LL-NDK
libsync is used both by platform (e.g. libui.so) and by same-process
HALs (e.g. android.hardware.graphics.mapper@2.0-impl.so). Therefore it
is eligible for either VNDK-SP or LL-NDK. Among the two choices, LL-NDK
was selected because it is already an NDK and is just a thin wrapper
around a few kernel ioctls.

However, since libui (which is a vendor_available:true library) is using
more symbols that are not available to NDK clients, the extra symbols
are exposed as # vndk tag so that they are only available to VNDK
clients, but not to NDK clients.

Bug: 63866913
Test: BOARD_VNDK_VERSION=current m -j successful (2017 pixel)
Test: the built image is bootable
Merged-In: I60f883c049bd9b4562e6ce34d34ead47ba28af5f
Change-Id: I60f883c049bd9b4562e6ce34d34ead47ba28af5f
(cherry picked from commit 058e0919f6)
2017-09-15 00:33:52 +00:00
Jesse Hall
b5ec6a032c Fix NDK libsync to match ndk/sync.h
The header names were changed during review, but the library map file
wasn't updated.

Bug: 62229958
Test: CtsGraphicsTestCases:android.graphics.cts.SyncTest
Merged-In: Ie5955865667b35067f1ee209933f159f170419cd
Change-Id: Ie5955865667b35067f1ee209933f159f170419cd
(cherry picked from commit 59d9ee5d02)
2017-09-15 00:32:27 +00:00
Josh Gao
0a01830612 Merge changes I0ed00441,I12d46493,Ib484f701
* changes:
  Revert "adb: fix deadlock between transport_unref and usb_close."
  adb: add lock to remove_socket.
  adb: reformat comments.
2017-09-14 20:04:42 +00:00
Treehugger Robot
1ca9852366 Merge "Update shell and utilities docs for O." 2017-09-14 19:22:06 +00:00
Justin Yun
6a7e882316 Mark the modules as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
        enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: Icecb22ed2ed0f58c3168605d4cf64815e2dda750
Change-Id: Icecb22ed2ed0f58c3168605d4cf64815e2dda750
(cherry picked from commit 9b0ed72942)
2017-09-14 08:35:16 +00:00