Every owner of a smartphone based on Android sooner or later faces a lack of internal memory. The system begins to slow down, and notifications about the storage being full appear more and more often. In search of a solution, users often come across a folder called data, which can take up gigabytes of free space.

This directory is one of the most important and at the same time mysterious elements of the file system. It’s not just temporary files that are hidden here, but the entire history of your digital life on the device: from game saves to banking application settings. Understanding the structure of this folder is the key to competently managing your smartphone’s resources without the risk of losing important information.

In this material we will look in detail at what the directory consists of /data, which files can be safely deleted, and which are strictly prohibited from being touched. You will learn to distinguish system garbage from vital data and will be able to free up space, truly increasing the performance of your gadget.

File system architecture and the role of the Data directory

The file system Android is built on the principle of process isolation, which ensures the stability of the operating system. The root directory / contains several key sections, among which /system is responsible for the firmware files, and /data is reserved for all user-changeable data. This separation is critical for security: even if an application receives malicious code, it will not be able to damage the kernel system files.

The folder data is mounted as a separate partition with write permissions, which allows you to install new applications, download media files and save progress. Unlike the partition /system, which is usually read-only without obtaining root access, the contents /data change dynamically throughout the life of the device.

Inside this directory are stored databases SQLite, cached images, error logs and configuration files. This is where the operating system keeps track of all installed packages. If you decide to do a full factory reset (Factory Reset), the system will do this partition, returning the phone to its “out of the box” state, but saving files on an external SD card or in the cloud.

⚠️ Attention: Directly deleting files from the root folder /data via a file manager with root access can lead to a so-called “bootlap” (infinite reboot). The system will not be able to find the necessary configurations to launch the interface.

Subfolder structure: app, media and dalvik-cache

When you study the contents in detail, you will find many subdirectories, each of which performs a strictly defined function. The most voluminous of them is /data/app. The installation packages (APK) of all the apps you downloaded are stored here. Interestingly, in modern versions Android (starting from 6.0 and higher), the system often uses technology ASE (App Secure Encryption), encrypting these files for copy protection.

Another important element is /data/dalvik-cache (or /data/art in new versions). This is a cache of optimized files DEXthat are created when the application is first installed to speed up its launch. Deleting this folder is safe: the system will automatically recreate it the next time you boot, although this process can take several minutes and be very CPU intensive.

ART Cache Technical Details

Unlike the old Dalvik virtual machine, the ART runtime compiles application code ahead of time (AOT - Ahead Of Time). This takes up more space in the data section, but significantly speeds up the operation of apps and reduces processor energy consumption during their use.

Don't forget about the directory /data/media. In fact, this is what you see as “Internal Memory” when you connect your phone to a computer in MTP mode. This is where your photos, downloads and music are located. However, even being inside data, this folder has separate access rights that allow the user to freely manage it without root access.

  • 📁 /data/app — installed user applications and their updates.
  • /data/dalvik-cache — optimized code for quickly launching apps.
  • 📸 /data/media — user files: photos, videos, documents and downloads.
  • 🔧 /data/local/tmp —temporary files created by the system and applications during operation.

Where application data lives: data folder and cache

The most interesting part for an advanced user is in the directory /data/data. Here, for each installed application, a separate folder is created with the name of its package (for example, com.whatsapp or com.instagram.android). Inside these directories all private information is stored, to which other apps do not have access thanks to the sandbox Android.

Inside the folder of a specific application you will find a subdirectory cache. This is a storage of temporary data: thumbnails of pictures, downloaded parts of videos, temporary logs. Clearing the cache through the phone settings actually deletes the contents of these exact folders. This is a safe procedure that often solves problems with apps freezing.

However, next to the cache there is a folder databases i shared_prefs. This is where your logins, authorization tokens, interface settings and game progress are stored. Deleting files from here is the same as deleting the application and then doing a clean installation: you will lose all local data that was not synchronized with the cloud.

💡

Before manually clearing folders in /data/data, make a backup copy of important settings through the “Backup” function in your Google account or use specialized utilities like Titanium Backup (requires root).

Many messengers, such as Telegram or Viber, store media files not in the public domain, but in their own protected directories inside /data/data. This explains why when cleaning “garbage” using standard means, sometimes less space is freed up than expected: the system cleaner simply does not have the rights to scan these protected areas.

Access rights and the need for root access

By default, the operating system Android denies the user and most applications access to read and write to the root section /data. This is a fundamental security principle that prevents malware from stealing data. A regular file manager will show you this folder empty or will not let you inside at all.

To gain full control over the file system, you must have root access (superuser rights). Obtaining such rights usually involves unlocking the bootloader and installing a special binary file su. This makes it possible to change system files, remove pre-installed software (bloatware) and deep clean the cache.

Access level Opportunities Risks
User (User) Access to /sdcard, installation of applications Minimal, virus protection
ADB (Debugging) Deleting applications, reading logs Medium, possible instability
Root (Superuser) Full access to all folders /data High, risk of “bricking” the device

It is worth noting that the presence of root access violates the integrity of the security system Android. Many banking applications (Sberbank, Tinkoff) and services with DRM content (Netflix) refuse to work on rooted devices, having detected a modified bootloader or the presence of a binary su.

⚠️ Attention: Obtaining root access often voids the warranty on the device. In addition, errors when editing files in /data can make the phone unsuitable for recovery using software methods.

📊 Do you use root access on your smartphone?
Yes, all the time
Sometimes for specific tasks
No, I'm afraid break the phone
I don’t even know what it is

Safe cleaning: methods and tools

If your goal is to free up space and not interfere with the system code, it is better to use standard tools or proven utilities. The most reliable way is through the settings menu of the device itself. Go to Settings → Applications, select the desired app and press "Clear cache". This will delete temporary files without affecting your personal data.

For deeper cleaning, you can use your computer and utility ADB (Android Debug Bridge). By connecting your phone in debug mode, you can run a command to clear the cache of all applications at once without the need to root. This is a powerful tool in the hands of an experienced user.

adb shell pm trim-caches 999999999

This command instructs the system to delete cache files to free up a specified number of bytes (in this case, almost all). It is also useful to use the built-in Storage Cleanup tool in modern shells like OneUI ot Samsung or MIUI ot Xiaomi. They know how to safely find duplicates and forgotten downloads.

☑️ Safe cleaning checklist

Done: 0 / 4

Avoid using dubious “accelerator” apps that promise miraculous memory freeing. Often they simply aggressively unload processes from RAM, which forces the system to immediately launch them again, wasting even more energy and processor resources.

Typical errors and myths about the Data folder

There is a common misconception that deleting the entire contents of the folder /data via Recovery Mode will solve all problems with brakes. In fact, this action is equivalent to a full factory reset. You will lose all contacts, messages and settings if you have not made a backup copy in advance.

Another myth says that files in /data/tombstones can be safely erased to speed up work. These are application error (crash) report files. They take up space only if some app constantly crashes. On a healthy system, this folder is empty or takes up kilobytes, and cleaning it will not provide a performance boost.

💡

Manually deleting files in /data is justified only if there are specific problems (for example, application looping) or an acute lack of space when other methods have been exhausted.

Users often confuse the folder Android/data on the internal memory card (which is accessible without root) and the system directory /data/data. The first contains cache and application data available for viewing, the second contains protected system storage. Confusion here may lead to the deletion of necessary files in the public area by mistake.

⚠️ Attention: Interfaces and file paths may differ depending on the version of Android and the manufacturer's shell (Samsung, Xiaomi, Pixel). Always check the official documentation for your specific model before making changes.

FAQ: Frequently asked questions about the Android system

Can I move the data folder to an SD card?

Completely transfer the system partition /data to an SD card using standard impossible by means. This will break the system because the memory card is mounted after the kernel boots. However, individual applications can be transferred to the card through the settings if the developer has allowed this in the app manifest.

Why does the data folder take up more space than all my applications?

In addition to the applications themselves (APK), the section stores their data (cache, databases, offline maps, downloaded videos in instant messengers). Often the amount of data is 2-3 times larger than the size of the installation file, especially for social networks and navigators.

What happens if you delete the dalvik-cache folder?

Nothing critical. The next time you boot, the phone will run slower than usual for 5-10 minutes as the system recompiles optimized code for all installed applications. After this, everything will return to normal.

How to see the size of the data folder without root access?

Go to Settings → Memory (or Storage). There the system shows the distribution of space by category: “Applications”, “Images”, “System”. The sum of these values is approximately equal to the occupied space in the data section, excluding hidden system reserves.

Is it safe to use scripts to clear data from the Internet?

It is strictly not recommended to run unverified scripts that promise "deep cleaning" They can delete critical configuration files necessary for the operation of the radio module or touch screen, which will require flashing the device.