Organize external storage to enforce sdcard_r.

Create /storage/ to require that users have sdcard_r GID, and place
both emulated and real SD card mount points inside it.  Also reduce
visibility of /data/media.

Bug: 6131916
Change-Id: I0d1d8cbe6d18f67ca7bb889711b27edd17ab70d7
diff --git a/init.manta.rc b/init.manta.rc
index 2aef236..1f3b1fd 100755
--- a/init.manta.rc
+++ b/init.manta.rc
@@ -1,13 +1,15 @@
 import init.manta.usb.rc
 
 on early-init
-    export EXTERNAL_STORAGE /mnt/sdcard
-    mkdir /mnt/sdcard 0000 system system
-    symlink /mnt/sdcard /sdcard
+    export EXTERNAL_STORAGE /storage/sdcard0
+    mkdir /storage 0550 system sdcard_r
+    mkdir /storage/sdcard0 0000 system system
+    symlink /storage/sdcard0 /sdcard
+    symlink /storage/sdcard0 /mnt/sdcard
 
 on post-fs-data
-    # we will remap this as /mnt/sdcard with the sdcard fuse tool
-    mkdir /data/media 0775 media_rw media_rw
+    # we will remap this as /storage/sdcard0 with the sdcard fuse tool
+    mkdir /data/media 0770 media_rw media_rw
     chown media_rw media_rw /data/media
     setprop vold.post_fs_data_done 1
     mkdir /data/misc/wifi 0770 wifi wifi
@@ -33,7 +35,7 @@
     chmod 0666 /sys/class/backlight/pwm-backlight.0/brightness
     chown system system /sys/class/backlight/pwm-backlight.0/brightness
 
-# create virtual SD card at /mnt/sdcard, based on the /data/media directory
+# create virtual SD card at /storage/sdcard0, based on the /data/media directory
 # daemon will drop to user/group system/media_rw after initializing
 # underlying files in /data/media will be created with user and group media_rw (1023)
 service sdcard /system/bin/sdcard /data/media 1023 1023