The modern Android ecosystem is undergoing fundamental changes in the area of data security, and the central element of this transformation has become Android Storage Access Framework (SAF). Many users are faced with a situation where traditional file managers suddenly stop seeing folders on a memory card or internal storage, requiring strange access confirmations. This is not a system failure, but a deliberate architectural overhaul implemented by Google developers to protect personal information from malware.

Understanding how SAF works is critical for any smartphone owner who wants to maintain control over their data. Unlike older access models, where an application could request permission to read the entire disk, the new model requires explicit user consent to work with specific files or directories. This approach minimizes the risks of data leakage, but at the same time complicates interaction with the file system for advanced use cases.

In this article we will examine in detail what is hidden behind the SAF acronym, why Google persistently implements these restrictions, and how an ordinary user can competently configure access to media files and documents without losing the functionality of the device.

Architectural changes in management files

The traditional file access model in Android, based on direct paths to resources, has long been considered convenient, but vulnerable. Any application given permission to read the storage could theoretically scan all your photos, communications and documents. Storage Access Framework changes this paradigm by introducing a layer of abstraction between the application and the physical file system. Now apps do not work with paths directly, but interact through the system document provider.

This system was introduced back in Android 4.4 KitKat, but received maximum development and mandatory status in versions Android 10, 11 and later. The essence of the change is that the application no longer receives the absolute path to the file (for example, /sdcard/DCIM/Camera). Instead, it receives a URI that allows you to work with the file only within the scope of the granted permissions. This creates a kind of “sandbox” for each application.

For developers, this means the need to rewrite code that uses classes File and FileInputStreamto use ContentResolver and I/O streams via URIs. For users, this is expressed in the appearance of system dialogs that require confirmation of access to folders when first launching a new file manager or media player.

⚠️ Attention: In the latest versions of Android, access to the root directory of the internal storage via SAF may be completely blocked for third-party applications. The system allows access only to specific media collections or user folders.

DocumentProvider and URI mechanism

SAF is based on a component called DocumentProvider. This is a special service that acts as an intermediary between the application requesting access and the actual data storage. When you select a file through the system interface, you are actually interacting with that provider, not the file system directly. It is the DocumentProvider that returns to the application a URI of the form content://com.android.providers.media.documents/..., which contains encrypted access rights.

This mechanism allows you to implement a flexible permission system. You can give the app access to just one specific photo, your entire Downloads folder, or your entire external SD card storage. In this case, the application will not know about the existence of other files on the device that you have not granted access to. This significantly increases privacy, since even malicious code will not be able to scan the entire disk for passwords or personal photos.

It is important to understand that the URI issued through SAF is temporary or permanent depending on how the user verified access. If you select the "Use this folder" option in the system dialog, the application receives a long-term grant to work with this directory. Otherwise, access may be one-time.

Technical details of URI

URI in SAF contains not only the path to the file, but also the document identifier, as well as the authority flag. The system checks these flags with every read or write operation, which guarantees compliance with security policies even if the application has been hacked after gaining access.

Practical application for users

For the average smartphone owner, interaction with the Android Storage Access Framework occurs primarily when installing new applications or updating existing ones. The most common scenario is setting up an alternative file manager, such as Files by Google, Solid Explorer or CX File Explorer. When first launched, such apps ask to “Allow access to all files” or offer to select a specific folder through the system interface.

The process of granting access is as follows: the application opens the system document selection window, the user uses the navigation menu to find the desired directory (for example, a folder with music on an SD card) and presses the blue “Use this folder” button at the bottom of the screen. After this click, the application receives full rights to read and write to this directory and all its subfolders.

However, there are situations when the automatic request does not work correctly, especially on devices with custom shells from Xiaomi, Samsung or Huawei. Manufacturers often add their own restrictions on top of the standard SAF, requiring additional confirmation in the system settings. In such cases, you may need to manually activate special features for the file manager.

📊 How do you prefer to manage files on Android?
Standard file manager
Third-party applications (Solid Explorer, etc.)
Via a computer via USB
Cloud storage without file access

Scoped Storage limitations and their impact

Starting with Android 10, Google introduced the concept Scoped Storage (Isolated Storage), which is closely intertwined with SAF. This technology divides files into categories: media files (photos, videos, audio), downloads and other data. For media files and downloads, apps can access through standard collections without requiring complex permissions, but for other file types, access is strictly limited.

The main limitation of Scoped Storage is that an app cannot freely create files in arbitrary locations in the root directory. Previously, many utilities created their folders directly in the root of the internal drive, but now they are required to use a special directory Android/data/[package_name]. This leads to the fact that older versions of apps may no longer save settings or caches in the usual places.

Users often notice that after updating to Android 11 or 12, some applications “forget” their settings or do not see previously downloaded files. This is a direct result of the tightening of SAF and Scoped Storage policies. Developers are forced to adapt the software by transferring data to permitted zones or asking the user for explicit permission to manage all files, which is becoming increasingly difficult in new versions of Android.

Access type Android 9 and below Android 10-11 Android 12+
Photo access Full access via paths Through MediaStore collections Strict access via SAF
Access to the root Allowed for everyone Restricted Blocked for third-party
Android/data folder Free access Access only for your package Full isolation
External SD card Full access Only through SAF Only through SAF + restrictions

⚠️ Attention: The interfaces of SAF system dialogs may differ on smartphones from different manufacturers. On some devices, the access confirmation button may be hidden behind the “More” menu or have a non-standard location.

Solving problems with access to an SD card

One ​​of the most painful topics for users is working with external microSD memory cards. The SAF mechanism was created largely to streamline writing to removable media, which were previously vulnerable to file system corruption due to incorrect operation of applications. However, this has led to the fact that many popular file managers have lost the ability to write data to the card without additional “dancing with a tambourine.”

If your application does not see the SD card or cannot save a file to it, you must manually grant permission through the system interface. This is usually done in the settings of the application itself in the “Storage” section or during the first recording attempt. The system will open a selection window where you need to find the root folder of the memory card (often called XXXX-XXXX or SD Card) and confirm the selection.

In cases where the standard dialog does not appear or access is not saved, you can try clearing the cache of the Document Storage application (DocumentsUI). This is a system component responsible for displaying the SAF interface. Resetting it often helps to restore the correct operation of file selection dialogs.

☑️ Diagnosing problems with the SD card

Done: 0 / 5

Third-party utilities to bypass restrictions

For advanced users who need full control over the file system, there are specialized utilities that use SAF capabilities to provide access to other apps. A striking example is the application All Files Access Manager or functions in advanced explorers like Mixplorer. These tools act as a gateway: they gain full access through SAF and then broadcast it to other applications through a local server or special APIs.

Use of such solutions requires caution. By giving one application "superuser" rights within the file system, you are relying on its security. If such a utility is compromised, the attacker will have access to all the data it aggregates. Therefore, it is recommended to use only proven open source solutions or from well-known developers.

It is also worth noting that with the release of new versions of Android, Google is gradually closing the loopholes that such utilities used. What worked on Android 10 can be blocked on Android 13 without rooting. Therefore, you should not rely on workarounds as a permanent solution - it is better to adapt to new security standards.

💡

If the standard SAF dialog does not allow you to select the desired folder, try manually entering the path in the address bar of the selection window or using the menu button (three dots) to switch the file display type to a list.

💡

Data security in Android is a priority over ease of access. SAF restrictions protect you from spyware, even if it creates temporary inconvenience during setup.

Frequently asked questions (FAQ)

Why does the application ask for access to files every time you start?

This happens if you have not confirmed long-term access through the SAF system dialog. When selecting a file, make sure to click the "Use this folder" button and not just open the file. Also check if you are resetting the application permissions in the system settings.

Is it possible to completely disable the Storage Access Framework?

No, SAF is a system component of the Android kernel and cannot be disabled without flashing the device or obtaining root access and then tampering with the system files. Attempts to disable it will result in most modern applications not working.

Is it safe to give access to “All files” in Android 11+ settings?

Granting access to “All Files Access” is a last resort. Do this only for trusted file managers. For regular applications (players, editors), it is better to use point access via SAF to specific folders.

Why can’t I see the Android/data folder through a regular explorer?

Starting with Android 11, access to folders Android/data and Android/obb on the internal drive is hidden for third party applications for security purposes. You can view them only through special utilities that use SAF, or by connecting the phone to the computer in MTP mode.