Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Why doesn't Android support Linux filesystems for removable storage?

Pale Dot (2813911) writes | about a year and a half ago

Android 1

Pale Dot (2813911) writes "After weeks of struggle I finally figured out a way for the apps on my rooted Android tablet to recognize an SD card I had formatted as Ext4 but with the default journaling option turned off. The problem at first was getting the SD card to mount at all (technically this was the "external" SD card as the tablet also has a built-in "internal" SD card). Apparently, the Android automount facility, the evil-sounding vold daemon, does not support any filesystem besides Microsoft's VFAT. From various online sources, I learned that the CyanogenMod Linux 3.x kernel itself does support mounting Ext4, at least via the terminal "mount -t ext4" command.

A second problem soon cropped up. Apps, such as VLC and the AardDict offline dictionary, that rely on some sort of automagic scanning of the device storage space would not index the media and database files I copied to the SD card. It turns out that the simple solution, or the "hack" as it stands, is to mount the SD card under the directory created for the internal VFAT-formatted SD card, i.e. as "/storage/sdcard0/extsd" rather than the more direct "/storage/sdcard1". This works probably because subdirectories inherit the file permissions of the parent.

As part of my Google (re)search into the problem, I came upon this Google+ post by an Android developer curiously named Dianne Hackborn about the design decision not to support anything besides the Redmond-certified filesystem: "The external storage when on a SD card is FAT. Period. You are just going to cause yourself a mess if you try to do otherwise. The basic semantics of how external storage is used relies on it being fat — no permissions, case insensitive, etc."

So, is Google right about not supporting Ext2/3/4 for removable flash media, even if the base system itself often uses one of these Linux-native filesystems? Supposed issues about the frequent media access needed by a journalised filesystem don't apply to Ext2, which has no journal, or Ext4, which has an "-O ^has_journal" (no journal) formatting option. Perplexing still is that my tablet is advertised as having support for yet another Microsoft-patented invention, the ExFat filesystem. Unfortunately, there's still no way for a non-rooted Android tablet or smartphone to mount an SD card formatted as Ext2 or Ext4."

Sorry! There are no comments related to the filter you selected.

Okay, but advantages does ext4 have on VFAT ? (0)

Dngrsone (2820801) | about a year and a half ago | (#42956019)

Yes, it seems a bit backward for Android to ignore the ext4 format, considering the roots of their operating system, but what advantages would ext4 have over VFAT when it comes to externally mounted SD cards? Because of the finite write limits of Flash memory, journaling is a bad idea and will never be supported. What about overhead? Is there an advantage in overhead for the ext4 system vs ext2 or VFAT? There are legitimate reasons to have ext4 as a file system manager on a computer. These include having the ability to use larger, more complex file names, journaling, greater capacity storage media and hugely nested directory tree structures. None of these advantages can be reasonably translated onto a (relatively) small storage medium such as an SD card, which suffers, by its nature, a limited life span (finite writes). Yes, you could use ext4 on an SD card, if you hack it right; you have proven that. However, there seems to be no rpactical reason why Android should support ext4 on SD cards.
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?