Remove /sdcard hack for shell users.
Using a /storage/sdcard0 symlink and a tmpfs staging area was used
to enable "/sdcard" paths for both zygote processes and the shell
user, but it breaks on devices with both emulated and physical
external storage.
Specifically, vold can't mount a physical sdcard onto the primary
storage symlink, and zygote can't re-bind-mount when secondary
storage is remounted after dropping privileges.
Bug: 7094858, 7064600
Change-Id: Ide70998f7b66f1007b2017542f49ab9e8d2d96cc
diff --git a/init.manta.rc b/init.manta.rc
index 779aa77..238ff49 100644
--- a/init.manta.rc
+++ b/init.manta.rc
@@ -5,12 +5,12 @@
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell/sdcard0 0700 shell shell
+ mkdir /storage/sdcard0 0000 root root
export EXTERNAL_STORAGE /storage/sdcard0
export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0
# 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 22c5e7e..4c98bb9 100644
--- a/init.smdk5250.rc
+++ b/init.smdk5250.rc
@@ -3,12 +3,12 @@
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
export EXTERNAL_STORAGE /storage/sdcard0
export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0
# Support legacy paths
- symlink /mnt/shell/sdcard0/0 /storage/sdcard0
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard