首页

Android4.2的多用户管理中关于SD卡的实现改动

1. 问题

2. Android4.2中对SD卡Mount的实现

2.1. 在init.rc中创建挂载点路径,及定义环境变量

mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
 
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
 
# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy

2.2. 进程内的不共享的挂载点

3. 多用户访问SD卡实现模式

4. 遗留问题

5. 最终答案

6. 参考链接


comments powered by Disqus