1type thermal-engine, domain;
2type thermal-engine_exec, exec_type, vendor_file_type, file_type;
3
4init_daemon_domain(thermal-engine)
5
6allow thermal-engine self:capability2 block_suspend;
7
8# to read /sys/devices
9allow thermal-engine sysfs:dir r_dir_perms;
10
11allow thermal-engine sysfs_msm_subsys:dir r_dir_perms;
12allow thermal-engine sysfs_msm_subsys:file rw_file_perms;
13allow thermal-engine sysfs_soc:dir search;
14allow thermal-engine sysfs_soc:file r_file_perms;
15allow thermal-engine sysfs_thermal:dir r_dir_perms;
16allow thermal-engine sysfs_thermal:file rw_file_perms;
17allow thermal-engine sysfs_thermal:lnk_file read;
18allow thermal-engine sysfs_rmtfs:dir search;
19allow thermal-engine sysfs_rmtfs:file r_file_perms;
20# to read /proc/stat
21allow thermal-engine proc_stat:file { getattr open read };
22
23allow thermal-engine thermal_device:chr_file rw_file_perms;
24
25r_dir_file(thermal-engine, sysfs_batteryinfo)
26allow thermal-engine sysfs_batteryinfo:file w_file_perms;
27
28r_dir_file(thermal-engine, sysfs_leds)
29r_dir_file(thermal-engine, sysfs_msm_subsys)
30r_dir_file(thermal-engine, sysfs_uio)
31
32allow thermal-engine self:socket create_socket_perms;
33allowxperm thermal-engine self:socket ioctl msm_sock_ipc_ioctls;
34
35# reboot/shutdown for thermal limits exceeded
36set_prop(thermal-engine, powerctl_prop)
37
38userdebug_or_eng(`
39  allow thermal-engine diag_device:chr_file rw_file_perms;
40')
41dontaudit thermal-engine diag_device:chr_file rw_file_perms;
42