External SD card with ext4 under Android (CM10.1)
来源:互联网 发布:linux libx264 编辑:程序博客网 时间:2024/05/21 04:43
https://blog.jplitza.de/2013/07/04/external-sd-card-with-ext4-under-android-cm10-1/
I just bought a new SD card (32 GB) because my old one died with thousands of erroneous blocks. And because this is the single biggest external storage available to me (apart from external hard drives with multiple TB), I want to be able to use this storage to transport large files – like for example HD movies. But with the default FAT32 filesystem, this is impossible: It imposes a 4 GB file size limit, which you easily reach even with DVD quality.
Now googling for nearly an hour for „ext4″ (a much better filesystem, the default one in Linux) and „Android“ didn’t yield anything really useful. The problem: ext4 supports proper permission management as opposed to FAT32, which simply allows anybody to do anything. But this is something that Android has a problem with: Every app runs as its own user and thus a file created by app A can most probably not be read by app B when you store it on ext4.
Note: In Cyanogenmod 11, ext4 formatted SD cards work out of the box.
Now really all you need to make this work is already there – at least in CyanogenMod 10.1. I put the following little script in /data/local/userinit.sh
(which is executed by CyanogenMod on startup – if it exists, which it doesn’t by default), which mounts the external SD card to a temporary mountpoint and uses the standard Android binary sdcard
to create a world-read-writeable view of this filesystem in /storage/sdcard1
(the place where CyanogenMod 10.1 mounts the external SD card by default):
#!/system/bin/shREALMNT=/mnt/fuse/sdcard1_realif ! [ -d "$REALMNT" ]; then mkdir "$REALMNT" || exit 1fimount -t ext4 /dev/block/mmcblk1p1 "$REALMNT"sdcard "$REALMNT" /storage/sdcard1 1023 1023 &
So, in contrast to what hundreds of Google results suggested, it is quite simple to use ext4 on an external SD card without the permission hassle – if you know how and have an up-to-date Android. Just wanted to drop these few lines here, hoping someone can use it. Obviously, you need root on you phone to do this, but if you have CM, you already rooted it, so wayne.
- External SD card with ext4 under Android (CM10.1)
- android sd card porting
- External SD Card & Internal Flasher Media in ICS
- Hack Android SD Card support
- Hack Android SD Card support
- android 中模拟sd card
- Virtual SD card on Android
- Android获取SD card路径
- Android - 图解如何模拟sd card,管理sd card
- sd card
- sd card
- 在Android 模拟器上使用SD card
- Android模拟器SD Card映像文件使用方法
- Android模拟器SD Card映像文件使用方法
- Android模拟器SD Card映像文件使用方法
- 对于 android emulator 如何生成SD CARD
- android中读写SD Card文件
- Android中SD Card数据存取
- Gruntfile.js详解
- 多字节与UTF-8、Unicode之间的转换
- 位运算
- H264码流打包成RTP包
- zTree学习详解
- External SD card with ext4 under Android (CM10.1)
- 【c语言】不使用+-*/计算两个数的和
- Activity与Fragment数据传递之Fragment从Activity获取数据
- (转)ASP.NET下运用Memcached建立大型WEB解决方案的运用
- RTP 打包H.264
- maven学习
- python 模块大全
- Solr之简单测试
- jquery validate 使用手册
26 GEDANKEN ZU “EXTERNAL SD CARD WITH EXT4 UNDER ANDROID (CM10.1)”