Start logd and service managers during the 'init' trigger
Now that we mount partitions early, services can be started before the
'fs' trigger. We therefore start the service managers as early as
possible to ensure their transports are online, without device
specific rc files needing to handle that. We also start logd even
one step earlier to ensure that we capture all possible logd.
Bug: 89689596
Test: logging works for early services, include the servicemanagers
Change-Id: I75dbfcd26eb6fa77f002de10afd00f085c93aa07
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 21d234f..ea83ef9 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -275,6 +275,13 @@
chown root root /apex
restorecon /apex
+ # Start logd before any other services run to ensure we capture all of their logs.
+ start logd
+ # Start essential services.
+ start servicemanager
+ start hwservicemanager
+ start vndservicemanager
+
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
@@ -331,11 +338,6 @@
# /vendor/build.prop and
# /factory/factory.prop
load_system_props
- # start essential services
- start logd
- start servicemanager
- start hwservicemanager
- start vndservicemanager
start vold
exec - system system -- /system/bin/vdc checkpoint markBootAttempt