Installing applications on devices running an operating system Android is often perceived by users as a simple process: download the file, press a button, and the app appears on the screen. However, behind this apparent simplicity lies a complex file structure managed by the Linux kernel. Understanding where exactly application data physically goes after unpacking APK fileis necessary not only for enthusiasts, but also for ordinary users who want to optimize the performance of their smartphone.
When you initiate installation, the system does not just copy the file to an arbitrary folder. The package manager Package Manager performs a series of security checks, verifies the digital signature, and determines the optimal location for executable files and data. Depending on the version of the operating system, the availability root access and type of storage, the installation path may differ radically. In this article, we will analyze in detail the architecture of application storage.
Knowledge of system paths allows you to solve problems with low memory, restore deleted apps, or manually clear a cache that cannot be cleaned using standard methods. It is important to immediately note that access to the main installation directories is by default closed to the user without special authorization. This is done for the purposes of data security and stability of the entire system.
System application installation directory
The main place where all user and system applications are installed on most Android devices is the section /data/app. This is where the original installation packages are stored after the system has processed them. When installed, the application receives a unique identifier, and its files are placed in a separate subdirectory within this directory.
Before the release of Android 6.0 Marshmallow, the structure was slightly different, and all APK files often lay in one flat structure or had different paths. Modern versions of the system use a more complex scheme to isolate data from each application. Files in this directory usually have the extension .apk or .base.apk, but their names can be hashed for security.
To access this folder, superuser rights (root) is required. Without them, a file manager, even the most advanced one, will show you an empty directory or simply not allow you to enter it. This is a critically important point for those who are trying to manually manage installed software.
โ ๏ธ Attention: Directly deleting or moving files from the system folder
/data/appvia a file manager can lead to unstable operation of the system, the appearance of broken shortcuts on the desktop and even cyclical rebooting the device (bootloop).
In addition to the main APK file, in the same structure you can often find optimized files .odex or .vdex. They are compiled bytecode that allows an application to run faster, bypassing the JIT compilation step. This is an important part of modern architecture ART (Android Runtime).
Storing user data and cache
The application body itself is just the tip of the iceberg. Much more storage space is taken up by user data, settings, databases and cache. For these purposes, the operating system allocates a special section /data/data (or symbolic link /data/user/0 on new devices).
Each application here has its own strictly isolated folder, named after its package name (for example, com.whatsapp or com.google.android.youtube). Access to this directory from other applications is prohibited by the security policy Sandboxing. This means that one browser cannot read the files of another browser without explicit system permission or root access.
The following subdirectories are usually located inside the specific application folder:
- ๐ databases โ local SQLite databases are stored here, containing chat history, settings and other structured information.
- ๐ shared_prefs โ XML files that store settings applications, such as the selected language, themes or authorization status.
- ๐ code_cache and cache โtemporary files that speed up the operation of the app, but can be deleted without critical consequences.
- ๐ files โpermanent files created by the application itself during operation.
It is cleaning folders cache often helps to free up gigabytes of space on your smartphone when standard cleaning does not work. However, deleting the folder databases will lead to a complete reset of the application to factory settings and loss of local history.
Starting with Android 11, access to the folder Android/data on the internal drive has also been significantly limited for third-party file managers. Now you can see the contents of these folders only through special system utilities or by giving the file manager special permission through the system dialog.
Features of installation on an SD memory card
Many users wonder whether it is possible to transfer an installed application to a memory card to free up space on the internal storage. Technically, completely moving the executable code (APK) to external media has become almost impossible in modern versions of Android due to read speed and security requirements.
However, some of the application data can be moved. When you select the "Move to SD card" option in the application settings, the system creates a special encrypted directory on external media. Typically this path looks like /storage/XXXX-XXXX/Android/data/where XXXX-XXXX is the unique identifier of your memory card.
It is important to understand the difference between โmoving an applicationโ and storing media files. Heavy games often download additional cache files (OBB files) separately from the main APK. These files can be located in the folder /Android/obb/ both on the internal memory and on the SD card, depending on the settings.
โ ๏ธ Attention: If you remove the memory card from the device, applications whose data were transferred to it will stop working correctly or will not start at all until the media is returned to its place.
The speed of microSD cards, especially budget models of the U1 or A1 class, is significantly lower than the speed of the built-in flash memory UFS 2.1 or UFS 3.1. Installing heavy applications entirely on the card can lead to noticeable โlagsโ and long loading levels in games.
Before purchasing a memory card for installing applications, be sure to check its speed class. Look for the A2 (Application Performance Class 2) marking - such cards are optimized for random reading and writing of small files, which is critical for the operation of apps.
OBB cache file structure
For large games and heavy applications whose size exceeds the Google Play limits (previously 100 MB, now the limits have been expanded, but the practice remains), the mechanism of additional expansion files is used. These files have the extension .obb and are stored in a specialized directory.
The path to these files usually looks like /Android/obb/<package_name>/. Inside this folder are archives containing graphics, audio tracks, video screensavers and other resources that were not included in the main APK installation package. This allows you to reduce the size of the initial download.
When installing games manually (sideloading), a situation often arises when the application is installed, but when launched it gives a data loading error. This happens precisely because the folder with OBB files is either missing or located in the wrong address. The user must manually create a folder structure and copy downloaded archives there.
The table below shows the main differences in storage paths for different types of data:
| Data type | Main path (Internal memory) | Path (SD card) | Access without Root |
|---|---|---|---|
| Installation file (APK) | /data/app/ |
Unavailable | No |
| User data | /data/data/ |
Partial (/Android/data/) |
Limited |
| Cache files (OBB) | /Android/obb/ |
/Android/obb/ |
Yes (up to Android 11) |
| Temporary cache | /data/cache/ |
No | No |
It is worth noting that on devices with Android version 11 and higher, access to folders Android/obb through standard explorers is closed. To manage these files, you now need to use the system's built-in file manager or specialized utilities that request access through the system one. API Android/data closed through standard conductors. To manage these files you now need to use the system's built-in file manager or specialized utilities that request access through the system API SAF (Storage Access Framework).
Why is the Android/data folder empty?
If you go to this folder and see it empty, although applications are installed, this is not an error. Starting with Android 11, Google has limited the visibility of these directories for third-party applications for privacy purposes. To see the files, you need to use the โFilesโ system explorer or give permission to a special manager through the system pop-up. window.
The influence of root access on access to files
Gaining superuser rights (root) radically changes the interaction with the Android file system. With root access, restrictions on reading and writing to protected system partitions are removed, including /system, /data and /vendor.
This allows you not only to view where APK files are installed, but also to modify them. Advanced users can extract APK files of already installed apps, edit the application manifest, cut out ads, or unlock paid features (which is a violation of the license agreement). To work with such opportunities, file managers like Root Explorer or Solid Explorer.
are used. However, with opportunities come risks. Accidentally changing access rights (chmod) to system folders can make the device inoperable. For example, if you change the owner of a folder /data/app, the system will no longer see installed applications when loading.
โ ๏ธ Attention: Obtaining root access automatically voids the device warranty in most cases and makes it impossible to operate banking applications and highly secure services (Google Pay, Samsung Pay) without additional hidden manipulations root.
In addition, having root access opens the way for malware. If a malicious app gains superuser rights, it will be able to steal data from the protected storage of other applications, including instant messengers and browsers, where passwords and authorization tokens are stored.
Specifics of working with the System section
In addition to the user section /data, there is a section /system, where pre-installed applications from the smartphone manufacturer or telecom operator are installed. The path to them usually looks like /system/app or /system/priv-app.
Applications located in priv-apphave extended privileges and access to protected system APIs that are not available to ordinary user apps. These could be phone applications, settings, launcher or Google services.
Removing applications from this partition ("debloating") is a popular procedure to free up space and improve performance. However, this must be done extremely carefully. Removing a critical system component can cause the phone to become unbootable.
Modern versions of Android use a mechanism Project Treblethat separates the Android framework implementation from the underlying hardware implementation. This led to the appearance of additional sections, such as /product and /odm, where system-level APK files can also be located.
โ๏ธ Safe removal of system applications
Frequently asked questions about paths APK installation
Is it possible to change the default installation path of applications?
It is impossible to completely change the system path /data/app without rebuilding the firmware. However, in the developer options or in the storage options (on older versions of Android), you can select "Preferred installation location" so that new applications are installed on the SD card, if possible. On modern smartphones, this option is often hidden or removed.
Where are APK files downloaded from the browser stored?
Downloaded installation files usually end up in a folder /Download in the internal storage or on the SD card. After successful installation, the APK file itself is no longer needed for the application to work and can be deleted, since its copy is already unpacked into the system partition /data/app.
Why do applications disappear after resetting the settings, even if they were on the memory card?
When resetting the settings (Factory Reset), the partition is cleared /data, where registry entries about installed applications are stored. The system "forgets" that there are some apps on the SD card. You will have to rescan the memory card or reinstall applications so that the system creates the necessary entries and links.
How can you find out the exact size of the application folder if it is not shown in the settings?
In the phone settings, only the approximate size is often shown. To obtain accurate data about the size of a folder /data/data/<package> and /Android/data/<package> it is better to use advanced disk analysis utilities, such as DiskUsage or Storage Analyzerthat visualize the occupied space.
Is it safe to transfer OBB folder manually?
Yes, this is a safe and often necessary procedure when installing games not from Google Play. The main thing is to maintain the exact folder structure. The name of the folder inside obb should be exactly the same as the package name of the game (for example, com.gameloft.android.ANMP.GloftA8HM).
Understanding the Android file structure is the key to good memory management. Don't be afraid to explore the system folders, but always make backup copies before making changes to the /data and /system partitions.