vexpress: Use sdcard partiion rather than emulated storage

This patch makes vexpress stop using the common init.partitions.rc
(which initialises the emulated storage) and instead sets up the real
sdcard partition on /mnt/sdcard. Note, vold.fstab is already setup to
mount the sdcard partition.

We also need to call "mount_all /fstab.partitions" to mount the other
partitions as that was done by the init.partitions.rc file we are no
longer using.

This fixes bug Launchpad bug 1086623. However, it appear to reliably
trigger bug 1112449.

Change-Id: Ia618e955a48cb04d8f05ef6c1822af2995d7b757
Signed-off-by: Jon Medhurst <tixy@linaro.org>
diff --git a/device.mk b/device.mk
index a2daf31..780d661 100644
--- a/device.mk
+++ b/device.mk
@@ -1,6 +1,5 @@
 PRODUCT_COPY_FILES := \
     device/linaro/common/fstab.partitions:root/fstab.partitions \
-    device/linaro/common/init.partitions.rc:root/init.partitions.rc \
     device/linaro/vexpress/vold.fstab:system/etc/vold.fstab \
     device/linaro/vexpress/egl.cfg:system/lib/egl/egl.cfg
 
diff --git a/init.arm-versatileexpress.rc b/init.arm-versatileexpress.rc
index 3950938..56579e0 100644
--- a/init.arm-versatileexpress.rc
+++ b/init.arm-versatileexpress.rc
@@ -1,4 +1,8 @@
 on init
+    export EXTERNAL_STORAGE /mnt/sdcard
+    symlink /mnt/sdcard /storage/sdcard0
+    symlink /mnt/sdcard /sdcard
+
     # mount debugfs
     mount debugfs /sys/kernel/debug /sys/kernel/debug
 
@@ -33,6 +37,9 @@
     chown system system /sys/class/graphics/fb0/fit_to_screen
     chown system system /sys/class/graphics/fb1/overlays
 
+on fs
+    mount_all /fstab.partitions
+
 # setup IRQ affinity to the A7s
 service setirqaffinity /sbin/set_irq_affinity.sh 0xc07
     class main
diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
index 0a03928..4df343c 100644
--- a/overlay/frameworks/base/core/res/res/xml/storage_list.xml
+++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
@@ -33,9 +33,8 @@
 -->
 
 <StorageList xmlns:android="http://schemas.android.com/apk/res/android">
-    <storage android:mountPoint="/storage/sdcard0"
+    <storage android:mountPoint="/mnt/sdcard"
              android:storageDescription="@string/storage_internal"
              android:primary="true"
-             android:emulated="true"
-             android:mtpReserve="100" />
+             android:removable="true" />
 </StorageList>