Have you ever wondered where exactly Android installs applications after pressing a button "Install"? At first glance, it seems that all the files end up in one place - the internal memory of the smartphone. But in fact, the operating system uses a complex hierarchy of folders, each of which is responsible for its own type of data: executable files (.apk), cache, user settings and even system components that are inaccessible without superuser rights.
In this article we will look in detail all the possible ways to install apps in Android - from the standard /data/app directories to hidden system partitions /system/priv-app, and we'll also explain how these folders differ depending on the OS version, smartphone manufacturer (Samsung, Xiaomi, Google Pixel) and application type (user, system, updated via Play Market). You'll learn whether you can manually move apps to another folder, why some APK files are duplicated, and how to safely clean up unnecessary leftovers after uninstallation.
We will pay special attention to security issues: why access to application folders is limited, what risks are involved in changing system directories without root access, and how to properly back up installed APKs without disrupting the operation of the system. If you've ever encountered errors like "Not enough memory" despite free space, or wanted to move applications to an SD card, this article will provide comprehensive answers.
The standard folder structure for applications in Android
Android uses three main sections to store applications, each of which performs its own role:
- ๐
/data/app- installed here all user applicationsinstalled via the Play Market, APK files or ADB. The folder is divided into subdirectories with unique names (for example,com.android.chrome-1), where the number indicates the version or user (in the case of a multiprofile). - ๐
/system/appand/system/priv-appโsystem applications preinstalled by the manufacturer. The files here are protected from changes without root access. The difference betweenappandpriv-app: the latter have extended rights (for example, Google Play Services). - ๐๏ธ
/data/data- settings, databases, cache are stored here. Each application has its own folder (for example, application data: settings, databases, cache. Each application has its own folder (for example,com.whatsapp), accessible only to itself (isolation by principle sandbox).
It is important to understand that /data/app and /data/data is different things. The first contains the APK files themselves (executable code), and the second contains user data. For example, if you delete the application through the settings, then:
- ๐๏ธ From
/data/appthe .apkfile will be deleted. - ๐งน The folder in
/data/datamay remain (with settings if the โClear dataโ option was not used).
Starting from Android 10, Google has introduced a mechanism Dynamic Partitionsthat allows you to dynamically allocate space between partitions. This means that the physical location of the folders may be slightly different on new devices (for example, /data and /system may be part of the same virtual partition super).
How to find the folder with installed applications: step-by-step guide
By default, Android hides system folders from the user, but there are several ways to see them. Let's consider options without root access and with them.
Method 1: Through a file manager (without root)
Even without superuser rights, you can view some folders:
- Install a file manager with support for system directories, for example, Solid Explorer or FX File Explorer.
- Enable the display of hidden files in the manager settings.
- Go to the root directory (
/) and try open/data/app. On most devices you will see a message about no access. - Alternative: check the folder
/sdcard/Android/dataโdata of some applications are stored here (for example, downloaded files from instant messengers).
Method 2: Via ADB (without root)
Using Android Debug Bridge, you can get a list of installed packages and their paths:
adb shell pm list packages -f
The command will display a list in the format:
package:/data/app/com.example.app-1/base.apk=com.example.app
Where /data/app/com.example.app-1/base.apk is the full path to the APK file.
Install ADB on PC|Enable USB debugging in the phone settings|Connect the phone to the PC via cable|Run the command line in the folder with adb.exe-->
Method 3: With root access
If you have root, use Root Explorer or Mixplorer:
- Open the manager and provide root access.
- Go to
/data/appโhere you will see all user applications. - For system applications, check
/system/appi/system/priv-app.
โ ๏ธ Attention: Changing or deleting files /system without knowledge of the consequences can lead to bootloop (cyclic reboot of the device). Always create a backup copy (nandroid backup) before editing system folders.
Why are applications duplicated in different folders?
You may have noticed that the same application appears in several places. For example, Google Chrome can be simultaneously in:
- ๐ฑ
/data/app/com.android.chrome-1(user version) - ๐ง
/system/priv-app/Chrome(system preinstalled version)
This is normal Android behavior, and here's why:
| Folder | Content | Reason for duplication |
|---|---|---|
/system/priv-app |
System version of the application (for example, Chrome 80.0) | Preinstalled by the manufacturer. Not updated via Play Market. |
/data/app |
Custom version (for example, Chrome 120.0) | Installed via Play Market. Replaces the system version, but does not delete it. |
/data/app-lib |
Libraries (.so files) | Used for compatibility with different architectures (ARM, x86). |
When you update a system application through the Play Market, Android does not replace file in /system, and installs the new version in /data/app and makes it a priority. This is called "overlay" (overlay). The old version remains in the system as a backup copy.
On some firmware (for example MIUI from Xiaomi) duplication may be associated with the function Dual Apps, which creates clones of applications. In this case, you will see folders like /data/app/com.android.chrome_dual_1.
adb shell pm uninstall -k --user 0 com.package.name
This command will delete the application only for the current user, without affecting system files.-->
Is it possible to manually move applications to another folder?
Technically yes, but with serious limitations. Android is not designed to allow you to manually manage app installation paths, but there are workarounds:
Option 1: Transfer to SD card (official method)
Some apps support a feature android:installLocation in their manifest that allows you to transfer them to an SD card:
- Open
Settings โ Applications. - Select an application and tap โStorage.โ
- If the โChangeโ option is available, select โSD card.โ
Restrictions:
- โ ๏ธ Works only for applications that support this function (many games and instant messengers disable it).
- ๐ Only part of the data is transferred (not the entire APK file).
- โก When you remove the SD card, the application may stop working.
Option 2: Symbolic links (requires root)
Using the command ln you can create a symbolic link that redirects the path:
sumv /data/app/com.example.app /sdcard/app_backup/
ln -s /sdcard/app_backup/com.example.app /data/app/com.example.app
โ ๏ธ Risks:
- ๐ When updating the application, the link may break.
- ๐ก๏ธ Isolation is broken sandbox, which reduces security.
- ๐ต Some applications (for example, banking) refuse to work when symlinks are detected.
Option 3: Forced transfer via ADB
Command pm move-package allows you to force a package to be transferred to an SD card:
adb shell pm move-package com.example.app
However, this method only works if:
- ๐ The application supports
installLocation. - ๐พ The SD card is formatted how internal memory (Adoptable Storage).
โ ๏ธ Attention: Starting Android 9, Google has limited the ability to move apps to an SD card due to performance and security issues. On new devices (for example Samsung Galaxy S23 or Google Pixel 8), this function can be completely disabled.
How to clear the remains of deleted applications?
When deleting an application through standard settings, Android does not always clear all associated files. Here where to look for garbage:
- ๐งน
/data/data/com.package.nameโ settings and cache may remain here. - ๐๏ธ
/sdcard/Android/data/com.package.nameโ external data (for example, downloaded files from Telegram). - ๐
/sdcard/Pictures,/sdcard/Downloadsโ some applications create their own folders here (for example,Screenshots/WhastApp). - ๐
/data/dalvik-cacheโ cache Dalvik/ART (cleaned only throughWipe Dalvik Cachein recovery).
For complete cleaning:
- Use a file manager with root access (for example, Root Explorer) to manually delete folders.
- For to clear the Dalvik cache, reboot into recovery mode and select
Advanced โ Wipe Dalvik Cache. - Utilities like SD Maid or CCleaner can automatically find residual files.
On devices with MIUI (Xiaomi) or ColorOS (Oppo) manufacturers add their own cleaning mechanisms. For example, MIUI has a built-in โDeep Cleaningโ function (Settings โ About phone โ Memory โ Cleaning), which deletes the cache of system applications.
How to remove a system application without root?
You can deactivate it for the current user via ADB:
adb shell pm disable-user --user 0 com.package.name
This will not delete the files, but hides the application from the menu and stops it from working. To get it back, use:
adb shell pm enable com.package.nameDifferences in the location of applications on different firmware
Smartphone manufacturers often modify the Android structure by adding their own folders or changing paths. Here are the key differences:
| Firmware | Application storage features | Device examples |
|---|---|---|
| Stock Android (Google) | Standard structure: /data/app, /system/priv-app. Minimal changes. |
Google Pixel, Android One (Nokia, Motorola) |
| MIUI (Xiaomi) | Additional folder /data/app-private for some system applications. The function Dual Apps creates clones in /data/app/[package]_dual_[id]. |
Redmi Note 12, Xiaomi 13, Poco X5 |
| One UI (Samsung) | Folder /data/app-samsung for branded applications (for example, Samsung Health). Uses Knox to isolate data. |
Galaxy S23, Galaxy A54, Galaxy Z Fold 5 |
| ColorOS (Oppo/Realme) | Folder /data/app-oppo for pre-installed utilities. Often duplicates APK files in /vendor/overlay for themes. |
Oppo Find X6, Realme GT Neo 5 |
On devices with Dynamic Partitions (Android 10+) the physical location of folders may differ. For example, the Google Pixel 6 partition /system is part of a virtual volume superand its contents are mounted dynamically. To see the real structure, use the command:
adb shell ls -l /dev/block/by-name/
Manufacturers can also add their own hidden sections for applications. For example, on some devices Huawei (with EMUI) there is a section /hw_ovlwhere files for functions like App Twin (analogous to Dual Apps) are stored.
โ ๏ธ Attention: On devices with Project Treble (Android 8+), system applications can be stored in a section/vendor, which is separate from/system. This complicates the modification of the firmware, but improves compatibility with updates.
Security: why you should not change system folders?
Using root access to change application folders may seem tempting, but it is associated with serious risks:
- ๐ก๏ธ Violation of application isolation: Android uses sandboxto prevent one application from accessing the data of another. Transferring files manually may break this mechanism.
- ๐ Problems with updates: If you change the path to the APK file, the Play Market will not be able to update the application, which will lead to errors like
INSTALL_FAILED_INVALID_APK. - ๐ต Application failure: Some apps (especially banking or with DRM) check the integrity of system paths. If changes are detected, they may block launch.
- ๐จ Loss of warranty: On most devices (for example, Samsung or Xiaomi), unlocking the bootloader and getting root will void the warranty.
Even if you are an experienced user, avoid the following actions:
- โ Deleting files from
/system/priv-appwithout a backup. - โ Changing access rights (
chmod) for folders in/data/data. - โ Transferring system applications to the SD card (this may lead to bootloop).
If you need to free up space in the internal memory, it is better to use the official methods:
- ๐ Transfer media files (photos, videos) to the SD card or cloud.
- ๐งน Clear the application cache through
Settings โ Storage. - ๐๏ธ Delete unused applications or their data.
- ๐ Use the function Adoptable Storage (if supported) to expand the internal memory using an SD card.
The best way to manage memory is not to change system folders, but to optimize data storage: transfer media files, clear the cache and delete unnecessary applications.
FAQ: Frequently asked questions about the location of applications in Android
Is it possible to copy an APK file from /data/app and install it on another phone?
Technically yes, but there are nuances:
- ๐ APK file from
/data/appcan be signed with a different key (for example, if the application was updated through the Play Market). It may not install on another device due to a signature mismatch. - ๐ Some applications (for example, Netflix or banking) check installation integrity and may refuse to work during manual installation.
- ๐ฆ To transfer application data (for example, saves in games), you will also need to copy the folder from
/data/data, which is impossible without root.
It is better to use specialized utilities like APK Extractor or Titanium Backup (for root), which correctly extract APK and data.
Why, after deleting an application, its folder remains in /data/data ?
This is due to the mechanism data isolation Android:
- ๐๏ธ When deleting an application via
Settingsoradb uninstallonly the APK file is deleted from/data/app. - ๐งน The folder in
/data/datamay remain if you did not select the "Clear data" option before deleting. - ๐ Some manufacturers (for example, Xiaomi) leave folders to speed up the re-installation of the same application.
To completely delete data, use:
adb shell pm clear com.package.name
Or manually delete the folder through a file manager with root access.
How to find out which application takes up the most space in /data/data?
There are several ways:
- Through Android settings: Go in
Settings โ Applications โ Storage. This displays the space occupied by each application (including/data/data). - Via ADB: Commands for analysis:
adb shell du -sh /data/data/* | sort -rhThis command will display a list of folders in
/data/data, sorted by size. - Through applications: Utilities like DiskUsage or Storage Analyzer visualize the occupied space.
On devices with MIUI there is a built-in memory analyzer: Settings โ About phone โ Memory โ Memory analysis.
Is it possible to change the default installation path of applications (for example, so that everything is installed on the SD card)?
No, Android does not provide such an option at the system level. However, there are workarounds:
- ๐ Adoptable Storage: On Android 6โ8, you can format the SD card as internal memory (
Settings โ Storage โ SD card โ Format as internal storage). After this, some applications will be installed on the card automatically. - ๐ Link2SD: An application for root users that creates symbolic links to the SD card for selected applications.
- โ ๏ธ Restrictions: Starting with Android 9, Google has banned formatting SD cards as internal storage due to performance and security issues.
On devices Samsung s One UI there is a "Move to SD card" function, but it only works for supported applications.
What is a folder /data/app-lib and can it be cleared?
The folder /data/app-lib contains separate libraries (.so files) for applications that support multiple architectures (for example, armeabi-v7a, arm64-v8a, x86). These files are downloaded when installing the APK, if they are not built into the package itself.
Clearing it not recommendedsince:
- ๐ Removing libraries can cause applications to crash.
- ๐๏ธ Android automatically cleans this folder when you uninstall the application.
- ๐ฆ The folder size is usually small (several tens of megabytes), so cleaning will not provide a significant increase in memory.
If you need to free up space, it is better to delete unnecessary applications or clear their cache.