Commit graph

34612 commits

Author SHA1 Message Date
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
Narayan Kamath
e997ba9d22 Merge "tombstoned: Fix calls to evconnlistener_new." 2017-09-14 08:33:49 +00:00
Treehugger Robot
26123d7ec0 Merge "debuggerd_fallback: print maps." 2017-09-14 05:49:24 +00:00
Treehugger Robot
0978f02468 Merge "Mark libmemtrack as VNDK in Android.bp" 2017-09-14 05:26:14 +00:00
Elliott Hughes
d7ddf39a5a Update shell and utilities docs for O.
Bug: N/A
Test: N/A
Change-Id: I9e5acdcdd124e9d7907fe6fa51a3be290262be69
2017-09-13 20:59:25 -07:00
Justin Yun
ef59c16450 Mark libmemtrack 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: I4b9e560ca6d4751889a7b14f205e678b68c20008
Change-Id: I4b9e560ca6d4751889a7b14f205e678b68c20008
(cherry picked from commit 7aeb5bb86c)
2017-09-14 02:46:36 +00:00
Josh Gao
fdc95c9670 debuggerd_fallback: print maps.
Bug: http://b/63400743
Bug: http://b/65590288
Test: killall -ABRT media.codec
Change-Id: I58e47dcd8e99ad7a5945604c27876dd01259e501
2017-09-13 18:30:11 -07:00
Josh Gao
33d14b8748 adb: partially revert b5e11415.
Revert the write_msg_lock part of commit b5e11415. A write which hangs
will hold onto the mutex, preventing the device kick from ever
happening, which also causes lots of other stuff to hang, due to Kick
being called with the transport lock taken.

Test: python test_devices.py
Change-Id: Ie7c958799c93cad287c32d6bbef30c07f40c2d51
2017-09-13 15:09:40 -07:00
Josh Gao
e48ecce671 Revert "adb: fix deadlock between transport_unref and usb_close."
This reverts commit 7e197ef833.

The mutex lock in transport_unref hides a race that seems otherwise
hard to fix. Specifically, there's no synchronization between acquiring
a transport and attaching it to an asocket*, leading to badness if the
transport is closed in between the two operations.

Fix the original problem the reverted patch addressed by manually
unlocking before calling unregister_usb_transport.

Bug: http://b/65419665
Test: python test_device.py
Change-Id: I0ed0044129b1671b2c5dd1b9fa2e70a9b4475dc5
2017-09-13 14:31:14 -07:00
Josh Gao
62c92f0c05 adb: add lock to remove_socket.
The comment that was previously here says that local_socket_list_lock
must be taken, but this function is exposed to external callers that
can't possibly take the lock.

Bug: http://b/65419665
Test: python test_device.py
Change-Id: I12d464933936b2a210a827ccf19ea201020d8d78
2017-09-13 14:05:39 -07:00
Josh Gao
55c8b34f14 adb: reformat comments.
Test: none
Change-Id: Ib484f701f66cdb57f303dbd6d5eb2e5a15abdc0e
2017-09-13 14:05:21 -07:00
Treehugger Robot
28ebfe18fb Merge "Add "operator bool" overload to android::sp." 2017-09-13 20:35:38 +00:00