1# ============================================== 2# Policy File of /system/bin/thermal_manager Executable File 3 4# ============================================== 5# Type Declaration 6# ============================================== 7type thermal_manager_exec , exec_type, file_type, vendor_file_type; 8type thermal_manager ,domain; 9 10# ============================================== 11# MTK Policy Rule 12# ============================================== 13init_daemon_domain(thermal_manager) 14 15allow thermal_manager proc_mtkcooler:dir search; 16allow thermal_manager proc_mtktz:dir search; 17allow thermal_manager proc_thermal:dir search; 18allow thermal_manager proc_mtkcooler:file rw_file_perms; 19allow thermal_manager proc_mtktz:file rw_file_perms; 20allow thermal_manager proc_thermal:file rw_file_perms; 21 22allow thermal_manager thermal_manager_data_file:file create_file_perms; 23allow thermal_manager thermal_manager_data_file:dir { rw_dir_perms setattr }; 24 25allow thermal_manager mediaserver:fd use; 26allow thermal_manager mediaserver:fifo_file { read write }; 27allow thermal_manager mediaserver:tcp_socket { read write }; 28 29# Date : WK16.30 30# Operation : Migration 31# Purpose : 32allow thermal_manager camera_isp_device:chr_file { read write }; 33allow thermal_manager cameraserver:fd use; 34allow thermal_manager kd_camera_hw_device:chr_file { read write }; 35allow thermal_manager MTK_SMI_device:chr_file read; 36allow thermal_manager surfaceflinger:fd use; 37set_prop(thermal_manager, vendor_mtk_thermal_config_prop) 38 39# Date : 2019/09/12 40# Operation : Migration 41# Purpose : add sysfs permission 42# path = " sys/devices/virtual/thermal/" 43# path = " sys/class/thermal/" 44allow thermal_manager sysfs_therm:file w_file_perms; 45 46 47 48# Date : WK18.18 49# Operation : P Migration 50# Purpose : Allow thermal_manager to access vendor data file. 51 52allow thermal_manager self:capability { fowner chown }; 53 54