Iteration on multi-user external storage.

Symlink to make /sdcard work for shell users.  Environment variable
to find root of multiuser SD card.

Bug: 6925012
Change-Id: I1edad8cce46df662cbff8a51ccc361f5d3e8a3aa
diff --git a/init.manta.rc b/init.manta.rc
index 985273c..7697f30 100644
--- a/init.manta.rc
+++ b/init.manta.rc
@@ -3,15 +3,14 @@
 on init
     start watchdogd
 
+    # See storage config details at http://source.android.com/tech/storage/
     mkdir /mnt/shell/sdcard0 0700 shell shell
 
-    # External storage path for apps
     export EXTERNAL_STORAGE /storage/sdcard0
-    # External storage path for adb
-    export ADB_EXTERNAL_STORAGE /mnt/shell/sdcard0/0
+    export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0
 
-    mkdir /storage 0711 root root
-    mkdir /storage/sdcard0 0000 root root
+    # Support legacy paths
+    symlink /mnt/shell/sdcard0/0 /storage/sdcard0
     symlink /storage/sdcard0 /sdcard
     symlink /storage/sdcard0 /mnt/sdcard
 
diff --git a/init.smdk5250.rc b/init.smdk5250.rc
index 15681c9..22c5e7e 100644
--- a/init.smdk5250.rc
+++ b/init.smdk5250.rc
@@ -1,15 +1,14 @@
 import init.smdk5250.usb.rc
 
 on init
+    # See storage config details at http://source.android.com/tech/storage/
     mkdir /mnt/shell/sdcard0 0700 shell shell
 
-    # External storage path for apps
     export EXTERNAL_STORAGE /storage/sdcard0
-    # External storage path for adb
-    export ADB_EXTERNAL_STORAGE /mnt/shell/sdcard0/0
+    export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0
 
-    mkdir /storage 0711 root root
-    mkdir /storage/sdcard0 0000 root root
+    # Support legacy paths
+    symlink /mnt/shell/sdcard0/0 /storage/sdcard0
     symlink /storage/sdcard0 /sdcard
     symlink /storage/sdcard0 /mnt/sdcard