From f18b748b9145bc971fd4138de43f78593bf4309d Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Wed, 17 Oct 2018 13:14:55 -0700 Subject: [PATCH] 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 --- rootdir/init.rc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 21d234f78..ea83ef9be 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -275,6 +275,13 @@ on init 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 @@ on post-fs # /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