diff options
author | Eric Biggers <ebiggers@google.com> | 2021-04-28 10:15:38 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2021-05-03 21:38:50 -0700 |
commit | 1c51525f6686a97e32c166facad93fc97eacf0f9 (patch) | |
tree | 3c62aedecef2e6a4c3434918290598561b5236d8 /trusty/coverage/coverage_test.cpp | |
parent | 362b2b7537b1c3aa20c48a3ecb2bc12cca9963c0 (diff) |
init: make reboot_on_failure not apply to manually stopped services
Add a new service flag SVC_STOPPING which tracks whether a service is
being manually stopped by init, and make the "reboot_on_failure" service
setting not apply when SVC_STOPPING is set.
This is needed for devices that use FDE, because otherwise the device
reboots during the following init script fragment:
on property:vold.decrypt=trigger_shutdown_framework
class_reset late_start
class_reset main
class_reset_post_data core
class_reset_post_data hal
... because that stops all services, including apexd which has been
marked with reboot_on_failure since
https://android-review.googlesource.com/c/platform/system/apex/+/1325212.
So init was killing apexd, then rebooting the device because apexd
"failed" due to having been killed. Making reboot_on_failure not apply
when init stops a service itself fixes the problem.
This is one of a set of changes that is needed to get FDE working again
so that devices that launched with FDE can be upgraded to Android 12.
Bug: 186165644
Test: Tested FDE on Cuttlefish
Change-Id: I599f7ba107e6c126e8f31d0ae659f0ae672a25e4
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions