Interpreting Android SELinux untrusted_app.te

Viewed 10

I am trying to understand the SELinux rules that apply to a normal application installed in Android. From what I understand, normal applications are categorized as "untrusted_app" under SELinux.

I searched online and found the .te file (https://android.googlesource.com/platform/external/sepolicy/+/57531cacb40682be4b1189c721fd1e7f25bf3786/untrusted_app.te).

In the file, it was stated that untrusted_app can write to /cache and has these permissions (line 79-81)

# Write to /cache.
 - allow untrusted_app cache_file:dir create_dir_perms;
 - allow untrusted_app cache_file:file create_file_perms;

I tried to create a file and folder from within my application in the /cache folder but permission was denied.

Am I interpreting the rules wrongly?

0 Answers
Related