File access in Android 13

Android 13 introduces some changes to how apps and users can access files on the device.
One important change is that apps can no longer directly access files in other apps' private storage directories.
This is a security measure to protect user data.

-- To introduce how to exchange files on Android 13 in two respects --

1. How to operate files within an Android device
2. How to exchange files by connecting an Android to a computer.


- How to operate files with a file app that support Android13.

You may be able to operate files on Android 13 by using the following apps:

Files by Google (Marc apps)
https://play.google.com/store/apps/details?id=com.marc.files&hl

Other apps that have been granted permission by Google to be a file explorer app.
X-plore, Solid Explorer, Ghost Commander, etc.


- How to access files in any folder using [DOCUMENT_TREE]

For models that display [DOCUMENT_TREE] in the load menu, you can use this function to load and save files to any folder.
For how to use [DOCUMENT_TREE], please refer to the following location in the manual.
Grammar > File System > [About changes to the SD storage system in Android 11] > [DOCUMENT_TREE]


- How to access files using Android studio's Device Explorer

Android studio

https://developer.android.com/studio/
The Device Explorer function of this development tool software allows you to exchange files between an Android device connected via USB and a computer.

For how to use Device Explorer,
search for 'Android studio Device Explorer' and refer to the information you can obtain.
[Example]
https://developer.android.com/studio/debug/device-file-explorer

Device Explorer has some limitations compared to the method using adb described below.
Only app-specific storage areas of internal storage can be accessed (some restrictions apply)
In the case of Android 13, not all internal storage can be accessed

 


- How to Access Files on Android 13 using ADB Commands

There is a way to access these files using the Android Debug Bridge (ADB) tool.
ADB is a command-line tool that allows you to communicate with Android devices from your computer.
This is a complicated, but it is a surefire way.

Prerequisites:

Install ADB on your computer:

ADB is included in the Android SDK Platform Tools.
Download and install the latest version from the Android developer
website: https://developer.android.com/studio

Enable USB Debugging on your Android device:

On your Android device, enable USB Debugging in the Developer Options menu.
To enable Developer Options, follow these steps:

Go to Settings > About phone > Build number.
Tap the build number 7 times to enable Developer Options.
Go back to Settings and open the Developer Options menu.
Scroll down and enable the "USB Debugging" option.
Connect your Android device to your computer:

Connect your Android device to your computer using a USB cable.

Loading Files:

Open a command prompt or terminal window with administrator privileges:

On Windows, open the Command Prompt from the Start menu.
On Mac, open the Terminal application.

Verify device connection:

Run the following command to check if your device is connected and recognized:
adb devices

If your device is connected, you should see your device's serial number listed.

Load a file to your device:

Use the following command to load a file from your computer to your Android device:
adb push <local_file_path> <device_file_path>

Example:
adb push C:\Users\Public\test.txt /sdcard/test.txt

Replace <local_file_path> with the actual path to the file on your computer.
Replace <device_file_path> with the desired location on your Android device to save the file.

Saving Files:

Copy a file from your device to your computer:

Use the following command to copy a file from your Android device to your computer:
adb pull <device_file_path> <local_file_path>

Example:
adb pull /sdcard/test.txt C:\Users\Public\test_copy.txt

Replace <device_file_path> with the path to the file on your Android device.
Replace <local_file_path> with the desired location on your computer to save the copied file.

Notes:
Make sure to run ADB commands with administrator privileges to avoid permission issues.

Handle with caution:

Use ADB commands with caution, as incorrect commands can potentially damage your device or data.

Back up important files:
Always back up important files before performing any critical operations using ADB.

Additional Resources:

ADB official documentation: https://gist.github.com/Pulimet/5013acf2cd5b28e55036c82c91bd56d8