[Detail] In Android P, the main restriction is system and vendor cant communicate with on-desk files. [Solution] 1.Move thermal setting file to vendor. 2.Remove selinux violation policy. 3.Add thermal manager access vendor data file policy. MTK-Commit-Id: e579309fd163aa58f632784ce9d594d09e673096 Change-Id: Ibdec1e275eccfbbbd697c413e70a57705e643817 CR-Id: ALPS03867358 Feature: Thermal Management Signed-off-by: jerry-sc.wu <jerry-sc.wu@mediatek.com>
56 lines
2.2 KiB
Plaintext
56 lines
2.2 KiB
Plaintext
# ==============================================
|
|
# 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;
|
|
|
|
|
|
# Date : WK15.30
|
|
# Operation : Migration
|
|
# Purpose : Use file_type_auto_trans to specify label to avoid violated(never allow)
|
|
allow thermal_manager thermal_manager_data_file:file { create write read open setattr write lock};
|
|
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 pq:fd use;
|
|
allow thermal_manager mediaserver:tcp_socket { read write };
|
|
|
|
# Date : WK16.30
|
|
# Operation : Migration
|
|
# Purpose : Use file_type_auto_trans to specify label to avoid violated(never allow)
|
|
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 property_socket:sock_file write;
|
|
allow thermal_manager surfaceflinger:fd use;
|
|
allow thermal_manager init:unix_stream_socket connectto;
|
|
allow thermal_manager sysfs:file write;
|
|
|
|
# Date : WK17.12
|
|
# Operation : Migration
|
|
# Purpose : Allow thermal_manager to notify SPA.
|
|
allow thermal_manager mtk_thermal_config_prop:file { getattr open read };
|
|
allow thermal_manager mtk_thermal_config_prop:property_service set;
|
|
|
|
# Date : WK18.18
|
|
# Operation : P Migration
|
|
# Purpose : Allow thermal_manager to access vendor data file.
|
|
allow thermal_manager vendor_data_file:dir { write add_name };
|