Where are the folders on Android? Structure and purpose of folders and files in Android

💖 Do you like it? Share the link with your friends

In contact with

Introduction

Communicating on forums and being the curator of several topics, I often encounter a complete misunderstanding of newbies about the design of Android. “Well, why does the average user need to know this?” - you say. And here I agree with you, asking a counter question: “Why then does an ordinary user get into the jungle of firmware, root access and system tweaks, without understanding anything about it?” This is what prompted me to write this article, in which I will try, in the usual and in clear language, convey complex things.

The material is aimed primarily at ordinary users. Therefore, concise and superficial information will be presented here without technical depths and nuances.

  1. Sections internal memory.
  2. Bootloader, recovery, adb Andfastboot
  3. Internalities of the system.
  4. Root.


1. Internal memory sections

The internal memory of an Android device is divided into several logical drives (partitions).

I will give only the main ones:


Fig.1

Bootloader– here is the firmware (bootloader) that allows you to launch the operating system, recovery and other service modes.

Recovery– as the name suggests, it is installed here engineering menu recovery or just Recovery.

Boot- the heart of the Android OS, here is the kernel, drivers and settings for managing the processor and memory.

System– the system partition, which contains all the files necessary for the operation of the Android OS, it’s like Windows folder on your C:\ drive (hereinafter I will make an association with the OSWindows)

Data– a section for installing applications and storing their data. (Program files)

User– this is the well-known sdcard or, more simply put, a place for user files (My Documents). Here I am forced to make a digression, because... placement of this section has several options:

  • The partition is not in the internal memory, but is used instead external storage- the most popular option. (Fig.1)
  • In devices with large built-in memory, this section appears assdcard , and the external memory card is seen assdcard 2 orextsd (there may be other name options). Typically found on devices withAndroid3.2. (Fig.2 Option 1)
  • This option replaced the previous version, along with Android 4.0. ChapterUser replaced with a foldermedia on the sectionData , which made it possible to use all the memory available to the user for installing programs and storing data, and not the amount that the manufacturer allocated to us. In other wordssdcard Anddata are one whole. (Fig.2 Option 2)




Fig.2

2. Bootloader Recovery adb and fastboot

Now that we know what is where, let's figure out why it is there.

Let's start with Bootloader. This is the bootloader that launches Android, recovery, etc. When we press the power button, the bootloader starts and, if there are no additional commands (pressed keys), starts loading boot. If a key combination was pressed (each device has its own), then it launches, depending on the command, recovery, fastboot or apx. The figure below clearly shows what triggers Bootloader and how the sections are interconnected.


Fig.3

As can be seen from Figure 3, section Recovery does not affect the loading of the Android OS, but why is it needed then? Let's try to figure it out.

Recovery (recovery) is essentially a small utility based on Linux kernel and is loaded regardless of Android. Its standard functionality is not rich: you can reset the device to factory settings or update the firmware (pre-downloaded onsdcard). But, thanks to folk craftsmen, we have modified recoveries through which you can install modified (custom) firmware, configure android, create backups and much more. The presence or absence of recovery, as well as its version, do not affect the performance of the Android OS (Very frequently asked question on the forums).

Particularly attentive readers may have noticed Fig.3 some Fastboot. This is an interface for working directly with internal memory sections using command line. Through it you can flash recovery, kernel or new version firmware, or format (delete all information) one section or another.

Since we're talking about interfaces, I want to talk about one more, quite well-known one - adb (android debug bridge) . This is the so-called debug mode and it is named so for a reason - through it you can monitor the work of both the system as a whole and individual applications. But that's not all, with the help adb you can get full access to the device’s file system and change system files or pull it out important information when your device is stuck loading. All functions debug mode I won’t describe it because my goal is to convey general information, not detailed review about the functions of a particular mode.

3. Internalities of the system

Having understood the theory, let's launch the Android OS.

Press the power button - it starts Bootloader which loads Core(boot), it in turn runs system(System), well, it’s already loading programs(data) and user space (user). ( Fig.3)

Now let's go to the root directory and look at the insides of the Android OS itself:


(Fig.4)

In this diagram I have provided only the directories necessary for reference. In fact, there are many more of them and there is only one folder to review System you'll need a whole article.

And so, folder data. As the name suggests, it has something to do with data, but what kind? Yes, with almost everyone, this includes data on synchronization and accounts, passwords to points wifi access and VPN settings, and so on. Among other things, here you can find folders app, data And dalvikcache– let’s look at their purpose:

  • app– programs and games are installed here.
  • data– application data, settings, game saves and other information are stored here.
  • dalvikcache— software cache memory area for the Dalvik program. Dalvik is Java virtual machine, which is the basis for the operation of programs that have a *.apk extension. In order to make programs launch faster, their cache is created.

Folder System stores system data and everything necessary for the operation of the OS. Let's look at some of these folders:

  • app– here are system applications (SMS, phone, calendar, settings, etc.), as well as applications installed by the device manufacturer (branded widgets, live wallpapers, etc.).
  • fonts– system fonts
  • media– contains standard ringtones calls, notifications, alarms and interface sounds, as well as boot animation (bootanimation)
  • build. prop– This file is almost the first to be mentioned in conversations and articles about fine-tuning the system. It contains a huge number of settings, such as screen density, proximity sensor delay time, wifi control, device name and manufacturer, and many other parameters.

4. Root

Knowing what's in which folder is good, but can you do something about it?

- Yes! But we need rights superuser (root) or, if we draw an analogy with Windows, Administrator rights. Initially, all Android devices come without root rights for the end user, i.e. When we buy a device, we are not full-fledged owners of it. This is done both to protect against malware, and from the user himself - after all, in inept hands, full access to the system can lead to “death” operating system and the subsequent need to flash the device.

“Well, what is the use of such a dangerous thing?”- you ask.

Now I'll tell you:

  • The ability to backup data and restore it after flashing or accidental deletion.
  • Fine-tuning the system manually or using special programs.
  • Removing system applications, ringtones, wallpapers, etc.
  • Change appearance OS (for example, displaying battery charge as a percentage)
  • Adding functionality (supportadhoc networks, for example)

This list can be continued for a long time, but I think these examples will be enough to get an idea of ​​the capabilities and breadth of application of root privileges.

- This is all great, but now any program will be able to access the “heart” of the operating system and my data?

- No. You decide whether to allow this or that application to gain root access or not. For this there is a program called Superuser or its advanced sister SuperSU. Without this or a similar program, it is not possible to use root.

Epilogue

As you can see, Android is not that complicated. I hope that after reading the article, you learned something new or received an answer to a question that has been of interest to you for a long time.

I’ll take my leave then, see you in the comments. 😉

One of the popular operating systems today is Android. It's installed on millions mobile devices. The system is a set of folders and files that ensure its operation. But have you ever wondered what is contained in each folder? Some are quite heavy, so the hand is tempted to remove them. Before you do this, you should definitely familiarize yourself with what each folder is responsible for, as well as how important it is for the operating system. We will also tell you what ways to delete an unnecessary folder.

Basic key directories in the android operating system

The first priority before deleting is to find out what the directory contains, because this determines whether it can be deleted or not. If you erase important files by mistake, you can not only disrupt the operation of some applications, but also cause the entire operating system to become completely inoperable.

It is worth noting that the list of folders may differ depending on the device and version of the android system. Also, specific applications can create their own folders in the Android phone’s memory. Let's look at what directories are available in Android.

Cache is a folder for storing temporary files. It may contain a system update. If you are not going to update to a more recent version of Android, then you do not need the update file. You can delete this folder, and in some cases it is even necessary.

Data is one of the largest catalogs, which, as you might guess from the name, contains a variety of data. This includes account data, information about saved passwords, points Wi-Fi access and so on. Since this folder contains a lot of information, let’s look at its subdirectories:

  1. App – directory containing setup files various applications. You can delete it if you do not need all the applications downloaded to your phone;
  2. Data – includes settings, saves and other service information necessary for the operation of specific applications. If there is no data important to you in the applications, you can also delete it;
  3. Clipboard is a special data clipboard that also contains the latest screenshots. It is possible to delete this folder, but it is not recommended;
  4. Dalvik-cache is a cache area for a program called Davlink. This application is a Java virtual machine that allows the phone to run application apk files. To speed up this process as much as possible, files are created in cache memory. It is recommended to clean the contents regularly, but you should not delete dalvik-cache.

The efs folder contains information about serial number phone (IMEI), MAC address, Bluetooth and Wi-Fi. This directory cannot be deleted. Moreover, it is recommended to make a backup of this folder, since deleting it will lead to the loss of the unique number of your smartphone.

The etc directory contains configuration files, mainly used during OS loading, processes of various programs, for example, to determine GPS location. This is one of the system directories that cannot be deleted.

lib directory – this contains various libraries needed for correct operation functions of programs and modules. This folder also contains files that ensure the drivers work. It cannot be deleted.

The mnt directory contains images of mounted systems. Sections may be located here installed card memory, internal memory or other virtual devices. Delete this catalog, of course, it’s also impossible.

The proc folder – it contains all the key information regarding the installed Android OS: information about the kernel, configuration parameters and hardware. All existing files and folders are virtual and weigh zero bytes. The system automatically creates them when the user accesses them. This folder with rights regular user cannot be deleted.

The sbin directory is one of the key folders required for the phone to operate. It contains executable files of all programs designed to manage the system. Accordingly, it cannot be deleted.

The sys directory contains the system configuration on this moment. This is a dynamic directory. The information in it is constantly changing. This folder cannot be erased.

The system partition is the “backbone” of the entire operating system, since it is in it that all the files are located, without which it is impossible to work android. The System directory (like any other internal directories) cannot be deleted. To get acquainted, let's take a closer look at the contents of this directory:

  1. App – system wallpaper, standard applications(calendar, notebook, SMS) are located in this folder.
  2. Bin includes executable files and links;
  3. Build.prop contains a huge number of settings for the phone, for example, how long the sensor is delayed after pressing, what is the screen density, and more;
  4. Fonts – information about all stock fonts supported on the phone.
  5. Framework – everything that is needed for the interface, in particular icons, curtains and other graphic elements;
  6. Lib – application library;
  7. Media – all standard melodies and sounds (alarm clock, SMS notifications, call tones);
  8. Tts includes language packs.

Documents – a folder that can contain various documents, in particular .doc and .pdf files. If the contents of the folder do not interest you, you can delete it.

Bluetooth – contains all files that were received by the device via Bluetooth. If there is no important data in it, it is deleted without problems. It can be located not only in internal memory, but also on an SD card.

DCIM is a special directory for saving photos taken using your smartphone's camera. As a rule, it includes a Camera section, in which all photos are located. If the photo you need is not on your phone, you can delete it. Sections such as Pictures, Images, Audio, Music (if there are no important files inside) can also be deleted.

Removal methods

How can I delete specific folder? The first way is to use standard functions. To do this you need:

note that standard means do not display all available folders and files, since system files are often hidden. Any outsider will help you see more file manager, for example, the ES Explorer program. You can download it in the store Google Play. The application offers ample opportunities. With it, you can view existing folders, as well as delete some of them. To do this you need:

It is worth noting that deleting system folders is not possible because the user has limited access rights. They can only be deleted by obtaining special superuser rights (the equivalent in Windows is Administrator).

File managers on Android can be convenient tool to organize data storage in your smartphone, but the Android structure itself (or its apparent lack thereof) may seem somewhat confusing if you're not used to it. App data, pictures, music - and accessing it all from one root folder - is a slightly different approach to hierarchical structure than what PC and Mac users are used to, and it gives users much more options than iOS.

On Android, you won't be able to access deeply hidden system files through a regular file manager or by connecting to a PC. But this does not mean that you can delete any file you want on a whim. Let's take a look at how typical folders are organized in the device's memory, what they are for, and what you can delete from them and what you can't.

Android device memory hierarchy

Since Android is a Linux-based operating system, your phone file system also organized according to the Linux principle. In this system, each device has six main partitions: boot, system, recovery, data, cache and misc. microSD memory cards also have their own memory hierarchy. Devices carrying Android 7.0 Nougat are able to continuously update due to the fact that paired with system partition a second one is created and one of them is updated in the background, and when you reboot, a switch occurs, allowing the updated system to work.

Here short description what is contained in each folder.

  • boot– This folder contains the kernel, virtual disk etc., that is, what is required to boot the phone when you turn it on.
  • system– The system folder contains the operating system files (also known as the system image), which also includes the graphics Android interface and pre-installed applications.
  • recovery– An alternative option to boot the OS, programs from the recovery folder allow the user to make backups of other folders and restore them.
  • data– The data folder stores user information, from contacts and messages to applications and music, and you have access to this section through a file browser. After a factory reset, this partition is erased.
  • cache– Android stores frequently used data and application components here. This partition can be erased to fix certain problems and will be automatically restored and updated over time.
  • misc– This section contains other important information about system settings, such as USB configuration, your carrier's network settings, and other hardware settings that may graphical interface are displayed as on/off switches.

Without root rights Android users can only access the data section that opens to you when you connect the device to your PC or use a file browser. If your phone's memory can be expanded using a card, the card's memory is also included in this section with data accessible through a PC or file viewer.


Typically, you only have access to application data that is stored in the user data section. To access the rest of the memory you will need root rights

Applications and folders in the data section

So, having a quick glance at the main folders, we noted that we do not have access to boot files, recovery files and or system Android files, when we simply view files using a browser. Which leads to a comforting conclusion: you can’t just go ahead and cause the collapse of the system with your actions. A completely different situation arises when you have root rights. One way or another, you need to be more careful with what is stored in this section: certain applications can use the data stored here, and moving or deleting them can lead to unstable operation of the system.

Now let's see what's in the data section of your device. In order for this to be possible, in Android phones Marshmallow versions or Nougat has its own file manager, which gives access to the entire partition. This option can be found in the Settings-Memory-Storage-Other menu. A number of devices on older ones Android versions may or may not have its own file manager, depending on the manufacturer.

Alternatively, there are many third-party apps available on the Play Store that serve the same role, such as FX File Explorer or Total Commander.

You can also manage your files from your PC using a USB connection. Just make sure your phone is in MTP (File Transfer) mode so you can see all your files.


You can access your device's memory using a PC or directly through a file browser

If you have a feeling that your device's memory looks full and there are too many folders, take a closer look at them. You'll see numerous folders associated with applications, perhaps even remnants of applications you've already deleted. As a general rule, it's best to leave any application folders alone, but if you remember that the application was uninstalled and the folder remains, deleting it won't cause any harm. Most likely, it is empty or there are some useless log files left in it.

Even if you haven't installed many applications, by default this user data section may contain a number of folders - they store your contacts, music, pictures and everything else. Here are the most basic non-related folders third party applications, which you can find.

  • Android– This is the default location where application cache and data are saved. It is not recommended to delete this folder if you do not want to lose application data. Deleting this folder may result in incorrect operation some of them.
  • Alarms, Ringtones, Notifications– as the names suggest, these folders store audio files for alarms, ringtones and notifications, which can be used by both default and third-party applications.
  • Cardboard– data for a number of VR applications is stored here, and if there are none, it remains empty.
  • DCIM– here are the photos you took using your main camera app. You can also see such a folder on microSD card, if you save photos to it too.
  • Downloads– this is where everything you downloaded in your web browser, such as Chrome or Firefox, is located.
  • Pictures, Music, Movies, Video– These are the default folders used by your media applications. Some applications allow you to designate other folders, but most media players will default to these directories. Screenshots are most often saved in the pictures folder.
  • Podcasts– This folder is used by a number of applications to separate podcasts from the rest music files. If you don't use podcast apps, it will be empty.

So, what folders can I (or should) delete?

If you're not sure, don't delete it. This is true for all application folders and should not be touched unless you know exactly what you want to do. It’s absolutely safe to add and remove files from any media folder, but try not to destroy the folder itself in a rush to restore order. If you see that the folder is empty, for example, there is nothing in the Alarms folder, you may think that it itself is not needed. But, on the other hand, the folder does not take up much space. And perhaps some application will need it later, so is it really necessary to remove it?

Over time, your device's internal memory will contain many more folders than those listed above. You will install and uninstall everything larger number applications. Therefore, it never hurts to tidy up your device, unless you rarely move files on your phone, download and delete them. And yet, deleting an empty folder will not free up additional memory space for you. So, if you want to win a seat, it’s better to look at which apps/movies you can delete that you don’t need, that you won’t watch, etc.

Now that you have a more complete picture of what these folders are stored in the memory of your device, it will be easier for you to manage your files without the fear of “doing something wrong.”

  • / - The root folder.
  • /bin- a folder containing executable files and links to executable files. Executable files are programs that start at system startup, as well as the most necessary programs, accessible to everyone. Example: ls, mount, pwd, unzip.
  • /data- a folder with data about synchronization and accounts, passwords for wifi access points and VPN settings, etc.
  • /data/app– folder containing installed programs and games.
  • /data/data– a folder containing application data, their settings, game saves and other information.
  • /data/dalvik-cache- software cache memory area for the Dalvik program. Dalvik is a Java virtual machine, which is the basis for running programs that have the *.apk extension. In order to make programs launch faster, a cache is created.
  • /dev- folder containing files various devices, both real and virtual, as well as those devices that do not exist, but that could exist.
  • /etc- folder containing configuration files, used when loading the operating system and during the operation of various programs.
  • /lib- a folder containing libraries of functions necessary for various programs and the C language compiler, as well as modules (device drivers) connected to the kernel.
  • /lib/modules/- a folder containing modules (device drivers) of the kernel that have the extension .ko. This folder contains subfolders that match the kernel versions (for example, 2.6.32.9-default) that were installed on the system. That is, each version of the kernel has its own set of modules. This is very important and you need to pay attention to it. Often, when compiling a kernel, they forget to change the version; a new kernel uses modules when loading previous version and the system does not boot. Current version kernels can be recognized by the command uname -r, the returned version will definitely match the name of one of the folders in /lib/modules/ .
  • /mnt- contains folders for temporarily mounted file systems.
  • /proc- a virtual folder containing all the details Android systems, including kernel, processes, and configuration options. The /proc folder is described in more detail in a separate article.
  • /sbin- a folder containing executable files of programs that are designed to control the system itself. Example: ifconfig , man, mdev, vconfig .
  • /sdcard- a folder containing files and folders on the SD memory card (if installed).
  • /sys a folder containing the actual system configuration at the moment. /sys very closely related to udev if you connect (disconnect) devices, the contents of the directory /sys changes dynamically. You can see an example. Run the command ls /sys/bus/usb/devices/ to view the current USB devices in the system. Now connect the flash drive and run the command ls /sys/bus/usb/devices/ again. You will see that there are now more devices.
  • /system- a folder (hidden by default) containing system files and folders with data and everything necessary for the operation of the Android OS.
  • /system/app– a folder containing system applications (SMS, phone, calendar, settings, etc.), as well as applications installed by the device manufacturer (branded widgets, live wallpapers, etc.).
  • /system/fonts– folder with system fonts.
  • /system/media– a folder containing standard ringtones, notifications, alarms and interface sounds, as well as bootanimation.
  • /system/build.prop– a file containing a huge number of settings, such as screen density, proximity sensor delay time, wifi control, device name and manufacturer, and many other parameters.


tell friends