Enforce READ_EXTERNAL_STORAGE on emulator.
Bug: 7203378
Change-Id: I2f34dd44ad97f9eb5b147904758ebb0ac61c0866
diff --git a/data/etc/vold.conf b/data/etc/vold.conf
deleted file mode 100644
index 7888936..0000000
--- a/data/etc/vold.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-## vold configuration file for the emulator/SDK
-
-volume_sdcard {
- ## This is the direct uevent device path to the SD slot on the device
- emu_media_path /devices/platform/goldfish_mmc.0/mmc_host/mmc0
-
- media_type mmc
- mount_point /sdcard
- ums_path /devices/platform/usb_mass_storage/lun0
-}
diff --git a/fstab.goldfish b/fstab.goldfish
index 458a555..7bfef7a 100644
--- a/fstab.goldfish
+++ b/fstab.goldfish
@@ -2,4 +2,4 @@
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
-/devices/platform/goldfish_mmc.0 /mnt/sdcard vfat defaults voldmanaged=sdcard:auto
+/devices/platform/goldfish_mmc.0 /storage/sdcard vfat defaults voldmanaged=sdcard:auto
diff --git a/init.goldfish.rc b/init.goldfish.rc
index 1373be8..84c4b15 100644
--- a/init.goldfish.rc
+++ b/init.goldfish.rc
@@ -1,10 +1,17 @@
+
on early-init
- export EXTERNAL_STORAGE /mnt/sdcard
- mkdir /mnt/sdcard 0000 system system
- # for backwards compatibility
- symlink /mnt/sdcard /sdcard
mount debugfs debugfs /sys/kernel/debug
+on init
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /storage/sdcard 0555 root root
+
+ export EXTERNAL_STORAGE /storage/sdcard
+
+ # Support legacy paths
+ symlink /storage/sdcard /sdcard
+ symlink /storage/sdcard /mnt/sdcard
+
on boot
setsebool in_qemu 1
restorecon /sys/qemu_trace/process_name