Merge "init.rc: start netd and zygote early for file based encryption devices" am: 4bf2bc078f am: 1a65e43878
am: 3b272c7bf8

Change-Id: Ie44f4fd8a04b1fa1d0a5c6f7e01410246589c9d9
diff --git a/rootdir/init.rc b/rootdir/init.rc
index f7ac721..085ecaf 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -290,8 +290,7 @@
     # /data, which in turn can only be loaded when system properties are present.
     trigger post-fs-data
 
-    # Now we can start zygote for file base encryption devices in
-    # init.{$device}.rc
+    # Now we can start zygote for devices with file based encryption
     trigger zygote-start
 
     # Load persist properties and override properties (if enabled) from /data.
@@ -303,6 +302,12 @@
     trigger early-boot
     trigger boot
 
+on post-fs-data && property:ro.crypto.state=encrypted && property:ro.crypto.type=file
+    start netd
+
+on zygote-start && property:ro.crypto.state=encrypted && property:ro.crypto.type=file
+    start zygote
+
 on post-fs
     start logd
     # once everything is setup, no need to modify /