Include user identifier in external storage paths.
When building external storage paths, always include user in path
to enable cross-user paths and aid debugging.
Bug: 7131382
Change-Id: I28f3e17a7324eb251caf83aa81f7740aa857d248
diff --git a/init.grouper.rc b/init.grouper.rc
index 353aabe..94549e5 100644
--- a/init.grouper.rc
+++ b/init.grouper.rc
@@ -5,20 +5,23 @@
on init
# See storage config details at http://source.android.com/tech/storage/
- mkdir /mnt/shell/sdcard0 0700 shell shell
- mkdir /storage/sdcard0 0000 root root
+ mkdir /mnt/shell/emulated 0700 shell shell
+ mkdir /storage/emulated 0000 root root
+ mkdir /storage/emulated_legacy 0000 root root
- export EXTERNAL_STORAGE /storage/sdcard0
- export ADB_EXTERNAL_STORAGE /mnt/shell/sdcard0/0
- export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0
+ export EXTERNAL_STORAGE /storage/emulated_legacy
+ export ADB_EXTERNAL_STORAGE /mnt/shell/emulated/0
+
+ export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
+ export EMULATED_STORAGE_TARGET /storage/emulated
# Support legacy paths
- symlink /storage/sdcard0 /sdcard
- symlink /storage/sdcard0 /mnt/sdcard
+ symlink /storage/emulated_legacy /sdcard
+ symlink /storage/emulated_legacy /mnt/sdcard
# Save bugreports as owner
- export BUGREPORT_WRITE_PATH /mnt/shell/sdcard0/0
- export BUGREPORT_READ_PATH /storage/sdcard0
+ export BUGREPORT_WRITE_PATH /mnt/shell/emulated/0
+ export BUGREPORT_READ_PATH /storage/emulated
on early-boot
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
@@ -293,7 +296,7 @@
#Sensor load calibration files end
# virtual sdcard daemon running as media_rw (1023)
-service sdcard /system/bin/sdcard /data/media /mnt/shell/sdcard0 1023 1023
+service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
# bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys