From 6ad18b6e264c8e97914a15f498aaa8dfdb702f07 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 9 Apr 2012 17:29:31 -0700 Subject: Organize external storage to enforce sdcard_r. Create /storage/ to require that users have sdcard_r GID, and place both emulated and real SD card mount points inside it. Also reduce visibility of /data/media. Bug: 6131916 Change-Id: I820a347d203e8f0b3bd7f7f11e8b41d0566030bc --- init.tuna.rc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 107f496..158ad9c 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -1,14 +1,16 @@ import init.tuna.usb.rc on early-init - export EXTERNAL_STORAGE /mnt/sdcard - mkdir /mnt/sdcard 0000 system system + export EXTERNAL_STORAGE /storage/sdcard0 + mkdir /storage 0550 system sdcard_r + mkdir /storage/sdcard0 0000 system system # for backwards compatibility - symlink /mnt/sdcard /sdcard + symlink /storage/sdcard0 /sdcard + symlink /storage/sdcard0 /mnt/sdcard on post-fs-data - # we will remap this as /mnt/sdcard with the sdcard fuse tool - mkdir /data/media 0775 media_rw media_rw + # we will remap this as /storage/sdcard0 with the sdcard fuse tool + mkdir /data/media 0770 media_rw media_rw chown media_rw media_rw /data/media mkdir /data/misc/wifi 0770 wifi wifi mkdir /data/misc/wifi/sockets 0770 wifi wifi @@ -172,7 +174,7 @@ service smc_pa_wvdrm /system/bin/smc_pa_ctrl \ group drmrpc oneshot -# create virtual SD card at /mnt/sdcard, based on the /data/media directory +# create virtual SD card at /storage/sdcard0, based on the /data/media directory # daemon will drop to user/group system/media_rw after initializing # underlying files in /data/media will be created with user and group media_rw (1023) service sdcard /system/bin/sdcard /data/media 1023 1023 -- cgit v1.1