Updating to Android 13 brought not only visual improvements, but also significant changes in security policy regarding file management. Users accustomed to free access to system directories in previous versions of the OS now face severe restrictions when trying to copy or move files to protected areas such as /data/data. This is done to protect user data from malware, but makes life difficult for enthusiasts and developers.

The need to transfer a configuration file, database or modified library to this directory often arises when fine-tuning applications or restoring backup copies. Standard file managers no longer allow you to perform these operations simply by dragging and dropping. You will have to deal with new access mechanisms that require either granting special permissions through system settings or using advanced debugging tools.

In this article we will analyze in detail all the available ways to solve this problem. We will consider both methods that do not require receipt root access, and options for advanced users with full access to the system. Understanding the directory structure and operating principles Scoped Storage will help you securely manage files without violating the integrity of the operating system.

Features of the file system in Android 13

Starting with Android 11 and continuing to version thirteen, Google has implemented strict application isolation rules. The directory /data/data is now hidden from most processes by default, even if the application has permission to access all files. This means that a regular file manager simply will not display the contents of this folder or will block writing to it.

Each application in the system has its own unique user identifier (UID), and the files in its personal folder are accessible only to it. An attempt by a third-party application to write data to a foreign directory without the appropriate privileges will be blocked by the system kernel. This is why the standard โ€œcopy-pasteโ€ method has stopped working for system directories.

โš ๏ธ Attention: Incorrectly changing files in a directory /data/data can lead to unstable applications or a complete failure of the system to boot. Always create a backup copy before making changes.

To bypass these restrictions, there are special mechanisms, such as using SAF (Storage Access Framework) or working through a debug bridge ADB. Understanding exactly how the system checks permissions is the key to successfully moving files. Without this knowledge, any attempts will end in an โ€œAccess Deniedโ€ error.

Why did Google tighten the rules?

Starting with Android 10, the company began an active fight against application access to shared storage. In Android 13, this has reached its peak: now even access to media files requires the user to explicitly select the content type, and access to system folders is completely closed to ordinary applications without root.

Preparing the device and the necessary tools

Before you begin manipulating system files, you need to prepare the working environment. You will need a computer with installed drivers for your smartphone and a set of utilities Platform Tools. You also need to activate the developer mode on the device itself, which is hidden by default.

To activate the developer mode, go to the menu Settings โ†’ About phone and find the item Build number. Click on it quickly seven times in a row until a notification appears indicating that you have become a developer. After this, a new section will appear in the main settings For developerswhere you need to enable USB debugging.

  • ๐Ÿ“ฑ Make sure that it is enabled on your device USB debugging in the developer menu.
  • ๐Ÿ’ป Download and extract the package Android SDK Platform-Tools to your computer.
  • ๐Ÿ”Œ Use a high-quality original USB cable for a stable connection.
  • ๐Ÿ”‹ Charge your smartphone to at least 50% to avoid shutdown during the process.

If you plan to use methods that require elevated privileges without full root, you may need an application Shizuku. This service allows common applications to execute commands with system rights through ADB, which is a secure alternative to completely rooting the device for many tasks.

โ˜‘๏ธ Ready to go

Done: 0 / 5

Move method via ADB without root access

The most reliable way to move a file to a protected directory without obtaining full superuser access - using the command line via ADB. This method allows you to execute commands as a shell shellwhich has more rights than regular applications, but less than root.

Connect your smartphone to your computer and open a terminal or command line in the ADB utilities folder. First check the connection by entering the command adb devices. You will be prompted for debugging permission on your phone screen, which you must confirm. Only after the device appears in the list can you continue working.

To copy the file, use the command adb push. The syntax is as follows:

adb push /path/to/file/on/PC /path/in/android

However, direct writing to /data/data/package_name via ADB without root is often impossible due to SELinux restrictions and folder owner rights. In this case, the file is first downloaded to a temporary directory, for example /data/local/tmp, and then moved inside the application using special utilities or scripts launched via Shizuku.

๐Ÿ’ก

Use the command 'adb shell ls -l /data/data' to see a list of packages and their owners. This will help you understand which folders are writable and which are hard-protected.

If your device is not rooted, you may encounter an error Permission denied when you try to write a file directly. In this case, the only legal way is to use the backup function adb backup, modify the archive and restore via adb restore, although this method does not work for all applications due to flags android:allowBackup="false".

Using file managers with SAF support

For users who prefer a graphical interface to the command line, there are advanced file managers who can work with structure SAF. Applications like Mixplorer, Solid Explorer or FX File Explorer allow you to request access to system folders through the system dialog box.

When you try to open a folder Android/data or Android/obb (and in some cases even deeper), the file manager will redirect you to the system folder selection window. There you need to click the โ€œUse this folderโ€ button and confirm the action. After this, the application will receive a temporary access token for writing to the specified directory.

Application SAF support Root required Usability
Mixplorer Full No (optional) High
Solid Explorer Partial No Average
Root Explorer No Yes (required) High
CX File Explorer Full No High

It is important to understand that even with SAF access to the folder itself /data/data (application data root) is usually closed to third-party managers without root access. SAF basically opens access to external storage and public directories inside Android. To work with private application data inside /data/data you will still need either root or specific workarounds via ADB.

๐Ÿ“Š Which file manager do you use most often?
Solid Explorer
Mixplorer
Standard "Files"
CX File Explorer
Other

Moving files with Root access

Presence root access removes absolutely all restrictions on access to the file system. If your device is rooted with Magisk or KernelSU, you get full control over the director /data. This is the easiest and fastest way to move files.

You will need a file manager with root support, for example Root Explorer or the same Mixplorer with superuser mode enabled. When first launched, the application will ask for root permission, which must be granted. After this, you will be able to freely move along the path /data/data.

The moving process becomes trivial: find the desired file in the internal storage, select the "Copy" or "Cut" function, go to the target application folder and click "Paste". The system will automatically assign the necessary owner rights to the file, although sometimes they have to be adjusted manually through the "Properties" or "chmod" menu.

โš ๏ธ Attention: When working with root access, you are fully responsible for the integrity of the system. An error in the file name or access rights can โ€œbrickโ€ the application or cause a cyclic reboot of the device.

Remember that after updating the system or the application itself, file permissions may be reset. If the application stops launching after transferring a file, check the file's owner (UID) and group (GID). They must match the owner of the application's main folder. You can change this with the command chown in the terminal with superuser rights.

๐Ÿ’ก

Root access gives complete freedom of action, but requires a deep understanding of the Android structure. For one-time operations, it is safer to use ADB or SAF.

Solving common access errors

Even after following all the instructions, users often encounter errors. The most common of them is Failed to copy: Permission denied. This means that the current user (even the shell) does not have write permission to the target directory. In Android 13, this is often associated with a policy SELinuxthat operates in Enforcing mode.

Sometimes the problem lies in the fact that the target application is actively running in the background and locking its files. Before moving critical files, it is recommended to force stop the application through the settings (Settings โ†’ Applications โ†’ [Name] โ†’ Stop). This will free up file descriptors and allow you to replace files without conflicts.

Another reason for failure may be the file system. Some partitions can be mounted Read-Only. In this case, you need to remount the partition with write permissions, which is done through the command:

adb shell mount -o rw,remount /data

However, in modern versions of Android with dynamic partitions, this command may not work without an unlocked bootloader and custom recovery. If you don't see changes after moving the file, try clearing the application's cache so that it will re-read the configuration the next time you start it.

What is a SELinux context?

SELinux (Security-Enhanced Linux) is a kernel module that implements security policy. Even if you are root, SELinux can deny a process access to a file if their security contexts do not match. To temporarily disable it, use the 'setenforce 0' command, but this reduces the protection of the device.

Frequently asked questions (FAQ)

Is it possible to move a file to /data/data without a computer?

Yes, this is possible, but only if you have root access and the appropriate file manager is installed. Without root and without a computer (ADB), access to this folder in Android 13 is completely blocked due to Google's security policies.

Why does the file disappear after moving or the application crashes?

Most likely, the file has incorrect permissions or an incorrect owner. The application cannot read a file created by another user. It is necessary to change the rights to rw-rw-r-- (644) or rw------- (600) and set the owner to the corresponding UID of the application.

Is it safe to use the 'setenforce 0' command?

No, it is not recommended to keep the device in this mode all the time. This disables important kernel security mechanisms, leaving the phone vulnerable to exploits. Use this mode only temporarily to carry out necessary operations and immediately return the value 1.

Does this method work on Xiaomi and Samsung smartphones?

Yes, the principles of the file system are the same for all manufacturers. However, on Samsung smartphones with protection enabled Knox obtaining root access may permanently block some functions (for example, Samsung Pay), and on Xiaomi you may need to unlock the bootloader after waiting 7 days.