Commit graph

29673 commits

Author SHA1 Message Date
Keun-young Park
7feab68238 set default shutdown timeout to 6 secs
- Test data shows that most shutdown finishes in 6 secs.
- The original 10 secs is too long wih no shutdown animation
  running in screen.

bug: 36657139
Test: check time with reboot
Change-Id: I9a805ddfde8156b066485902048d0cd01365c453
2017-04-26 13:58:31 -07:00
Keun-young Park
8cde09064e Merge "add additional dump for timeout" 2017-04-26 20:53:21 +00:00
Tom Cherry
4ba72d9b73 Merge changes Ibe91fd2d,I59e2bd9e
am: b0a14f8feb

Change-Id: Ibe4e68e4f6127841faee2a2f15400672f9aceef0
2017-04-26 19:54:18 +00:00
Treehugger Robot
b0a14f8feb Merge changes Ibe91fd2d,I59e2bd9e
* changes:
  init: remove 'computing context for service'... message
  init: use full command for exec services' names
2017-04-26 19:46:04 +00:00
Jocelyn Bohr
98cc283168 fastboot: Add 'stage' command
(cherry-picked from internal nyc-iot-dev to AOSP)

New user-level command usage:

 * fastboot stage <infile>
   Sends the contents of <infile> to the device to stage for use in the
   next command.

This enables OEM commands to use data downloaded from host to device.

Bug: 35811075
Test: Manual test on imx6ul
Change-Id: I483a18f9f4205d3289ee524656b9d741b16e9fe6
(cherry-picked from commit 001c75c6c0fe6a70a1db2a65253ab3c43ec17d46)
2017-04-26 11:08:41 -07:00
Keun-young Park
1663e97fe1 add additional dump for timeout
- add sysrq-trigger current tasks dump
- This helps detecting kernel thread stuck in a specific driver

bug: 37573746
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 2000 -f -e 15 -w 30  -v -a

Change-Id: Icb20b5fba63d601bb937f004f5889a9bc8340b34
2017-04-26 10:16:23 -07:00
Philip Cuadra
adecf17de6 Merge "Allow Bluetooth HAL CAP_SYS_NICE"
am: 1ac29896b0

Change-Id: I071fdbd0af6d7f39cf031abb51c54d289585693e
2017-04-26 17:02:17 +00:00
Philip Cuadra
1ac29896b0 Merge "Allow Bluetooth HAL CAP_SYS_NICE" 2017-04-26 16:56:00 +00:00
Erik Staats
b81797446d Merge "Change get_sched_policy to check "schedtune" and "cpuset"."
am: e74ecbfddd

Change-Id: I497c3e0dfb307e4072317e2da72ffc183ab6044a
2017-04-26 16:44:34 +00:00
Erik Staats
e74ecbfddd Merge "Change get_sched_policy to check "schedtune" and "cpuset"." 2017-04-26 16:40:44 +00:00
Tom Cherry
47336cebc3 init: fix last_reboot_reason string
This got moved when refactoring the reboot commands.

Bug: 37540660
Test: verify bullhead's last_reboot_reason is correct
Change-Id: I3b86496fc469ca41645df7e7ba8bb51dd25b6b38
2017-04-26 16:17:08 +00:00
Mark Salyzyn
a4015dce4c Merge "logd: add Chattiest LOG_TAG statistics"
am: 8c437b95d3

Change-Id: Id9a368dd5e70cb233525c1d56da61a42bd18cdcc
2017-04-26 15:54:00 +00:00
Treehugger Robot
8c437b95d3 Merge "logd: add Chattiest LOG_TAG statistics" 2017-04-26 15:50:23 +00:00
Tom Cherry
6f7ef2fb34 init: remove 'computing context for service'... message
This line shows up immediately before starting a service for each
service without a 'seclabel' option, essentially becoming log spam.

We already log if we fail to compute the context as well.

Test: Boot bullhead

Change-Id: Ibe91fd2dd9f53a8ae2ca95ccea1636ecef2af224
2017-04-25 17:46:13 -07:00
Tom Cherry
86e31a8123 init: use full command for exec services' names
Before:
init: starting service 'exec 4 (/system/bin/vdc)'...
init: starting service 'exec 5 (/system/bin/tzdatacheck)'...
init: starting service 'exec 6 (/system/bin/bootstat)'...
init: starting service 'exec 7 (/system/bin/bootstat)'...

After:
init: starting service 'exec 4 (/system/bin/vdc --wait cryptfs mountdefaultencrypted)'...
init: starting service 'exec 5 (/system/bin/tzdatacheck /system/usr/share/zoneinfo /data/misc/zoneinfo)'...
init: starting service 'exec 6 (/system/bin/bootstat -r post_decrypt_time_elapsed)'...
init: starting service 'exec 7 (/system/bin/bootstat --record_boot_complete)'...

Test: Boot bullhead, observe above logging change
Change-Id: I59e2bd9e3d341bbed9537c972e47246d0a12769d
2017-04-25 17:35:46 -07:00
Bowgo Tsai
8954cd9379 Merge "init: fix first stage mount failure when two fstab entries have verity_loc"
am: 8df35dcb1c

Change-Id: I243c97a4512ba1ef5ff03ee3bf6a6e41b4cba94a
2017-04-26 00:14:28 +00:00
Treehugger Robot
8df35dcb1c Merge "init: fix first stage mount failure when two fstab entries have verity_loc" 2017-04-26 00:06:47 +00:00
Steven Moreland
4c06e42abf libbinderwrapper: Android.mk -> Android.bp
Test: links

Change-Id: I63332b8d02f8499b165b4069a8c88e459f276f90
2017-04-25 15:55:26 -07:00
Christopher Ferris
897a7b0056 Merge "Add the Dwarf CFA handling."
am: 1c036ebc15

Change-Id: I25eb52b3ae10fcf771f5451a28399b03a0b082d7
2017-04-25 22:29:50 +00:00
Christopher Ferris
1c036ebc15 Merge "Add the Dwarf CFA handling." 2017-04-25 22:12:49 +00:00
Tom Cherry
d45b6f44d5 Merge "init: rename 'Trigger' to 'Event' and convert to std::variant"
am: d9ebf06117

Change-Id: I1753f980ce4f1aec644c341608877af14cbb248c
2017-04-25 21:53:10 +00:00
Tom Cherry
4cd8d5e9f5 Merge changes I1f70f2c4,I698ca962,Idbbf2682
am: 960ed3ce1b

Change-Id: Ia318890180132e04180c6d461b04ee046f341358
2017-04-25 21:52:51 +00:00
Tom Cherry
d9ebf06117 Merge "init: rename 'Trigger' to 'Event' and convert to std::variant" 2017-04-25 21:44:19 +00:00
Tom Cherry
960ed3ce1b Merge changes I1f70f2c4,I698ca962,Idbbf2682
* changes:
  init: remove unused parts of parser.cpp
  ueventd: replace ueventd_parser.cpp with init_parser.cpp
  init: add Parser::AddSingleLineParser()
2017-04-25 21:44:07 +00:00
Tom Cherry
ad6741c6f8 init: remove unused parts of parser.cpp
Now that ueventd is using init's parser, we no longer need anything
other than the tokenizer from parser.cpp.

Test: Boot bullhead
Change-Id: I1f70f2c4479af576174bd74dd919d81817500216
2017-04-25 11:24:33 -07:00
Tom Cherry
fe062055cb ueventd: replace ueventd_parser.cpp with init_parser.cpp
Previously init_parser.cpp was made generic and capable of parsing any
number of differently named 'sections' or prefixed lines.  We now use
these capabilities to do the parsing for ueventd.

Bug: 36250207
Bug: 33785894

Test: boot bullhead and ensure the right /dev nodes exist
      with the right permissions set
Test: verify no boot time difference
Change-Id: I698ca962d414f8135af32f6c9cd778841b2b8b53
2017-04-25 11:24:24 -07:00
Wei Wang
0380041304 Merge "Revert "Revert "Ensure update_verifier run before zygote"""
am: 5fe07acd07

Change-Id: I4142f960f8867c4e24815c0cbcb31eaa00e83acc
2017-04-25 17:42:11 +00:00
Treehugger Robot
5fe07acd07 Merge "Revert "Revert "Ensure update_verifier run before zygote""" 2017-04-25 17:34:35 +00:00
Bowgo Tsai
71881fffd6 init: fix first stage mount failure when two fstab entries have verity_loc
The previous check is incorrect because it compares the basename of
previous verity_loc with the full path of current verity_loc.

Changes it to compare the full device file path instead of just the basename
of verity_loc. This can catch the case of two different verity_loc
values with the same basename, e.g.,

  - verify=/dev/block/platform/SOC.0/by-name/metadata
  - verify=/dev/block/platform/SOC.1/by-name/metadata

Bug: 37413399
Bug: 37619597
Test: first stage mount /system and /vendor with the following fs_mgr_flags on bullhead
        - wait,verify=/dev/block/platform/soc.0/f9824900.sdhci/by-name/metadataa
Test: first stage mount /system and /vendor with different verity_loc values
      on bullhead, checks it bails out
Change-Id: I017c8bd9f0790d45e08e57df9a2878e4f62c5f9c
2017-04-26 01:23:19 +08:00
Tom Cherry
35c5bcc89c init: add Parser::AddSingleLineParser()
Add the ability to override the current section being parsed and
instead parse a line by itself if a given line starts with a specific
prefix.

Test: Boot bullhead
Change-Id: Idbbf2682b78996b41d05f3db655c8937a8c6ccda
2017-04-25 10:19:37 -07:00
Tom Cherry
26ed9cb706 init: rename 'Trigger' to 'Event' and convert to std::variant
The term 'trigger' should be used in 'Action' to indicate what causes
the 'Action' to be executed.

The term 'event' should be used in ActionManager's queue to indicate
a state change that is checked against the 'triggers' of an 'Action' to
see if it should execute.

Convert the previous Trigger class to std::variant, as the latter is
better suited for this use.

Change-Id: I2558367c8318b536aa69fcec93793f1c12857ef5
2017-04-25 17:14:23 +00:00
Steven Moreland
01ff125c20 Merge "libsysutils: Android.mk -> Android.bp"
am: d0013343e9

Change-Id: I45eb8746984691971b5370b43c90a2c4db23a26d
2017-04-25 16:35:54 +00:00
Treehugger Robot
d0013343e9 Merge "libsysutils: Android.mk -> Android.bp" 2017-04-25 16:32:49 +00:00
Erik Staats
b4c4654c7c Change get_sched_policy to check "schedtune" and "cpuset".
get_sched_policy will first attempt to get the policy from the "schedtune"
subsystem cgroup and, if not set, attempt to get the policy from the
"cpuset" subsystem cgroup.  If neither subsystem has a cgroup set,
SP_FOREGROUND is returned.

Bug: 32972117
Test: Verified that SchedPolicy libcutils test passes and that ps displays
the expected policies.  See details in testing done comment in
https://android-review.googlesource.com/379426 .

Change-Id: I586a921a38eea99d65590b07ece96c9808a2e56d
2017-04-25 15:26:53 +00:00
Jaekyun Seok
ac945881b3 Merge "Update persist.sys.usb.config on runtime"
am: 41346e553b

Change-Id: I950b791f00fbbb72dca2154df7ea8dc055373257
2017-04-25 03:58:33 +00:00
Treehugger Robot
41346e553b Merge "Update persist.sys.usb.config on runtime" 2017-04-25 03:51:17 +00:00
Jaekyun Seok
0cf3a07e14 Update persist.sys.usb.config on runtime
persist.sys.usb.config values can't be combined on build-time when
property files are split into each partition.
So we need to apply the same rule of
build/make/tools/post_process_props.py on runtime.

Test: building succeeded and tested on sailfish.
Bug: 37617113
Bug: 37648659

Change-Id: I78cdffee446d3ae6a89f138faed5f3149e4b507d
2017-04-25 01:31:19 +00:00
Philip Cuadra
e08303d8cf Allow Bluetooth HAL CAP_SYS_NICE
The Bluetooth HAL has threads that process Bluetooth audio.  They need
to be scheduled as RT priority, so allow the Bluetooth HAL to set its
threads to RT scheduling.

Bug 37518404
Test:  play Bluetooth audio, confirm priority via systrace
Change-Id: I4928cf182a0805c0714e4d073cba15c864fbe328
2017-04-24 17:59:20 -07:00
Bowgo Tsai
a1da077454 Merge "init: set ro.boot.avb_version in recovery mode"
am: f1bd536efd

Change-Id: I50c39b6d6f6b0e24e9b4688f98fecf30ebbcd0c9
2017-04-25 00:37:40 +00:00
Bowgo Tsai
2d7818a104 Merge "init: moving early mount logic into init_first_stage.cpp"
am: bcd36a20d4

Change-Id: I8f8f2dde261ef8322c904bfaa66ab1e0fe9c5a85
2017-04-25 00:37:21 +00:00
Treehugger Robot
f1bd536efd Merge "init: set ro.boot.avb_version in recovery mode" 2017-04-25 00:31:41 +00:00
Treehugger Robot
bcd36a20d4 Merge "init: moving early mount logic into init_first_stage.cpp" 2017-04-25 00:31:27 +00:00
Steven Moreland
d0d759dc09 libsysutils: Android.mk -> Android.bp
Test: links
Change-Id: If1d034ecb880e8c41d58b14ebebcda5b72e88424
2017-04-24 17:15:31 -07:00
Mark Salyzyn
f99a7d602a logd: add Chattiest LOG_TAG statistics
Report global LOG_TAG usage.

Switch NULL to nullptr and use const more accurately.

Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
Test: manual: inspect logcat -S results around 'Chattiest TAGs'
Test: logcat -b all -c ; logcat -b all -S ; then confirm clear
Bug: 37254265
Change-Id: I3696c0d8da3ba24f99f670aafba1e45f8cb3ab14
2017-04-24 16:04:03 -07:00
Wei Wang
35a2ee84d5 Revert "Revert "Ensure update_verifier run before zygote""
This reverts commit 2de3344180.

Change-Id: Ifc49bf389ed43a56baf5bb55d5f2028b8725083d
2017-04-24 21:33:12 +00:00
Christopher Ferris
8642fcbad2 Add the Dwarf CFA handling.
Bug: 23762183

Test: Ran new unit tests.
Change-Id: I31abac1238cc671b78a505da655fb6298be072b4
2017-04-24 13:24:33 -07:00
Mark Salyzyn
74b66822d2 Merge "Revert "logd: add Chattiest LOG_TAG statistics""
am: 5002a48cee

Change-Id: I36e508b03c1e1e2ca83f9c14aaba7daee5b49325
2017-04-24 20:07:51 +00:00
Mark Salyzyn
5002a48cee Merge "Revert "logd: add Chattiest LOG_TAG statistics"" 2017-04-24 19:54:25 +00:00
Mark Salyzyn
afd7e70553 Revert "logd: add Chattiest LOG_TAG statistics"
This reverts commit 903156ddaa.

Test: compile
Bug: 37254265
Change-Id: If9af79684119861ceecf4f88a4a4c84f991b188a
2017-04-24 19:52:33 +00:00
Tom Cherry
41dbec9791 Merge changes Ic446c026,I86568a5b
am: 51b7cb006f

Change-Id: Ia0a69e72bdc4ff7ded9ce7ce2aa183d401441b9a
2017-04-24 19:01:28 +00:00