• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

Question Android 11 storage directory permissions

Search This thread

CCaster

New member
Jun 19, 2021
1
0
Hello,

I recently got a Poco X3 Pro, previously I had a Redmi Note 9S and noticed something unusual when apps tried to access the storage directory in the Poco. At first I thought it may be a config change on the Poco (like the "app vault only" on the poco launcher compared to mi launcher), but the after some googling I found out it was related to Android 11 scoped storage.

The issue here is that app no longer have read permission on the storage or media_rw directories. I don't know if it's something from scoped storage or google just decided that apps could no longer read those directories.

Apps can still read or ask permission to manage an external storage if they can get the directory fullname (storage/sdcarname/...), but apps that use a basic file explorer can't access the external storage. Apps like emulators that users usually have an external sdcard to store their roms have this problem. Apps can read files on the external sdcard if you use a 3rd party app like a file explorer to open those files with the app that can't access the external storage, users with emulators are relying on the app called Dig to scan the files and open the roms on their respective emulator.

I tried the adb command to disable scoped storage per app from this article:
The Storage Access Framework is the only way for apps to work with all your files in Android
But it didn't let one of the apps read the storage folder.


I used a root file exploer to see if something was wrong and noticed that the Poco X3 Pro on Android 11 had 710 permissions while the Redmi Note 9S on Android 10 had 755. So even if an app can get the permissions to access all files on android 11, if it uses a basic file explorer it will be unable to access the external storage.

I rooted the phone to see if I could change the file permissions. Unfortunately they only remain for a minute or so. Fortunately I could use the time to access the files and set the rom library for the emulators.

Is this something related to scoped storage?
Is there a way to make the directory permissions permanent?

Image: storage directory permissions
image3808.png
 
Last edited: