Neo
Neo

Reputation: 523

Android 11 - access to Android/data directory

Is there any way at all aside from rooting to gain access to the SD card's android/data directory on Android 11? My (non-play store) app requires access to another app's public Android/data/com.appname folder.

Upvotes: 2

Views: 5131

Answers (2)

Mahmoud Aly
Mahmoud Aly

Reputation: 751

You can't

On Android 11, apps can no longer access files in any other app's dedicated, app-specific directory within external storage.

Even using MANAGE_EXTERNAL_STORAGE won't help

Apps that are granted this permission still cannot access the app-specific directories that belong to other apps because these directories appear as subdirectories of Android/data/ on a storage volume.

Unless, the other application set those files sharable

To allow other apps to access files stored in this directory within internal storage, use a FileProvider with the FLAG_GRANT_READ_URI_PERMISSION attribute.

For more Sharing files

Upvotes: 2

Neo
Neo

Reputation: 523

As of October 2021, Google has updated android and any existing method is no longer possible. You can voice your concern about Google removing user access to folders on their own devices here: https://issuetracker.google.com/issues/196422354?pli=1

Upvotes: 0

Related Questions