am 218f48d6: Merge "bundle init.rc contents with its service"
* commit '218f48d6c55a7ee5115a7a8fc4248d33ea01811f':
bundle init.rc contents with its service
diff --git a/Android.mk b/Android.mk
index 1a4f8dd..a1c9b6e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -88,6 +88,8 @@
main.cpp \
$(common_src_files)
+LOCAL_INIT_RC := vold.rc
+
LOCAL_C_INCLUDES := $(common_c_includes)
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
@@ -112,5 +114,6 @@
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_CFLAGS := $(vold_cflags)
LOCAL_CONLYFLAGS := $(vold_conlyflags)
+LOCAL_INIT_RC := vdc.rc
include $(BUILD_EXECUTABLE)
diff --git a/vdc.rc b/vdc.rc
new file mode 100644
index 0000000..e842869
--- /dev/null
+++ b/vdc.rc
@@ -0,0 +1,13 @@
+# One shot invocation to deal with encrypted volume.
+service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted
+ disabled
+ oneshot
+ # vold will set vold.decrypt to trigger_restart_framework (default
+ # encryption) or trigger_restart_min_framework (other encryption)
+
+# One shot invocation to encrypt unencrypted volumes
+service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default
+ disabled
+ oneshot
+ # vold will set vold.decrypt to trigger_restart_framework (default
+ # encryption)
diff --git a/vold.rc b/vold.rc
new file mode 100644
index 0000000..dcf77a2
--- /dev/null
+++ b/vold.rc
@@ -0,0 +1,4 @@
+service vold /system/bin/vold
+ class core
+ socket vold stream 0660 root mount
+ ioprio be 2