23

I know that Android uses FAT32 for SD cards and mounts them via FUSE. But which FS is attached at /? Some kind of ext? ZFS?

3 Answers 3

30

There is no singularly defined "Android" filesystem, so this can vary between devices. Any FS that the kernel can load drivers for is basically fair game.

By and large, you'll almost certainly find that ext4 is the most common filesystem on modern devices. Older devices may use older ext* versions as well, or other filesystems entirely. Since everything is built on Linux, ext4 a pretty sensible choice, with solid kernel support and a good track record. You can read a bit about why this decision was made in Ars Technica's article about the switch to ext4.

Some devices have also used Samsung's Flash-Friendly File System (f2fs). Notably, several of Motorola's devices, as well as the Nexus 9, use f2fs. The goal of f2fs was to create a file system that was designed specifically with the needs of flash-based storage mediums in mind, in an attempt to maximize performance on devices using NAND chips for their primary storage medium.

This does not mean that these are the only filesystems that Android is capable of running on, however, as I noted above. Given the kernel source and the know-how, it would certainly be possible to include drivers for other filesystems in a kernel image. Android x86 supports installation on NTFS and FAT32 filesystems, for example.

6
  • 1
    Old Samsung Android phones (early phones with Android 2.1, like the i9000) also used something called RFS, which was basically FAT with UNIX style permissions support.
    – SztupY
    Commented Jan 13, 2015 at 16:36
  • RFS had a name among most users that had a device that used it... Really Freaking Slow. Commented Jan 16, 2015 at 2:47
  • But in recent devices like Amazon Fire HD 7, a SD card cannot be formatted to ext4. Huawei Ascend P7 allows NTFS in a SD card Commented Dec 4, 2015 at 17:31
  • @david.perez The question isn't about SD cards, it's about /. Commented Dec 4, 2015 at 18:29
  • 1
    @Abdul Sort of. Many (maybe all) of the filesystems that Linux supports are implemented as kernel modules, meaning they can be omitted from a build or loaded/unloaded at runtime. They're technically still a portion of the kernel's source code, but not a mandatory part of every build, which is why support can differ between devices a bit; it's dependent on the ROM's kernel actually having the relevant module for a filesystem built and available. Commented Jun 15, 2016 at 17:02
4

YAFFS (Yet Another Flash File System) was generally used as the default file system for Android versions up to 2.3: http://www.yaffs.net/google-android

ext4 has been used ever since because of multithreading support: https://ext4.wiki.kernel.org/index.php/Main_Page

2
  • 7
    YAFFS was only used up to version 2.3, ext4 has been used since because of multithreading support.
    – Overv
    Commented Jan 13, 2015 at 9:45
  • 7
    Ars Technica has an article about the switch away from yaffs to ext4, for anyone interested, which includes some discussion with Android engineers who explain the decision a bit. Commented Jan 13, 2015 at 16:05
0

I tried with formatting all partitions with f2fs then when I flashed a custom ROM, I could find, the / is formatted with ext4fs, when I checked the batch file which comes with ROM file is the culprit, it actually reformats the f2fs partition with ext4fs.

You must log in to answer this question.

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