Merge "Move fsverity_init to after class_start core" am: 9a7e1eff5a am: 651703706f am: d5aaf571b7
am: a02d273417

Change-Id: I0c3e956bcabdc157b44c417acab6aea221f19a39
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 22c392d..6b000c6 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -489,10 +489,6 @@
     mkdir /data/bootchart 0755 shell shell
     bootchart start
 
-    # Load fsverity keys. This needs to happen before apexd, as post-install of
-    # APEXes may rely on keys.
-    exec -- /system/bin/fsverity_init
-
     # Make sure that apexd is started in the default namespace
     enter_default_mount_ns
 
@@ -824,6 +820,9 @@
 
     class_start core
 
+    # Requires keystore (currently a core service) to be ready first.
+    exec -- /system/bin/fsverity_init
+
 on nonencrypted
     class_start main
     class_start late_start