Every smartphone user sooner or later faces the problem of lack of internal memory. The device begins to slow down, and the system notifies that the space for installing new apps has run out. At this point, a natural question arises: where exactly is application data physically written and is it possible to change this default location? The answer lies in the architecture of the operating system Androidwhich strictly delineates system space and user storage.

By default, all apps downloaded via Google Play Market are installed in a protected section of the internal memory. An ordinary user does not see these files in the gallery or file manager, since access to them is limited by superuser rights. This was done specifically by the developers Google for security: malware will not be able to replace system libraries, and accidental deletion of important files will not lead to the crash of the entire operating system.

However, the data storage structure is not as simple as it seems at first glance. Modern versions of the OS use a hybrid design, where some of the code resides in the system partition, and the cache and user data can take up space in the public area. Understanding this difference is critical for properly optimizing your smartphone and freeing up gigabytes of free space without losing functionality.

Android file system architecture

File system of a mobile device based on Linux kernels have a strict hierarchy. The root directory is indicated by a slash character /. It is from this that all directory branches branch off, including those where applications are installed. For an ordinary user without root access only a small part of this structure is visible, mainly through memory card emulation.

The main place for installing apps is the section /data/app. Installation packages .apk and optimized files .odex (or .vdex in new versions) are stored here, which speed up the launch of the software. This partition is encrypted and mounted to be read-only by normal processes. An attempt to change files here directly without administrator rights will result in an access error.

In addition to the executable code, each application creates its own data folder in the directory /data/data. Databases, settings, logins, passwords and game progress are stored here. Deleting this folder is equivalent to completely resetting the application to factory settings. It is important to understand that this partition takes up the lion's share of memory, which is often mistakenly considered "free" after clearing the cache.

โš ๏ธ Attention: Never try to manually delete folders in the partition /data even if you have root access. An error in the directory name may cause the phone to stop booting (bootloop), and the device will need to be flashed.

There is also a section /system/app i /system/priv-app. Manufacturer-preinstalled apps that are part of the firmware are installed here. They cannot be deleted using standard means, since this partition is mounted in read-only mode. To modify system applications, you need to unlock the bootloader and gain full access to the file system.

Technical details of mounting partitions

Modern versions of Android use the F2FS or EXT4 file system. The /data partition is often encrypted by default using a key tied to the screen lock. This means that even if the memory chip is physically removed, the data cannot be read on another device without entering a PIN code or pattern.

Differences between internal memory and SD card

Users often confuse the concepts of โ€œinternal memoryโ€ and โ€œexternal storageโ€. In the context of installing applications, this difference is fundamental. Internal storage (Internal Storage) operates at high speed and has direct access to the processor system buses. A memory card microSD, even the highest speed class, is usually connected through an interface with lower bandwidth.

When you install the app, the system selects the fast internal drive by default. This guarantees stable operation of widgets, fast loading of levels in games and instant response of the interface. Transferring an application to a memory card (Adoptable Storage or flexible mode) can lead to noticeable delays, especially if the card has a low parameter IOPS (input-output operations per second).

  • ๐Ÿš€ Speed: Internal memory (UFS 3.1/4.0) is many times faster than UHS-I memory cards.
  • ๐Ÿ”’ Security: The data on the internal memory is encrypted by hardware, the memory card can be read on a PC.
  • ๐Ÿ“‰ Wear: Frequently writing cache to a cheap SD card quickly destroys it.

Starting with version Android 6.0 Marshmallow, the "Universal drive" function has appeared. It allows you to format the memory card so that the system considers it an extension of the internal memory. In this case, apps are installed there automatically. However, this process is irreversible without formatting, and the card is no longer readable on other devices.

๐Ÿ’ก

If you use a memory card as internal memory, choose models marked A1 or A2. These standards guarantee the minimum random read and write speed required for installed applications to function correctly.

Viewing installation paths through a file manager

To see where application files are physically located, you will need an advanced file manager, for example Total Commander, FX File Explorer or RS File Manager. Standard explorers often hide system directories. Without obtaining root access, you will only be able to see public parts of the file system.

If you have superuser rights, the algorithm of actions changes. You need to give the file manager access to the system root. After this, the path to the installed apps will look like /data/app. Inside you will see folders with names like com.google.android.youtube-random_string. This string contains a unique package identifier and a random version signature.

You can use standard system settings to view memory for a specific application. Go to menu Settings โ†’ Applications โ†’ All applications. Select the desired software and click on "Storage". The system will show details: how much space is occupied by the app code itself, and how much is user data and cache.

Data type Location Can be deleted Impact on operation
APK file /data/app No (uninstall only) The application will not start
Data /data/data Yes (reset settings) Loss of progress and accounts
Cache /data/cache Yes (safe) Temporary launch slowdown
ODEX Cache /data/dalvik-cache No (generated again) Long first boot after cleaning

Some users try to find installed games in the folder /Android/obb on the internal memory or SD card. This is only partly true. Only โ€œcache filesโ€ or additional resources (textures, music) are stored there, which are loaded by the main application. The game executable file itself always remains in the protected system partition.

๐Ÿ“Š Where do you prefer to store heavy games?
Internal memory only
Memory card in "Internal" mode
Memory card as a portable storage device
I donโ€™t play heavy games

How to transfer applications to a memory card

The issue of transferring software to an external drive is relevant for budget smartphones with a small amount of built-in storage. Unfortunately, starting from Android 10many manufacturers (Samsung, Xiaomi, OnePlus) have programmatically limited this feature in the standard interface. The "Move to SD card" button in the application settings may be missing or inactive.

If your model supports transfer, the procedure is as follows. Go to Settings โ†’ Applications. Select the desired app. If the function is available, you will see a Storage โ†’ Edit โ†’ Memory cardbutton. The system will copy the files and overwrite the paths in the registry. After this, the application icon will remain on the desktop, but physically the data will be read from the card.

In cases where the standard function is blocked by the manufacturer, enthusiasts use utilities like App2SD or commands via ADB (Android Debug Bridge). This method requires connecting your smartphone to your computer and entering special commands in the terminal. It allows you to trick the system into thinking the card is internal memory even without an official formatting menu.

โ˜‘๏ธ Checklist before transferring applications

Done: 0 / 5

โš ๏ธ Attention: When When transferring applications to a memory card, do not remove it without first unmounting it through the settings (Settings โ†’ Storage โ†’ Eject). Abruptly disconnecting the storage device will lead to a crash of applications that use data from the card and possible loss of files.

Clearing garbage and managing cache

With over time, the folder /data/cache grows, taking up gigabytes of useless space. These are temporary files that applications create to speed up work: thumbnails of pictures, loaded website pages, intermediate results of calculations. Clearing the cache is a safe way to free up space without deleting the apps themselves.

You can use the developer tool for deep cleaning. Enable developer mode (7 clicks on the build number in Settings โ†’ About phone). Then go to the section System โ†’ For developers โ†’ Run cache clearing service (if available in your firmware) or use the ADB command:

adb shell pm trim-caches 999999999

This command will ask the system to delete all temporary cache files. It is also useful to regularly check the folder /Android/data. Some instant messengers and social networks save received media files there. They can be deleted manually through the file manager if you are not afraid of losing your download history within specific chats.

There is a myth that clearing the Dalvik cache will speed up your phone. In modern versions Android Runtime (ART) this is not entirely true. The system itself optimizes the cache upon reboot. Forcibly clearing the folder /data/dalvik-cache will only force the processor to work longer the next time it is turned on, recompiling application code, which will lead to rapid battery drain.

๐Ÿ’ก

Regularly clearing the cache is only useful if a particular application is not working correctly or takes up an abnormally large amount of space. It is not necessary to do this for prevention; the system can handle it itself.

Installation problems and solutions

Sometimes users encounter the โ€œNot enough spaceโ€ error even if they have free gigabytes. This is due to the fact that the partition /data has a fixed size, allocated when the disk was partitioned by the manufacturer. The remaining space may belong to the "Internal Storage" section (user files), but not to the system installation partition.

Another common problem is version conflicts. If you are trying to update an application that was previously installed from a memory card, and now the system sees it in the internal memory (or vice versa), the installation may fail with a signature error. In this case, it is recommended to completely remove the old version of the app before installing the new one.

When using low-quality memory cards, reading errors may occur I/O Error. The system sees that there is space, but cannot write data there. In such situations, it helps to format the card on the computer into a file system exFAT (for cards larger than 32 GB) or FAT32.

Why can't some applications be transferred to the card?

Application developers can prohibit transfer to external media in the manifest file (android:installLocation). This is done for widgets, alarms, and services that need to be running all the time. The memory card may be turned off by the system to save power, which will lead to failure of critical functions.

Where is WhatsApp and Telegram data stored?

By default, messengers store media files in a folder /Android/media or root folder /WhatsApp on the internal drive. In the settings of the application itself, you can change the save path to the memory card, but the message database always remains in the internal protected section /data/data.

What is the .asec file and where is it located?

Files with the .asec (Android Secure) extension are used to protect applications transferred to a memory card in older versions of Android. They are located in a hidden section .android_secure on the SD card. In modern versions of the OS, this mechanism is practically not used, giving way to encryption of the entire partition.

Is it possible to change the default installation path without Root?

It is impossible to change the global installation path without root access. You can only use the "Default Memory" function in the storage settings (if the manufacturer has left this option), which will offer a map with each new installation, but does not guarantee the transfer of the application itself.

Why does it require downloading the data again after transferring the game?

When transferring the application, the system may lose contact with the cache folder obbif it remains on old place. The game sees a "clean" installation and begins loading resources. Before transferring, it is recommended to manually copy the folder Android/obb/com.name.game to the appropriate location on the new media.