Lack of internal memory on a smartphone often occurs due to the fact that installed applications and their cache occupy hidden sections of the system, and not just the space visible to the user.
Unlike desktop computers, where the user often chooses the drive to install apps, in a mobile OS this process is automated and hidden from the eyes. However, the files still occupy specific physical sectors on the drive. Knowing how it works mounting partitions and where executable files are located will help you free up space or transfer data to external media.
Next we will analyze in detail the directory hierarchy, access rights and methods for optimizing data storage. You will learn why some folders are inaccessible without root access and how to safely work with system directories without turning your phone into a “brick”.
Android file system structure
The basis for storing data in modern smartphones is the file system, more often total ext4 or f2fs. When you connect the device to your computer, you only see a simplified picture, since the system hides critical sections for security reasons. The root directory, indicated by the symbol /, contains all subfolders, but access to them is regulated.
The main division is between the system partition and user space. System files responsible for operation operating systemare usually located in the /system partition and are mounted read-only for the average user. This protects the kernel and basic services from accidental deletion or damage by viruses.
User data, including photos, downloads and application caches, is located in a partition /data or on an emulated external drive. This is where active recording and reading of information occurs during the operation of the gadget. Understanding this limit is important when trying to clear memory.
Do not try to manually delete files from the root directory through file managers with root access without knowing exactly their purpose - this can lead to system inoperability.
System folder /data/app: main storage
When you download a app from the store Google Play or install APK file manually, its main part ends up in a protected directory /data/app. Installation packages are stored here, which the system unpacks to run. Access to this folder from a regular file manager is closed, which is a standard security measure.
Inside this directory, a separate subfolder is created for each application with a unique name, often containing a hash sum for security. This prevents naming conflicts and makes it more difficult to inject malicious code into the executable files of other apps. The size of the occupied space here corresponds to the weight of the application itself, without taking into account user data.
If you try to delete a file from this folder directly, the system may restore it or throw an error the next time you launch it. The correct way to remove it is to use the standard settings menu or command line ADB. This guarantees correct deletion of entries from the system registry.
⚠️ Attention: Direct editing of files in
/data/appmay break the app's digital signature, causing it to stop running or updating.
The /data/app folder contains only app installation packages, not their user data or cache.
User data in /data/data and /Android
The most voluminous content is generated not by the application itself, but during its operation. Cache, databases, logs and user-uploaded files are saved in the directory /data/data. Here, for each app, an isolated sandbox is allocated, the name of which coincides with the package name, for example, com.whatsapp.
Starting with version Android 11, access to the folder /Android/data on the internal drive (/sdcard) was also significantly limited. This is done to increase privacy: applications cannot scan files of other apps without control. However, this is where gigabytes of cache from social networks and instant messengers often accumulate.
Cleaning these folders can lead to the loss of correspondence, account settings or progress in games if the developer has not provided for cloud synchronization. Therefore, before manually deleting content data directories it is strongly recommended to create a backup copy of important information.
- 📁
/data/data/[package]/databases—SQLite databases with text information are stored here. - 📁
/data/data/[package]/cache— temporary files that can be safely deleted to free up space. - 📁
/sdcard/Android/data/[package]/files—large files downloaded by the application (maps, music, game levels).
The difference between internal memory and SD card
Modern smartphones often do not have a slot for memory cards, relying solely on the built-in flash drive. However, in devices with support MicroSD there are two modes of operation: portable storage and internal memory. The selected mode determines where new applications will be installed.
In the “portable storage” mode, the card is used as a flash drive for photos and documents. Applications are installed strictly in the internal memory /data, and you cannot transfer them entirely to the card due to security restrictions Android. You can move only part of the media files.
If you format the card as “internal memory” (Adoptable Storage), the system encrypts it and merges it with the main partition. In this case installation path may change, and the system itself decides where to place the application files for optimal speed. However, this method reduces the writing speed and makes the card unreadable on other devices.
| Storage type | Access path | Ability to transfer applications | Risk of data loss |
|---|---|---|---|
| Internal memory | /data |
Not applicable (primary) | Low (on reset) |
| SD card (Portable) | /storage/XXXX-XXXX |
Media files only | Medium (physical wear and tear) |
| SD card (Internal) | Hidden / merged | Full support | High (if the card is broken) |
⚠️ Attention: When formatting a memory card as internal storage, all data on it will be permanently deleted. Be sure to copy important files to your computer before starting the procedure.
System applications in the /system section
Factory apps preinstalled by the smartphone manufacturer or telecom operator are located in the section /system/app or /system/priv-app. These applications are part of the firmware and have elevated privileges. An ordinary user cannot delete them using standard means.
The directory priv-app contains critical services such as settings, phone book and system interface. Removing components from here may lead to bootloop (cyclic reboot) or unstable operation of the device. Access to this section is possible only with superuser rights.
To remove system garbage (bloatware), experienced users use special utilities or ADBcommands. This allows you to free up space in the system partition, which is often strictly limited by the manufacturer. However, such an operation requires deep knowledge.
Command to remove a system application via ADB
To remove a package without root access, use the command: pm uninstall -k --user 0 [package_name]. This will hide the application for the current user, but will not completely remove it from the system, which is safe for rolling back changes.
How to check the occupied space and paths
To understand what exactly is taking up space on your device, you don’t have to go into the system folders. There is a built-in analyzer in the smartphone settings. Go to Settings → Memory (or Storage) to see a detailed breakdown by category: applications, images, videos, system.
For deeper analysis, you can use third-party utilities, such as DiskUsage or Files by Google. They visualize the file system as a block map, showing the heaviest files regardless of their location. This helps to find forgotten downloads or caches of streaming services.
If you connect your phone to a PC, remember that the protocol MTP does not show the entire file structure. You will only see user files. To view system partitions, you will need USB debugging mode and console access.
adb shell dumpsys package | grep -A 5 "codePath"
This console command ADB will show the physical paths to the installed packages. It is useful for developers and advanced users who want to know exactly the lokasi of files of a specific application.
☑️ Memory diagnostics
Transferring applications and optimizing space
The issue of transferring applications to a memory card remains relevant for budget devices with a small amount of built-in memory. Although the standard "Move to SD card" function has disappeared in many new versions, there are workarounds. Android disappeared, there are workarounds.
One method is to use the command pm set-install-location via ADB. It causes the system to offer installation to external media by default if it is formatted as internal memory. However, this does not guarantee that all applications will support such migration, since the decision is made by the developer in the app manifest.
A safer way to optimize is to regularly clear the cache and migrate media files. Configure instant messengers so that downloaded photos and videos are immediately saved to the memory card, and not to the internal memory. This will significantly slow down the filling of the system partition.
⚠️ Attention: The settings interface and available functions may differ depending on the smartphone model and shell version (MIUI, OneUI, ColorOS). If you do not find the described items, check the official documentation of the manufacturer of your device.
Use the “Free up space” function in the Google Files application - it automatically finds duplicates, unclear photos and old screenshots, offering to delete them in one click.
Is it possible to install the application directly on an SD card without root?
On modern versions of Android (starting from 6.0 and higher), direct installation on the card in “portable storage” mode is not possible. The system requires encryption and partition merging (internal memory mode) for the application to work stably. Without root access and specific developer settings, it is extremely difficult to force the system to ignore this rule.
Why is the Android/data folder empty on the computer?
Starting with Android 11, access to this folder via the MTP protocol when connected to a PC is blocked for third-party applications and computer file managers for privacy purposes. You can see it only through the file manager inside the smartphone itself or by obtaining root access.
What happens if you delete the application folder in /data/data?
If you delete the data folder of a running application, it will lose all settings, logins and saved progress. The next time you start the app, it may crash with an error or start as freshly installed. System applications may stop functioning correctly, requiring you to reset your phone.
Where are system application updates stored?
Updates for pre-installed applications (for example, from Google Play Services) are stored in the /data/appsection, overriding the original version from /system. When resetting to factory settings, these updates are deleted, and the phone returns to the version hardwired into the firmware.