Android which file system

Android File System

Microsoft Windows users are familiar with the terms FAT32, or NTFS, which refers to types of file systems. Android devices are developed on Linux, which is based on UNIX. Linux users are familiar with good old ext2 file system. Well, your Android device may use an updated Linux file system, such as ext4, or a proprietary file system by a manufacturer, depending on who made the device and and what has been done to it by the user.

Samsung Galaxy S phones use the Samsung RFS proprietary file system while the Samsung Nexus S with Android 2.3 uses the Linux Ext4 file system. The new open standard Ext4 file system seems to be the popular standard. Android phones use the Linux kernel, and as many linux users know, linux can support a large number of operating systems.

The SDCard may be formatted ext3 or YAFFS, or ext4.

In December 2010 it was announced «Ext4 filesystem hits Android,» Google’s new Nexus S smartphone is the first Android device to use the Ext4 filesystem. Ext4 developer Ted T’so claims it is less prone to data loss. Previously, most Androids used YAFFS, a lightweight filesystem that is optimized for flash storage and is commonly used in mobile and embedded devices.

Ext4 is considered a breakthrough for Android devices, with increased data integrity and quicker data read/write access.

Contents

File System Overview

The file system structure of Android devices shares some similarities with Linux, and has some peculiar traits unique to Android.

Many applications search the entire sdcard for data files, for example, a common music player will search the entire SD Card for all audio files, including .mp3 files. This can be undesirable for (a) purists that wish to have certain files for certain purposes in specific organized and standardized places and (b) people that have audio files in certain folders they do not want showing up in the new media player just installed.

It is true that Android blows away file system and storage convention, by trying to make it seem as if there is no need for structure of the file system. The design is supposed to be a «stick it in and it just finds the stuff and works» designed for the lowest common denominator. Unfortunately, a lot of technology is heading down this zombie minded road.

Linux users are also familiar with partitions versus directories. Some directories visible via the file manager (or ls command on linux) may be mounted partitions. A good article reference to read is: Android Partitions Explained: boot, system, recovery, data, cache & misc by an author named By Haroon Q. Raja.

Hiding Media Files

If you have a folder with files, such as .mp3 files, and you don’t want them to appear to applications that scan the entire card contents, just put a .nomedia file in the folder and it wont see them. Save a null file as “.nomedia” and make sure that the Save as type is set as “All Files” instead of “Text documents.” Copy that file to the folder on your SD card containing audio files you don’t want to show up. You may have to reboot the Android after doing this.

Also, any folder whose name begins with a period, such as .secretmedia, will be invisible to scanning software also. A folder beginning with a period in the Linux / Android world is like a folder with the hidden attribute set in the Windows world.

The Linux console command to quickly create the null .nomedia file is:

SDCard

The mounted SDCard is a storage device mounted to the file system in the typical Linux fashion. On the file system root the /sdcard is a symbolic link to /mnt/sdcard. /mnt/sdcard is where the SD card is actually mounted, but the same files can also be accessed in /sdcard.

  • /mnt/sdcard — Your removable SD card data is stored here.

The Samsung Galaxy Tab 2 actually has two SDCard mounts, one for a built-in internal SDCard which is different than the device memory on a typical Android phone, and the second is the removable SDCard.

  • /mnt/extSdCard — On the Samsung Galaxy 2 tablet this is the removable SD card.
Читайте также:  Jump force mugen v7 андроид

Every Android-compatible device supports a shared «external storage» that you can use to save files. This can be a removable storage media (such as an SD card) or an internal (non-removable) storage. Files saved to the external storage are world-readable and can be modified by the user when they enable USB mass storage to transfer files on a computer.

Android uses the DCF (Design rule for Camera File system) specification. All digital cameras contain a DCIM (Digital Camera IMages) folder in their root directory. Inside this will be multiple folders named nnnABCDE, where nnn is a unique directory number between 100-999 and ABCDE is a five-character alphanumeric string often (but not required to be) related to the camera manufacturer. Image files stored within these folders will have a file name in the format ABCDnnnn, where ABCD is a four-character string (often DSC_ or IMG_) and nnnn is a unique sequential index number.

External Storage Public Directory

Android developer’s reference explains that there are certain public storage directories that are not specifically tied to a specific program. So if a program is uninstalled, it should never remove data from one of these standard public storage directories. These directories lay at the root of the external storage, such as Music/, Pictures/, Ringtones/, and others.

  • Music/ — Media scanner classifies all media found here as user music.
  • Podcasts/ — Media scanner classifies all media found here as a podcast.
  • Ringtones/ — Media scanner classifies all media found here as a ringtone.
  • Alarms/ — Media scanner classifies all media found here as an alarm sound.
  • Notifications/ — Media scanner classifies all media found here as a notification sound.
  • Pictures/ — All photos (excluding those taken with the camera).
  • Movies/ — All movies (excluding those taken with the camcorder).
  • Download/ — Miscellaneous downloads.

So an example would be /mnt/sdcard/Pictures which is made up of the first part, /mnt/sdcard (or just /sdcard) that being the root of the sdcard and then one of the directories above.

App Installation path

Preinstalled applications are in /system/app folder. User installed applications are in /data/app

  1. /data/app
  2. /data/app-private
  3. /system/app/
  4. /sdcard/.android_secure (shows .asec files, not .apks) On Samsung phones: /sdcard/external_sd/.android_secure

In Android 7.0 and before, after an APK is installed, it will be located in /data/app path.

In Android 7.0, the APK file will be installed into the /data/app/

— / folder, where the

is the package name of the APK, and the num may be 1 or 2.

File System Tree

Since Android is a Linux-based operating system for smartphones and tablets it shares the basic Linux «like» file system structure. Purists will argue that Linux is a kernel, not a file system structure, but people get the point. Android runs on top of a standard Linux kernel, and uses many of the same kernelspace utilities. The directory structure of Android looks similar to the directory structure of common Linux distributions. Android utilizes certain conventions providing uniformity in partitions versus directories on a partition. There are mainly 6 partitions in Android phones, tablets and other Android devices: boot, system, recovery, data, cache, misc.

Click on a folder for details on purpose.

Keywords: Android Tablet PC Samsung Galaxy Tab Two 2 FS File System Root Linux

Источник

Файловые системы Android

Файловая система представляет собой своего рода структуру того или иного накопителя. Она отвечает за то, какой максимальный объем файла можно сохранить в памяти, длину их названий, а также за организацию циклов записи или чтения. Файловые системы выступают в роли посредников между программным кодом и физическим вместилищем.

Для разных операционных систем и типов устройств существуют отдельные ФС и гаджеты на ОС Android, не являются исключением. Давайте разберемся, какие файловые системы поддерживает Android и для каких целей используется каждая из них?

Файловые системы Android

1. Yaffs и Yaffs2

Создателем файловой системы Yaffs (Yet Another Flash File System) является Чарльз Мэннинг, родом из Новой Зеландии. Данная ФС предназначается для организации работы флеш-накопителей и оперативной памяти. Основным ее преимуществом является повышение сроков эксплуатации модулей памяти, так как система автоматически пропускает ячейки, предназначенный для однократной записи. Yaffs2 использовалась для организации работы внутренней памяти гаджетов Android версии 2.2 и 2.3.

2. VFAT

Vfat не является полноценной самостоятельной файловой системой, а представляет собой расширение FAT. Доработанная версия позволяет сохранять файлы с длинными именами, но по всем остальным характеристикам является морально устаревшей. Vfat может использоваться на картах памяти, а операционные системы на базе ОС Андроид полностью их поддерживают. В основном, это файловая система флешки android.

Читайте также:  Как закачивать с андроидом

3. F2FS

F2FS (Flash Friendly File System) – файловая система, которая предназначена в первую очередь на работу с флеш-памятью и SSD-накопителями. Разработал ее сотрудник компании Samsung, Ким Чэ Гык, а после публикации исходного кода она была доработана другими инженерами компании. F2FS может использоваться на картах памяти SD/MMC, а также со множеством других типов памяти. Для полноценной кастомизации существует целый набор утилит. Из преимуществ можно отметить хорошую гибкость в настройке, высокие показатели сохранения жизненного цикла блоков памяти, а также хранение данных в виде журнала. Хорошую скорость работы обеспечивает то, что индексы данных сохраняются в оперативную память, а поддержка F2FS включена в ядро Linux, начиная с версии 3.8.

4. Ext2-Ext4

Ext2-Ext4 – основные файловые системы Android. Именно они используются для организации работы внутреннего хранилища на большинстве современных гаджетов, и если первые устройства работали под версиями Ext2, то начиная с версии Android 4, основными стали Ext3, а потом и Ext4. Основное отличие между вариациями заключается в наличие журналирования. То есть, если в процессе записи или чтения данных происходит системный сбой, например, неожиданное отключение питания, не произойдет потери или повреждения данных. Несмотря на то, что в основном ФС формата Ext используется в основном в блочных накопителях, пользователи могут установить данный тип и для карт памяти, но без сторонних утилит получить к ним доступ из операционных систем, помимо Linux, будет невозможно. Файловая система флэшки Android обычно форматируются в FAT (VFAT) или NTFS, а флеш-память — в Ext3 или Ext4.

5. UBIFS

mSATA SSD 16 GB Sandisk — SDSA3DD-016G

UBIFS – файловая система, предназначенная исключительно для памяти по типу NAND (флеш-накопители, применяемые на мобильных устройствах). Ее основное преимущество — это снижение износа носителей данных. Состоит такая ФС из двух слоев — UBI (отвечает за работу и связь с физическим носителем) и UBIFS (сама файловая система). Разработчиком UBIFS является компания Nokia, но встретить подобную файловую систему можно не только на оригинальных устройствах от данного производителя, но и на других гаджетах, например, китайского изготовления.

6. Samsung RFS

Samsung RFS – разработанная корейской компанией Samsung файловая система для устройств на базе ОС Linux, а одной из разновидностей последнего является Android. Предназначается фирменная ФС для флеш-памяти NAND и используется во многих гаджетах собственного производства. Для облегчения работы с файлами используется таблица формата FAT, что позволяет максимально просто произвести запись файлов на флэш-память и их чтение. Специфика RFS учитывает особенности NAND накопителей, что позволяет увеличить длительность их эксплуатации, а также снизить вероятность потери данных при системных сбоях и случайных отключениях питания.

7. SDCardFS

Компания Google долгое время использовала в своих устройствах файловую систему FUSE, но она имела ряд недостатков, среди которых необходимо отметить малое количество памяти, выделяемой под приложения под приложения, а также большое потребление хранилища при кэшировнии данных. На замену FUSE пришла SDCardFS, которая решала эти проблемы, но представляла собой своего рода оболочку, эмулирующую FAT32. Она отправляет данные файловым системам нижнего уровня, что позволяет оптимизировать работу смартфонов, а также исправляет ошибки, связанные с передачей данных на компьютер и обратно. SDCardFS по своей сути не является классической файловой системой, но значительно сказывается на скорости работы смартфонов или планшетов на Android.

Выводы

Файловые системы Android самые разнообразные. Среди них есть как общие ФС, предназначенные для работы с ОС на базе Linux, так и специфические, которые используются в NAND-накопителях. Несмотря на такое разнообразие, производители все же прикладывают совместные усилия для продвижения и улучшения той или иной файловой системы, так как именно от работы внутренних составляющих зависит будущее рынка Android-гаджетов.

Стоит также отметить тот факт, что над улучшением различных файловых систем могут одновременно работать конкурирующие концерны, и именно такое объединение заставляет цифровые технологии развиваться, независимо от того, насколько яростна борьба на потребительском рынке. И только производители смартфонов определяют, какая файловая система на Android работает лучше при тех или иных обстоятельствах.

Источник

Android File System And Directory Structure Explained

Last Updated: November 7, 2014

Most people are familiar with the file layout on Windows and are happy navigating the Windows file System.

Windows uses a drive letter for each physical drive or partition.e.g. C: drive

Note: A Physical drive will have at least 1 partition but can have more than one. This is true for both Windows and Android.

[outline style=”yellow”]What is a Disk Partition? – Disks can be subdivided into smaller disks called partitions. Partitions appear and can be used as if they were separate physical disks. [/outline]

Читайте также:  Finding android sdk version

If you insert a USB drive into your windows machine in shows up as a disk with an assigned drive letter.

Although windows shows a disk icon the disks could be partitions of a single physical disk.

Each disk partition has a root directory which contains files and folders (directories).

The root of the C drive is C:\ and of the F drive is F:\ etc

Android File System Structure

Android uses the Linux file system structure which has a single root .

The diagram below shows the structure

The system partitions and directories are protected and unless your device is rooted you don’t normally have access to these although some file managers will display them.

Physical disks and partitions appear under the root as a directories , and do not have a drive letter as in Windows.

Android doesn’t normally come with a default file manager, and so you will need to install a file manager App like Astro file manager, to locate and manage files and folders.

The sdcard and ext-sdcard Partitions

The sdcard partition is the main storage area for user data and files. It also contains App settings and data.

The sdcard partition exists even though you may not have an external sd card.

It is the internal partition.

If you open the sdcard directory you will see something like this:

Note: partial listing only

These files and directories contain your pictures,films,downloads etc as well as App data and settings.

You can view these files from your PC by connecting your device to a PC using a USB cable.

The ext-sdcard partition will only be visible if your device supports external storage, usually using a microSD slot.

External sd cards use either the FAT,FAT32 or exFAT file system formats.

Most devices support FAT and FAT32, but support for exFAT is limited.

The choice of file system is governed by the partition size as follows:

Card Type

Card Type File System

Max Capacity

SD FAT 2GB SDHC FAT32 32GB see Note SDXC exFAT 2TB

Note: Windows format size limit of 32GB. Can be larger but need to format using external tools. Windows XP could fomat FAT32 Volumes upto 128 GB

Android File Associations

Just as with other operating systems like Windows, Android will use an App to open a particular file type,denoted by the extension.

For example if you try to open a pdf file it will normally use Adobe reader (if installed) to open the file.

To open a file you will normally need to located the file using a file manager.

Just press the file to open it.


If the file type doesn’t already have an App associated with it you should be prompted to choose between the available Apps.

The option to always use that App sets it as the default App for that file type.

If you set it as the default App you will not be prompted again unless you remove the association.

To remove an association you need to remove it from the App itself.

So if the pdf files open with adobe reader and you want to change that:

  1. Go to Settings>Apps>Select Adobe reader,
  2. Then go to the Launch by default section
  3. and Clear defaults

The next time you try to open a pdf file you will be promoted to choose an App.

Android File Managers

If you search the Google play store you will find many file managers.

Which App is the most suitable depends on what you want to do. You should bear in mind that more features/functionality isn’t always better.

File managers like ESF have lots of functionality including:

  • Built in FTP client
  • Task Manager
  • Cloud storage client
  • etc

However for many this is a bit of an overkill, and so you might consider installing one of the simpler file managers like file manager and Astro file manager.

File Downloads

When you download a file using Google chrome or another browser App the file it is stored in the download directory.

You can access the directory contents through a shortcut in the Apps folder (if provided).

You can also use a file manager to locate it the folder called download. It is under your primary storage (called sdcard)

Summary

Android uses the Linux File and Directory Structure which consists of a single root.

All drives and partitions are displayed as directories in this tree like structure.

Источник

Оцените статью