platform_system_core/rootdir
Eric Biggers 915b8d7194 init.rc: fix (re)starting apexd on FDE devices
On first boot, FDE devices hang on the command
'wait_for_prop apexd.status activated'.  This is because apexd was
already started with the tmpfs /data, then was stopped by
vold.decrypt=trigger_shutdown_framework.  Then when apexd is started
again with the real /data, it sees that apexd.status="ready" already, so
it doesn't consider itself to be starting from scratch again.  So it
doesn't move apexd.status back to "activated" as expected.

Fix the above by resetting apexd.status to its initial value of the
empty string before trying to start apexd in the post-fs-data trigger.
Note that this also takes care of the userspace reboot case which was
previously handled in the userspace-reboot-requested trigger.

Also, FDE devices hang at the same place on non-first boots with default
encryption (i.e., when no PIN is set) because apexd is still running
after having been started with the tmpfs /data.  This is because
vold.decrypt=trigger_shutdown_framework isn't run in that case, but
rather vold manually kills processes that have open files on /data --
which doesn't include apexd.  But, apexd should be restarted too.

Fix that by using 'restart apexd' rather than 'start apexd'.

Note that these changes are needed even though FDE devices don't support
updatable APEXes, as apexd is needed regardless.

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.  Also tested userspace reboot (with FBE)
Change-Id: I4fa57cf15d77b64d1167eaf966347d2a9d6a9b72
2021-04-29 17:05:37 +00:00
..
avb [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
etc Add libneuralnetworks_shim.so to requireLibs. 2021-04-15 11:12:15 +01:00
adb_debug.prop Adding adb_debug.prop into debug ramdisk 2019-04-23 11:13:46 +08:00
Android.bp Install platform-bootclasspath generated config in /system/etc. 2021-04-15 22:32:31 +00:00
Android.mk Don't generate /etc/classpath in make. 2021-04-22 12:17:49 +00:00
asan.options Include asan options from data partition. 2017-08-09 15:32:23 -07:00
asan_extract.rc Asan_extract: Use sys.powerctl 2017-04-19 18:32:27 -07:00
asan_extract.sh Asan_extract: Use sys.powerctl 2017-04-19 18:32:27 -07:00
init-debug.rc Prevent debugfs unmount on debug builds with a persist property 2021-04-16 13:59:15 -07:00
init.environ.rc.in Export *CLASSPATH variables after apexes are configured. 2021-02-19 17:12:26 +00:00
init.rc init.rc: fix (re)starting apexd on FDE devices 2021-04-29 17:05:37 +00:00
init.usb.configfs.rc Remove sys.usb.ffs.mtp.ready property 2018-03-22 11:35:20 -07:00
init.usb.rc Copy vendor.sys.usb.adb.enabled to sys.usb.adb.enabled. 2021-03-22 16:36:17 -07:00
init.zygote32.rc init/service_parser: Add arguments window' and target' for `critical' 2020-10-26 11:38:01 +08:00
init.zygote64.rc init/service_parser: Add arguments window' and target' for `critical' 2020-10-26 11:38:01 +08:00
init.zygote64_32.rc init/service_parser: Add arguments window' and target' for `critical' 2020-10-26 11:38:01 +08:00
OWNERS Add new owners to various sub-projects. 2020-12-11 12:45:45 -08:00
ueventd.rc Give virtmanager user access to /dev/kvm and /dev/vhost-vsock for crosvm 2021-04-12 15:25:35 +00:00