Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is permissions in Android stored?

The developer doc: Requesting Permissions at Run Time clearly mentions what runtime permission is and how to use it. And I am able to execute them as well.

However, the question is : where does Android store the run-time permission values?

ie, when the user deletes the data associated with the app, the permissions are reset, so where do Android store these values? (is it in the app cache or in any other place). And in what format ? ( is it a database or a sharedpreferences file or any other) And how are they stored? (encryped or non-encrypted) .

Searched in many existing answers and developer docs, however couldn't find any useful info in this regard. Any help will be much appreciated.

like image 241
OBX Avatar asked Feb 10 '17 10:02

OBX


1 Answers

I'm not sure if you found the answer to this or not, but they are stored in:

/data/system/users/0/runtime-permissions.xml

When the system is reset, or a new user created, the system also populates this with system app permissions to auto grant them. I have been trying to research how to auto grant permissions to system apps.

See this answer for more details.

like image 112
parkgrrr Avatar answered Oct 16 '22 20:10

parkgrrr