What is Android's file system?

AndroidFilesystems

Android Problem Overview


What is Android's file system?

Android Solutions


Solution 1 - Android

It depends on what filesystem, for example /system and /data are yaffs2 while /sdcard is vfat. This is the output of mount:

rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/mtdblock0 /system yaffs2 ro 0 0
/dev/block/mtdblock1 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block//vold/179:0 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

and with respect to other filesystems supported, this is the list

nodev	sysfs
nodev	rootfs
nodev	bdev
nodev	proc
nodev	cgroup
nodev	binfmt_misc
nodev	sockfs
nodev	pipefs
nodev	anon_inodefs
nodev	tmpfs
nodev	inotifyfs
nodev	devpts
nodev	ramfs
	     vfat
	     msdos
nodev	nfsd
nodev	smbfs
	     yaffs
	     yaffs2
nodev	rpc_pipefs

Solution 2 - Android

By default, it uses YAFFS - Yet Another Flash File System.

Solution 3 - Android

Most answers here are pretty old.

In the past when un managed nand was the most popular storage technology, yaffs2 was the most common file system. This days there are few devices using un-managed nand, and those still in use are slowly migrating to ubifs.

Today most common storage is emmc (managed nand), for such devices ext4 is far more popular, but, this file system is slowly clears its way for f2fs (flash friendly fs).

Edit: f2fs will probably won't make it as the common fs for flash devices (including android)

Solution 4 - Android

Johan is close - it depends on the hardware manufacturer. For example, Samsung Galaxy S phones uses Samsung RFS (proprietary). However, the Nexus S (also made by Samsung) with Android 2.3 uses Ext4 (presumably because Google told them to - the Nexus S is the current Google experience phone). Many community developers have also started moving to Ext4 because of this shift.

Solution 5 - Android

since most of the devices use eMMC,the file system android uses is ext4,except for the firmware.refer-http://android-developers.blogspot.com/2010/12/saving-data-safely.html

Here is the filesystem on galaxy s4:

  • /system ext4

  • /data ext4

  • /cache ext4

  • /firmware vfat

  • /data/media /mnt/shell/emulated sdcardfs

The detailed output is as follows:

> /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 > ro,seclabel,relatime, data=ordered 0 0 > > /dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 > rw,seclabel,nosuid,no > dev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=o > rdered 0 0 > > /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 > rw,seclabel,nosuid,node > v,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ord > ered 0 0 > > /dev/block/platform/msm_sdcc.1/by-name/efs /efs ext4 > rw,seclabel,nosuid,nodev,no > atime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,errors=panic > ,data=ordered 0 0 > > /dev/block/platform/msm_sdcc.1/by-name/persdata /persdata/absolute > ext4 rw,secla bel,nosuid,nodev,relatime,data=ordered 0 0 > > /dev/block/platform/msm_sdcc.1/by-name/apnhlos /firmware vfat > ro,context=u:objec > t_r:firmware:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437, > iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0 > > /dev/block/platform/msm_sdcc.1/by-name/mdm /firmware-mdm vfat > ro,context=u:objec > t_r:firmware:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437, > iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0 > > /data/media /mnt/shell/emulated sdcardfs > rw,nosuid,nodev,relatime,uid=1023,gid=1 023 0 0

Solution 6 - Android

Depends on what hardware/platform you use.

Since Android uses the Linux-kernel at this level, it is more or less possible to use whatever filesystem the Linux-kernel supports.

But since most phones use some kind of nand flash, it is safe to assume that they use YAFFS.

But please note that if some vendor wants to sell a Android netbook (with a harddrive), they could use ext3 or something like that.

Solution 7 - Android

When analysing a Galaxy Ace 2.2 in a hex editor. The hex seemed to point to the device using FAT16 as its file system. I thought this unusual. However Fat 16 is compatible with the Linux kernel.

Solution 8 - Android

Similar to Linux:

  • /boot

  • /system

  • /recovery

  • /data

  • /cache

  • /misc

Solution 9 - Android

Android supports all filesystems supported by the Linux kernel, except for a few ported ones like NTFS.

The SD card is formatted as ext3, for example.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGuimoView Question on Stackoverflow
Solution 1 - AndroidDiego Torres MilanoView Answer on Stackoverflow
Solution 2 - AndroidFooleView Answer on Stackoverflow
Solution 3 - AndroiddolbiView Answer on Stackoverflow
Solution 4 - AndroidBrianView Answer on Stackoverflow
Solution 5 - Androidrupesh jainView Answer on Stackoverflow
Solution 6 - AndroidJohanView Answer on Stackoverflow
Solution 7 - AndroidMichaelView Answer on Stackoverflow
Solution 8 - AndroidMario PierreView Answer on Stackoverflow
Solution 9 - AndroidPeter vdLView Answer on Stackoverflow