1# ============================================== 2# Policy File of /vendor/bin/atcid Executable File 3# ============================================== 4 5# ============================================== 6# MTK Policy Rule 7# ============================================== 8type atcid, domain; 9type atcid_exec, exec_type, file_type, vendor_file_type; 10 11init_daemon_domain(atcid) 12set_prop(atcid, vendor_mtk_persist_service_atci_prop) 13allow atcid block_device:dir search; 14allow atcid gsmrild_socket:sock_file write; 15 16# Date : WK17.21 17# Purpose: Allow to use HIDL 18hwbinder_use(atcid) 19hal_client_domain(atcid, hal_telephony) 20 21allow atcid ttyGS_device:chr_file { read write ioctl open }; 22allow atcid wmtWifi_device:chr_file { write open }; 23allow atcid misc2_block_device:blk_file { read write open }; 24allow atci_service gpu_device:chr_file { read write open ioctl getattr }; 25allow atcid self:capability sys_time; 26 27# Date : WK16.33 28# Purpose: Allow to access ged for gralloc_extra functions 29allow atcid proc_ged:file rw_file_perms; 30 31# Date : WK17.23 32# Stage: O Migration, SQC 33# Purpose: Allow to use HAL PQ 34hal_client_domain(atcid, hal_pq) 35 36# Date : WK17.34 37# Purpose: Allow to access meta_tst 38allow atcid meta_tst:unix_stream_socket connectto; 39 40# Date : WK18.15 41# Purpose: Allow to access power_supply in sysfs 42allow atcid sysfs_batteryinfo:file { read open }; 43 44# Date : WK18.16 45# Operation: P migration 46# Purpose: Allow atcid to get vendor_mtk_tel_switch_prop 47get_prop(atcid, vendor_mtk_tel_switch_prop) 48 49# Date : WK18.21 50# Purpose: Allow to use HIDL 51hwbinder_use(atcid); 52vndbinder_use(atcid); 53hal_server_domain(atcid, hal_atci) 54add_hwservice(hal_atci_server,hal_atci_hwservice) 55 56# Date : WK18.21 57# Purpose: For special command for customer 58set_prop(atcid, vendor_mtk_atci_prop) 59set_prop(atcid, powerctl_prop) 60allow atcid mnt_vendor_file:dir search; 61allow atcid nvdata_file:dir { open read write search add_name }; 62allow atcid nvdata_file:file { open read write create getattr setattr }; 63allow atcid nvram_device:blk_file { open read write }; 64allow atcid proc_meminfo:file { open read }; 65allow atcid sysfs_batteryinfo:dir search; 66allow atcid sysfs_devices_block:dir search; 67allow atcid sysfs_devices_block:file { read open }; 68 69# Date : WK18.35 70# Purpose: Add socket for TelephonyWare ATCI 71unix_socket_connect(atcid, rild_atci, rild); 72unix_socket_connect(atcid, rilproxy_atci, rild); 73unix_socket_connect(atcid, atci_service, atci_service); 74 75# Date : WK19.42 76# Purpose: Add policy to access ATCI sockets 77unix_socket_connect(atcid, atci-audio, audiocmdservice_atci); 78unix_socket_connect(atcid, meta_atci, meta_tst); 79allow atcid adb_atci_socket:sock_file write; 80