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