diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-04-09 17:29:31 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2012-04-10 10:58:08 -0700 |
commit | 1c0e73cbfe5d3897ed3639316aee623ea820447d (patch) | |
tree | a05ccc45824ffb22e87b272f8092c6859bbcf58c | |
parent | c91c2281b21d1ded85d37da404eec8d7e01fa19b (diff) | |
download | device_samsung_tuna-1c0e73cbfe5d3897ed3639316aee623ea820447d.zip device_samsung_tuna-1c0e73cbfe5d3897ed3639316aee623ea820447d.tar.gz device_samsung_tuna-1c0e73cbfe5d3897ed3639316aee623ea820447d.tar.bz2 |
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
-rwxr-xr-x | init.tuna.rc | 14 | ||||
-rw-r--r-- | overlay/frameworks/base/core/res/res/xml/storage_list.xml | 2 |
2 files changed, 9 insertions, 7 deletions
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 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 043530d..0a03928 100644 --- a/overlay/frameworks/base/core/res/res/xml/storage_list.xml +++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml @@ -33,7 +33,7 @@ --> <StorageList xmlns:android="http://schemas.android.com/apk/res/android"> - <storage android:mountPoint="/mnt/sdcard" + <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" android:emulated="true" |