summaryrefslogtreecommitdiffstats
path: root/r_non_plat/thermal_manager.te
blob: 3bdf75cd6eedf0669cf459d52152c13dc687af53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# ==============================================
# Policy File of /system/bin/thermal_manager Executable File

# ==============================================
# Type Declaration
# ==============================================
type thermal_manager_exec , exec_type, file_type, vendor_file_type;
type thermal_manager ,domain;

# ==============================================
# MTK Policy Rule
# ==============================================
init_daemon_domain(thermal_manager)

allow thermal_manager proc_mtkcooler:dir search;
allow thermal_manager proc_mtktz:dir search;
allow thermal_manager proc_thermal:dir search;
allow thermal_manager proc_mtkcooler:file rw_file_perms;
allow thermal_manager proc_mtktz:file rw_file_perms;
allow thermal_manager proc_thermal:file rw_file_perms;

allow thermal_manager thermal_manager_data_file:file create_file_perms;
allow thermal_manager thermal_manager_data_file:dir { rw_dir_perms setattr };

allow thermal_manager mediaserver:fd use;
allow thermal_manager mediaserver:fifo_file { read write };
allow thermal_manager mediaserver:tcp_socket { read write };

# Date : WK16.30
# Operation : Migration
# Purpose :
allow thermal_manager camera_isp_device:chr_file { read write };
allow thermal_manager cameraserver:fd use;
allow thermal_manager kd_camera_hw_device:chr_file { read write };
allow thermal_manager MTK_SMI_device:chr_file read;
allow thermal_manager surfaceflinger:fd use;
set_prop(thermal_manager ,mtk_thermal_config_prop)

# Date : 2019/09/12
# Operation : Migration
# Purpose : add sysfs permission
# path = " sys/devices/virtual/thermal/"
# path = " sys/class/thermal/"
allow thermal_manager sysfs_therm:file w_file_perms;



# Date : WK18.18
# Operation : P Migration
# Purpose : Allow thermal_manager to access vendor data file.

allow thermal_manager self:capability { fowner chown };