From 1ad8d21947ae41bfb912f959fa8b93e7c86052fb Mon Sep 17 00:00:00 2001 From: Janis Danisevskis Date: Thu, 6 Apr 2017 12:44:59 -0700 Subject: [PATCH] Move early_hal start to late-fs trigger action The class early_hal is essentially for the keymaster hal which needs to be up before vold tries to unlock a storage encryption key (FDE or FBE). The current position is too early in the boot process, because on devices with legacy HAL the wrapper service uses system properties to find the legacy HAL. This patch moves the start of the early_hal class to the late-fs trigger action which runs right after the system property action. Test: Manually tested and update tested on bullhead, sailfish, and another device. Bug: 35764921 Change-Id: I34b45b85f8450e9ef18861535fdb2ee963df8c9b --- rootdir/init.rc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index f064fedee..6a01baf35 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -301,9 +301,6 @@ on post-fs start logd start hwservicemanager - # HALs required before data is mounted - class_start early_hal - # once everything is setup, no need to modify / mount rootfs rootfs / ro remount # Mount shared so changes propagate into child namespaces @@ -352,6 +349,10 @@ on post-fs # create the lost+found directories, so as to enforce our permissions mkdir /cache/lost+found 0770 root root +on late-fs + # HALs required before storage encryption can get unlocked (FBE/FDE) + class_start early_hal + on post-fs-data # We chown/chmod /data again so because mount is run as root + defaults chown system system /data