ranchu: Enable an adoptable SD card
This CL is only applicable to API 23 and above. It is the ranchu version
of https://android-review.googlesource.com/195220. See also a related CL
that works for APIs 21 and 22:
https://android-review.googlesource.com/145850
It requires the following CLs:
https://android-review.googlesource.com/195057
https://android-review.googlesource.com/195240
Change-Id: Id77a3bc3d0d9a054f7e9c0f70cce678f2627912a
Signed-off-by: Yu Ning <yu.ning@intel.com>
(cherry picked from commit f08ecd12ddcde47deee418dfdb652fde5d38a16d)
diff --git a/fstab.ranchu b/fstab.ranchu
index f3c9a47..f155c5a 100644
--- a/fstab.ranchu
+++ b/fstab.ranchu
@@ -2,7 +2,7 @@
#<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
-/dev/block/vda /system ext4 ro wait
-/dev/block/vdb /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
-/dev/block/vdc /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check
-#/devices/platform/goldfish_mmc.0 auto vfat defaults voldmanaged=sdcard:auto
+/dev/block/vda /system ext4 ro wait
+/dev/block/vdb /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
+/dev/block/vdc /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check
+/devices/*/block/vdd auto auto defaults voldmanaged=sdcard:auto,encryptable=userdata
diff --git a/init.ranchu.rc b/init.ranchu.rc
index d4e4e9f..b6ae8b7 100644
--- a/init.ranchu.rc
+++ b/init.ranchu.rc
@@ -5,12 +5,8 @@
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
-
# Support legacy paths
- #symlink /storage/sdcard /sdcard
- #symlink /storage/sdcard /mnt/sdcard
+ symlink /sdcard /mnt/sdcard
symlink /dev/goldfish_pipe /dev/android_pipe
symlink /dev/goldfish_pipe /dev/qemu_pipe