1###
2### Apps signed with the platform key.
3###
4
5type platform_app, domain, domain_deprecated;
6app_domain(platform_app)
7# Access the network.
8net_domain(platform_app)
9# Access bluetooth.
10bluetooth_domain(platform_app)
11# Read from /data/local/tmp or /data/data/com.android.shell.
12allow platform_app shell_data_file:dir search;
13allow platform_app shell_data_file:file { open getattr read };
14allow platform_app icon_file:file { open getattr read };
15# Populate /data/app/vmdl*.tmp, /data/app-private/vmdl*.tmp files
16# created by system server.
17allow platform_app { apk_tmp_file apk_private_tmp_file }:dir rw_dir_perms;
18allow platform_app { apk_tmp_file apk_private_tmp_file }:file rw_file_perms;
19allow platform_app apk_private_data_file:dir search;
20# ASEC
21allow platform_app asec_apk_file:dir create_dir_perms;
22allow platform_app asec_apk_file:file create_file_perms;
23
24# Access to /data/media.
25allow platform_app media_rw_data_file:dir create_dir_perms;
26allow platform_app media_rw_data_file:file create_file_perms;
27
28# Write to /cache.
29allow platform_app { cache_file cache_recovery_file }:dir create_dir_perms;
30allow platform_app { cache_file cache_recovery_file }:file create_file_perms;
31
32# Likely not needed
33auditallow platform_app cache_recovery_file:dir create_dir_perms;
34auditallow platform_app cache_recovery_file:file create_file_perms;
35
36# Direct access to vold-mounted storage under /mnt/media_rw
37# This is a performance optimization that allows platform apps to bypass the FUSE layer
38allow platform_app mnt_media_rw_file:dir r_dir_perms;
39allow platform_app vfat:dir create_dir_perms;
40allow platform_app vfat:file create_file_perms;
41
42allow platform_app audioserver_service:service_manager find;
43allow platform_app cameraserver_service:service_manager find;
44allow platform_app drmserver_service:service_manager find;
45allow platform_app mediaserver_service:service_manager find;
46allow platform_app mediaextractor_service:service_manager find;
47allow platform_app mediacodec_service:service_manager find;
48allow platform_app persistent_data_block_service:service_manager find;
49allow platform_app radio_service:service_manager find;
50allow platform_app surfaceflinger_service:service_manager find;
51allow platform_app app_api_service:service_manager find;
52allow platform_app system_api_service:service_manager find;
53allow platform_app vr_manager_service:service_manager find;
54
55# Access to /data/preloads
56allow platform_app preloads_data_file:file r_file_perms;
57allow platform_app preloads_data_file:dir r_dir_perms;
58