4

Every time I find a thread on the Internet describing "how to get your 64GB SD card to work with Cyanogenmod", the answer is always the same: format it to FAT32.

FAT32 does not support files larger than 4GB. Does Cyanogenmod (10.1) support a decent file system that can take files larger than that?

2
  • Do you need it to work with Windows?
    – Compro01
    Dec 3, 2013 at 21:36
  • No. If you are going to mention EXT4, there seem to be lots of issues with permissions with that, but go ahead if you have a solution.
    – David
    Dec 3, 2013 at 22:08

2 Answers 2

5

On yesterday's CyanogenMod nightly, I performed the following steps:

  1. Unmount the SD card in the UI
  2. Erase the SD card in the UI (this recreates the partition table itself and creates a new FAT32 fs)
  3. Unmount the SD card again, if needed
  4. Plug in the phone
  5. Open a shell with adb shell
  6. su to root (this has to be enabled in Settings)
  7. Run make_ext4fs /dev/block/mmcblk1p1 to create the new ext4 fs
  8. Mount the SD card in the UI (you'll have to unplug the phone to do this)
  9. Reopen the root shell and run chown media_rw:media_rw /mnt/media_rw/sdcard1 to give the folder the expected owner
  10. Run chmod 775 /mnt/media_rw/sdcard1 to make the sdcard writable

Having done this, the card is mounted automatically by CyanogenMod, and it can be written to from file managers without root privileges. I also copied music and pictures to the filesystem, and after a reboot, they are indexed and shown in Apollo and Gallery. I've only been using it for less than a day, but it's been working like a better FAT32 fs so far.

4
  • Do other apps work well? For instance, is poweramp able to find the music?
    – David
    Jul 8, 2014 at 9:24
  • I'm using CM11 (11-20140804-SNAPSHOT-M9), and your step 8 does not work for me. It says "checking for errors", but then it ends without saying anything nor mounting. However, if I ssh to android, I'm able to mount with mount -t ext4 -o rw,noatime /dev/block/mmcblk1p1 /mnt/media_rw/sdcard1 Aug 17, 2014 at 18:34
  • @David I use Apollo, and it's able to find music. I do have an issue where if I unmount and remount the SD card, then all of my playlists are invalidated; I'm not sure if that's related to the filesystem or not. Dec 10, 2014 at 3:29
  • @LuisA.Florit that's a good tip. I don't remember what behaviour I was seeing if I tried to mount while plugging in, but it may have been similar. Dec 10, 2014 at 3:33
2

The "proper" answer would be exFAT. "Proper" because exFAT is crap but since it does "fix" some of FAT's problems, it is the only hassle-free option.

Forget NTFS.

Ext4 would be a much better option. Should it be properly managed in Android regarding rights management - from my quite recent understanding (latest CM11 as of Jan 2015), Android does not expect the true external storage to understarnd, let alone enfore access rights. Since *FAT has no concept of any rights, this is no problem. However, in Linux there is no clean way of disabling rights management on a native filesystem. Android's concept of security uses UNIX access rights in a different way than it was intended. Not to blame Android, the UNIX concept is ancient but it's use comes at a price. The price being the need of external rights management which Android is not ready for and the User has (usually) no control of either.

There is a way to use ext4 on Android, called Mounts2SD. It's quite clean and reliable though it is anything but native (made of "nasty hacks" some would say). I wouldn't recommend it unless you have absolute confidence in what you are doing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .