Any modern smartphone based on Android seems easy to manage until the need for deep intervention in the operation of the system arises. Users often encounter situations where an application does not work correctly, resets authorization, or takes up an abnormally large amount of space. In such cases, a logical question arises: where exactly does the operating system hide configuration data and user preferences? The answer to this question lies deep in the file structure, access to which is limited by default.

Understanding how application settings are storedopens up opportunities for fine-tuning the gadget, recovering lost data, or manually cleaning up โ€œgarbageโ€ that is not removed by standard means. The system uses a strict directory hierarchy to isolate processes from each other and ensure the security of the device owner's personal data. However, this protection often becomes a barrier for those who want to understand the essence of what is happening.

In this material we will analyze in detail the structure of the directories where configuration files, databases and caches are located. You will learn the difference between public folders and protected system partitions. We will also discuss how changes in recent versions Android 11, 12 and 13 affected access to these files and what you now need to do to obtain editing rights.

Basic Android file structure

The โ€œgreen robotโ€ file system is built on the Linux kernel, which implies a strict separation of access rights. All application data is isolated in its own sandboxes. This means that one application cannot simply read the settings of another without special privileges. The main data is located in the internal storage, the path to which usually looks like /data/data/.

Inside this root directory, a separate folder is created for each installed package with a name that matches the application identifier (package name). For example, for a messenger it could be com.whatsapp, and for a system - com.android.systemui. This is where the most important files that determine the behavior of the app live. Access to this section without superuser rights (root) is closed even to file managers.

However, there is also a public space located along the path /sdcard/Android/data/. This is where applications store large amounts of cache, downloaded files, and temporary data that is not security-critical, but is important for performance. Separation into private and public zones is a fundamental principle of security architecture. Android.

๐Ÿ’ก

Before any manipulations with system folders, be sure to create a full backup copy of the data, since deleting a key file can lead to the application not working.

โš ๏ธ Attention: Starting from Android 11, access to the folder /Android/data/ blocked by the system through standard file managers. Viewing content now requires special utilities or a connection to a PC in debug mode.

Private Data directory and SharedPrefs files

The most valuable settings, such as authorization tokens, selected skins, game progress status and user preferences, are stored in a private directory /data/data/<package_name>/. There are several subdirectories inside this folder, but the directory that is most important to us is shared_prefs.

The files in the folder shared_prefs have an extension .xml. These are text documents containing key-value pairs. This is where the application saves simple settings: whether night mode is turned on, what language is selected, whether educational tips have been shown. The structure of these files is understandable to a person and can be easily edited if you have the appropriate rights.

In addition to XML files, the private zone may contain databases SQLite (usually in a folder databases), where more complex information is stored: contact lists, message history, product catalogs. Also located here is a folder code_cache i cache, intended for temporary files that speed up the launch of the app.

  • ๐Ÿ“ shared_prefs โ€” XML files with basic user settings and interface state.
  • ๐Ÿ’พ databases โ€” Local SQLite databases with structured application information.
  • ๐Ÿš€ code_cache โ€” Compiled code and temporary files to optimize performance.

Editing files in this zone requires extreme caution. One extra comma in an XML file can cause the application to stop launching or keep crashing when trying to open settings. The system cannot always automatically restore a damaged configuration.

How to edit XML without root access?

Direct editing is not possible without root. However, some applications allow you to export your settings to an external file through the built-in menu, which can then be modified and imported back.

Public storage and OBB folder

Not all application data needs strict secrecy. Heavy assets such as game textures, downloaded videos, music and offline maps are stored in the public part of the internal memory. The main path to this data is /sdcard/Android/. There are two key subdirectories here: data and obb.

Folder obb (Opaque Binary Blob) is designed to store additional application extension files. Most often, caches of heavy games that do not fit into the main APK file are installed here. Deleting the contents of this folder usually causes the game to stop running and require resources to be downloaded again.

The directory data in public space is used by applications to store caches that can be safely cleared and files that the application is willing to share with other apps. For example, messengers can save received media files here so that the phone gallery can display them.

Folder type Full path Access without Root Destination
Private /data/data/<package>/ No (Root only) Settings, databases, tokens
Public (Cache) /sdcard/Android/data/<package>/cache Limited (Android 11+) Temporary files, thumbnails
Public (OBB) /sdcard/Android/obb/<package>/ Yes Game resources, large files
Public (Files) /sdcard/Android/data/<package>/files Limited (Android 11+) User-uploaded content

It is worth noting that the files in the folder files inside Android/data often contain logs of the application or documents downloaded by the user. Emptying this folder may result in the loss of downloaded files that were not moved to shared media directories.

๐Ÿ“Š Which version of Android do you work with most often?
Android 10 and below
Android 11
Android 12
Android 13 and later

Access restrictions in modern versions of Android

With the release of Android 11 and subsequent versions, Google has tightened its access policy to the file system as part of the Scoped Storage concept. Now even file managers with rights to read the storage do not see the contents of folders /Android/data/ and /Android/obb/. This is done to protect the user's data from spyware.

A regular user, opening Explorer, will see these folders empty or receive a message about access denied. This creates the illusion that the settings and cache have disappeared, when in fact they are simply hidden from standard viewing. There are several ways to bypass this limitation without resorting to complex procedures.

One โ€‹โ€‹of the legal methods is to use a special file manager that requests special permission through the SAF (Storage Access Framework) system dialog. Another option is to connect your smartphone to a computer and manage files via the protocol MTP, although here access may be limited depending on the shell manufacturer.

โš ๏ธ Attention: System menu interfaces and item names may differ depending on the manufacturer (Samsung, Xiaomi, Pixel). If you do not find the described path, check the official documentation of your device model.

For advanced users, there is still the option of using a computer utility ADB (Android Debug Bridge). Through the PC command line, you can get full access to the phone's file system, including hidden partitions, provided that USB debugging is enabled.

Using ADB to manage settings files

The tool ADB is a powerful tool for working with the Android file structure without the need to obtain root access. It allows you to view, copy and even delete files from protected directories, although writing to some system areas may still be limited.

To get started, you need to enable developer mode on your phone and activate USB debugging. After connecting to the computer and installing the drivers, you get access to the device shell. The command adb shell switches you to the command line mode of the smartphone itself.

To copy the settings file from a private folder to the computer, use the command pull. For example, to pull out a specific application's preferences file, the command would look like this:

adb pull /data/data/com.example.app/shared_prefs/settings.xml C:/backup/

This operation creates a copy of the file on your hard drive, which you can open with any text editor, make changes and then return it back with the command push. However, it is worth remembering that the application must be stopped while editing, otherwise the changes may be overwritten or ignored.

โ˜‘๏ธ Preparing to work with ADB

Done: 0 / 4

Restoring and resetting application settings

Knowing where configuration files are stored allows not only edit them, but also perform a complete reset of the application settings manually. This is relevant in situations where the app does not work correctly, and the standard โ€œClear dataโ€ button in the phone settings menu does not help or is missing.

To manually reset, you need to delete the contents of the folders shared_prefs, databases and code_cache in the application directory. After deleting these files, the next time you start the app, it will detect the missing configuration and initiate the initial setup process as if it had just been installed.

This method is especially useful for restoring access to accounts if the application has โ€œrememberedโ€ incorrect authorization data and does not allow you to log in again. By deleting a file with a token, you will force the application to request a login and password again.

๐Ÿ’ก

Manually deleting settings files through a file manager or ADB is analogous to the โ€œReset dataโ€ function in system settings, but gives more flexible control over what exactly to delete.

However, this approach requires care. Do not delete entire folders if you are not sure of their purpose, as there may be critical files inside that are necessary for the operation of the application core. It is always better to rename the folder (for example, adding a suffix _old), check the app is working, and only then delete the old version.

Frequently asked questions (FAQ)

Is it possible to transfer the settings folder to an SD card?

It is impossible to transfer the folder itself /data/data/ to a memory card without deep modification of the system, since it is tied to the internal security section. However, many applications allow in their internal settings to change the path for saving the cache or downloaded files to an external drive.

What happens if you delete the shared_prefs file?

The application will lose all user settings: the theme, language, notification settings and saved states will be reset. The next time you run it, it will create a new file with default settings. Account data (login/password) is usually stored encrypted in another place and may not be affected.

Why canโ€™t I see the Android/data folder on the phone?

On Android 11 and newer, access to this folder is hidden from standard file managers for security purposes. To see the files, use specialized applications (for example, Files by Google with special rights) or connect the phone to the computer via USB.

Where are system application settings stored?

System application settings are also located in /data/data/, but their packages often have names like com.android... or com.google.android.... Changing these files can lead to unstable operation of the entire system, so extreme caution is required.

How to find the package name of an application?

The package name can be found in the Google Play store in the browser address bar (after id=) or using special inspector applications installed on the smartphone itself, which display technical information about installed apps.