Commit Graph

1573 Commits

Author SHA1 Message Date
Keun-young Park 9483be8a00 Merge "combine wait for exec log with service exit log" am: 483d2f9a59 am: 010efc6a1c am: b85523e64e
am: 58689cb421

Change-Id: If8e7055ef4f98c256a30d0719bcb157af0010e85
2017-04-28 20:55:13 +00:00
Keun-young Park 58689cb421 Merge "combine wait for exec log with service exit log" am: 483d2f9a59 am: 010efc6a1c
am: b85523e64e

Change-Id: If4e052913653de1feebde4799d19c282255f5ede
2017-04-28 20:40:13 +00:00
Keun-young Park 4de31e1481 combine wait for exec log with service exit log
- allows easier tracking of wait time from monitoring tools
- this change also reduces unnecessary log spam
- service exit log looks like this:
  init: Service 'exec 4 (/system/bin/otapreopt_slot)' (pid 611) exited with status 0 waiting took 0.060771 seconds

bug: 37752410
Test: reboot and check log
Change-Id: I122902538697f33939eede548e39f155ec419e03
2017-04-28 11:20:12 -07:00
Tom Cherry ffc791f045 Merge "init: fix last_reboot_reason string" am: 59c74a3bd1 am: 2be5884903 am: 8705f89826
am: 07ea1a8833

Change-Id: I8a0cacba81809ad93c118d28a3adf8e15514c3c9
2017-04-27 20:59:06 +00:00
Tom Cherry 07ea1a8833 Merge "init: fix last_reboot_reason string" am: 59c74a3bd1 am: 2be5884903
am: 8705f89826

Change-Id: Idaf8218594f50b860fdd9e5d12b8e6f7a4fe0e68
2017-04-27 20:29:32 +00:00
Treehugger Robot 59c74a3bd1 Merge "init: fix last_reboot_reason string" 2017-04-27 19:39:53 +00:00
Keun-young Park 29f4ee9d36 Merge "set default shutdown timeout to 6 secs" am: 47d15ed5b9 am: 0020d4c076 am: 09c780db3a
am: 6c61e087e4

Change-Id: I5ed4c11b86d3976c383f0b16b4b96ffd141830ef
2017-04-26 22:55:32 +00:00
Keun-young Park 6c61e087e4 Merge "set default shutdown timeout to 6 secs" am: 47d15ed5b9 am: 0020d4c076
am: 09c780db3a

Change-Id: I38ec920f5034b2adc9ab8354144cae1fe554d753
2017-04-26 22:49:02 +00:00
Keun-young Park 47d15ed5b9 Merge "set default shutdown timeout to 6 secs" 2017-04-26 22:35:26 +00:00
Keun-young Park 8b6d2e5709 Merge "do not start shutdown animation from init" am: 84d43c8df7 am: 76a3b3ce5c am: a15436569f
am: b549370bf3

Change-Id: I96c9073b313a4f8ef372d879ef20473b1c3beda9
2017-04-26 21:43:44 +00:00
Keun-young Park 8f30907d6f Merge "add additional dump for timeout" am: 8cde09064e am: fadad58262 am: 606df0e2cb
am: 5b1300c154

Change-Id: Idc66e41d351ac05614e8e3184005981faf755012
2017-04-26 21:43:28 +00:00
Keun-young Park b549370bf3 Merge "do not start shutdown animation from init" am: 84d43c8df7 am: 76a3b3ce5c
am: a15436569f

Change-Id: I5fea05ff1c4d5cfb2d50b9aab7805d229c43d89b
2017-04-26 21:27:01 +00:00
Keun-young Park 5b1300c154 Merge "add additional dump for timeout" am: 8cde09064e am: fadad58262
am: 606df0e2cb

Change-Id: I386ee368f2fd08575b69cc776ea2ccee55bdd225
2017-04-26 21:26:43 +00:00
Treehugger Robot 84d43c8df7 Merge "do not start shutdown animation from init" 2017-04-26 20:59:56 +00:00
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 f7ae77097c Merge changes Ibe91fd2d,I59e2bd9e am: b0a14f8feb am: 4ba72d9b73 am: 9ef76bdc72
am: a52ce58d2e

Change-Id: I94cfb446fbb3db2c90f8bc6e8bbfe6d0a7336bdd
2017-04-26 20:06:02 +00:00
Tom Cherry a52ce58d2e Merge changes Ibe91fd2d,I59e2bd9e am: b0a14f8feb am: 4ba72d9b73
am: 9ef76bdc72

Change-Id: I49823a29c3f9aaee75ca1d6d2bd092ed2cddd3f4
2017-04-26 19:59:49 +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
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
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
Bowgo Tsai d8969d665e Merge "init: fix first stage mount failure when two fstab entries have verity_loc" am: 8df35dcb1c am: 8954cd9379 am: 225177279a
am: eac5c8859d

Change-Id: If52b3eacfada96adeedcbf5338a033e40a493bd0
2017-04-26 01:25:44 +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 eac5c8859d Merge "init: fix first stage mount failure when two fstab entries have verity_loc" am: 8df35dcb1c am: 8954cd9379
am: 225177279a

Change-Id: I7bc19c9b430d23282e824797ddc3652a1efea383
2017-04-26 00:19:58 +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
Tom Cherry c608a2e796 Merge "init: rename 'Trigger' to 'Event' and convert to std::variant" am: d9ebf06117 am: d45b6f44d5 am: f9557f175c
am: e8b8045f96

Change-Id: I38e9c3d4e3c52902abaa71d40241dbba72867aee
2017-04-25 22:20:41 +00:00
Tom Cherry 0fd168d075 Merge changes I1f70f2c4,I698ca962,Idbbf2682 am: 960ed3ce1b am: 4cd8d5e9f5 am: bfbe459ff1
am: 7bd11f7f1b

Change-Id: Ieb8ae5b5ce95d607815a32facbd842340ea2ea46
2017-04-25 22:20:25 +00:00
Tom Cherry e8b8045f96 Merge "init: rename 'Trigger' to 'Event' and convert to std::variant" am: d9ebf06117 am: d45b6f44d5
am: f9557f175c

Change-Id: Ie900559a7b7d1b70aac2b9e52b1a06727348eae8
2017-04-25 21:59:03 +00:00
Tom Cherry 7bd11f7f1b Merge changes I1f70f2c4,I698ca962,Idbbf2682 am: 960ed3ce1b am: 4cd8d5e9f5
am: bfbe459ff1

Change-Id: I90526601990c7d4d3cbd2b8f3a35bf2c4c8a2ef8
2017-04-25 21:58:47 +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
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
Jaekyun Seok e83b252a9c Merge "Update persist.sys.usb.config on runtime" am: 41346e553b am: ac945881b3 am: 33e7e21645
am: 01d4504a6c

Change-Id: If1e4279f05d74eccf5ce23eef41a466b7d8e3bde
2017-04-25 04:04:35 +00:00
Jaekyun Seok 01d4504a6c Merge "Update persist.sys.usb.config on runtime" am: 41346e553b am: ac945881b3
am: 33e7e21645

Change-Id: I1e5ad9da360bfb3cb4970e12a76522fd0a5126b8
2017-04-25 04:02:35 +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
Bowgo Tsai 330be8147c Merge "init: set ro.boot.avb_version in recovery mode" am: f1bd536efd am: a1da077454 am: aacfa4f8c2
am: 6433e8dca2

Change-Id: Iac754f72903c38336d6af1aa5ba083889dda6ffb
2017-04-25 00:43:53 +00:00
Bowgo Tsai 8d6e30701a Merge "init: moving early mount logic into init_first_stage.cpp" am: bcd36a20d4 am: 2d7818a104 am: 47fe14b456
am: 58357f2b7e

Change-Id: Iff24a3fb330045bf8d32175435af147f2488b16d
2017-04-25 00:43:21 +00:00
Bowgo Tsai 6433e8dca2 Merge "init: set ro.boot.avb_version in recovery mode" am: f1bd536efd am: a1da077454
am: aacfa4f8c2

Change-Id: I6d38d066f4b23bd01e9b3aaf5143563a19d45cbd
2017-04-25 00:41:37 +00:00
Bowgo Tsai 58357f2b7e Merge "init: moving early mount logic into init_first_stage.cpp" am: bcd36a20d4 am: 2d7818a104
am: 47fe14b456

Change-Id: Ie677f3e01fe6a8f0cee96b70d29ab54d5b9cdaa8
2017-04-25 00:41:22 +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
Jeff Vander Stoep a5bdc20cf6 Merge "Sepolicy load: use -N flag to skip neverallow checks" into oc-dev am: c53ae9ed3e
am: fb62e61ec0

Change-Id: I29e27fe4ee809aaa14de77fd9529e91f175253c1
2017-04-24 22:57:20 +00:00
Jeff Vander Stoep fb62e61ec0 Merge "Sepolicy load: use -N flag to skip neverallow checks" into oc-dev
am: c53ae9ed3e

Change-Id: I4d59716ee79fdc4514d84c771fa6b45693691f50
2017-04-24 22:46:32 +00:00
Jeff Vander Stoep 955e36492e Sepolicy load: use -N flag to skip neverallow checks
Fixes issue where attributes used exclusively in neverallow
rules were removed from policy.

Bug: 37357742
Test: Force on-device compile by removing precompiled policy.
      Verify no increase in compile time.

Change-Id: I0d145fd311c2ddcb226a827f2a997f10c20a8379
2017-04-24 21:12:13 +00:00