Wait for hwservicemanager ready before running fsck

As property service is part of init, and if init is busy with built-in
command e.g. fsck, the propety_set() won't go through until the built-in
command is finished.
Move the start of hwservicemanager earlier and wait for its done after
launches bootanim and its dependencies (there is not wait time during
boot but the command is as a safeguard).

Bug: 74437368
Test: boot with simulated long fsck and bootanim shown early
Test: boot see 'start_waiting_for_property("hwservicemanager.ready", "true"): already set'
Change-Id: Iab4b857a51e0e6b8b059d063c1f0d65a0e987622
This commit is contained in:
Wei Wang
2018-04-04 13:45:33 -07:00
committed by Jorge Lucas
parent 91e5319362
commit 30cf8bc052

View File

@@ -49,11 +49,10 @@ on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
mount_all /vendor/etc/fstab.qcom --early
write /proc/sys/vm/swappiness 100
# Start HW service manager early
start hwservicemanager
mount_all /vendor/etc/fstab.qcom --early
write /proc/sys/vm/swappiness 100
on late-fs
# Start services for bootanim
@@ -63,6 +62,11 @@ on late-fs
start configstore-hal-1-0
start gralloc-2-0
# Wait for hwservicemanager ready since fsck might be triggered in mount_all --late
# In such case, init won't responce the property_set from hwservicemanager and then
# cause services for bootanim not running.
wait_for_prop hwservicemanager.ready true
# mount RW partitions which need run fsck
mount_all /vendor/etc/fstab.qcom --late