Move some directory creation out of installd.
Core system directories should be created here in init.rc instead
of making installd do the creation.
Bug: 26466827
Change-Id: I313a332e74699641872c41fce5a7ca35bfce8f82
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 6d5291c..b5a905b 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -308,9 +308,6 @@
start vold
installkey /data
- # Emulated internal storage area
- mkdir /data/media 0770 media_rw media_rw
-
# Start bootcharting as soon as possible after the data partition is
# mounted to collect more data.
mkdir /data/bootchart 0755 shell shell
@@ -394,7 +391,6 @@
# Create all remaining /data root dirs so that they are made through init
# and get proper encryption policy installed
mkdir /data/backup 0700 system system
- mkdir /data/media 0770 media_rw media_rw
mkdir /data/ss 0700 system system
mkdir /data/system 0775 system system
@@ -406,6 +402,12 @@
mkdir /data/user_de 0711 system system
mkdir /data/user_de/0 0771 system system
+ mkdir /data/media 0770 media_rw media_rw
+ mkdir /data/media/0 0770 media_rw media_rw
+ mkdir /data/media/obb 0770 media_rw media_rw
+
+ symlink /data/data /data/user/0
+
setusercryptopolicies /data/user
createuserkey 0 0 0