I see some mentions here of creating an ext4-formatted SD card, but no guide. This closely-related question suggests there is no way to do it, but my question differs in that my phone is specifically rooted.
I formatted my card as ext4 (GUID partition-table); my Cyanogenmod phone mounted it at
/mnt/fuse/sdcard1. I followed instructions here to mount the card at
/storage/sdcard1, by creating the following script at
#!/system/bin/sh REALMNT=/mnt/fuse/sdcard1_real if ! [ -d "$REALMNT" ]; then mkdir "$REALMNT" || exit 1 fi mount -t ext4 /dev/block/mmcblk1p1 "$REALMNT" sdcard "$REALMNT" /storage/sdcard1 1023 1023 &
I restarted and attempting to copy a file (using ES File Explorer) and paste it into its parent directory, which failed:
/storage/sdcard1/foo/bar.mp3: open failed: EACCES (Permission denied).
I can actually play the file fine, so I can open it. FWIW, when I try copying from the original mount point (
/mnt/fuse/sdcard1), I get a slightly different error:
Failed to copy the file bar.mp3
I'm using a Samsung Galaxy S3 with Cyanogenmod 10.2.0-i9300.
su ls -l /mnt/fuse drwxrwxr-x media_rw media_rw 2014-03-04 22:08 sdcard1
That was all. There is no
sdcard1_real in this directory, so I suppose the script is failing?
I tried modifying the script to troubleshoot. The script begins fine, but then fails on
mkdir "$REALMNT" with the error
/data/local/userinit.sh: : not found.
I know that the script doesn't work, so fixing it might solve my question, but I thought the following was interesting. I formatted my SD card in my Linux computer, and transferred some files to it. Oddly enough, permission errors only occur in the subdirectories that I created. In the root of the partition (via
/storage/sdcard1), I already have write permission.