1# ============================================== 2# Policy File of /vendor/bin/wlan_assistant Executable File 3 4# ============================================== 5# Type Declaration 6# ============================================== 7type wlan_assistant_exec , exec_type, file_type, vendor_file_type; 8type wlan_assistant ,domain; 9 10# ============================================== 11# MTK Policy Rule 12# ============================================== 13init_daemon_domain(wlan_assistant) 14 15# Date : WK14.34 16# Operation : Migration 17# Purpose : for mtk debug mechanism. agpsd_data_file, mtk_agpsd are used 18# to share wifi scan results with AGPS module. netlink_socket is used to 19# listen events of wlan driver. udp_socket is used to do ioctl with wlan driver 20# kernel-3.18 uses netlink_socket, but kernel-4.4 uses generic netlink_socket 21allow wlan_assistant agpsd_data_file:sock_file write; 22allow wlan_assistant mtk_agpsd:unix_dgram_socket sendto; 23allow wlan_assistant agpsd_data_file:dir search; 24allow wlan_assistant self:netlink_generic_socket create_socket_perms_no_ioctl; 25allow wlan_assistant self:udp_socket { create ioctl }; 26 27# Date : WK18.17 28# Operation : Migration 29# Purpose : To allow wlan_assistant monitor /vendor/nvdata/APCFG/APRDEB, 30# /storage/sdcard0, /vendor/firmware. Which can help to check if nvram, 31# driver config or firmware config file are changed, if yes, will write it 32# to wlan driver in time. 33# allow wlan_assistant wifi_data_file:file { read getattr open }; 34# allow wlan_assistant wifi_data_file:dir { read search getattr open }; 35allow wlan_assistant nvdata_file:dir { search read getattr open }; 36allow wlan_assistant nvdata_file:file { read getattr open }; 37allow wlan_assistant wmtWifi_device:chr_file { read write getattr open }; 38 39allow wlan_assistant mnt_vendor_file :dir search; 40allow wlan_assistant init:unix_stream_socket connectto; 41allow wlan_assistant property_socket:sock_file write; 42 43set_prop(wlan_assistant, mtk_nvram_ready_prop) 44