1# ============================================== 2# Policy File of /system/bin/em_svr Executable File 3 4 5# ============================================== 6# Type Declaration 7# ============================================== 8 9type em_svr_exec , exec_type, file_type; 10typeattribute em_svr coredomain; 11 12# ============================================== 13# Android Policy Rule 14# ============================================== 15 16# ============================================== 17# NSA Policy Rule 18# ============================================== 19 20# ============================================== 21# MTK Policy Rule 22# ============================================== 23 24init_daemon_domain(em_svr) 25 26# Date: WK1812 27# Purpose: add for MD log filter 28allow em_svr block_device:dir search; 29allow em_svr sdcardfs:dir { search write add_name }; 30allow em_svr sdcardfs:file { write create open }; 31 32allow em_svr media_rw_data_file:dir { read write search open add_name }; 33allow em_svr media_rw_data_file:file { write create open }; 34 35 36 37# Date: WK1812 38# Purpose: add for controlling screen on/off 39allow em_svr graphics_device:dir search; 40allow em_svr graphics_device:chr_file { open read write ioctl }; 41allow em_svr surfaceflinger_service:service_manager find; 42binder_use(em_svr) 43binder_call(em_svr, surfaceflinger) 44 45# Date: WK1812 46# Purpose: add for controlling backlight 47allow em_svr sysfs_leds:dir search; 48 49# Date: WK1812 50# Purpose: add for sensor calibration 51allow em_svr self:capability { chown fsetid }; 52 53# Date: WK1812 54# Purpose: add for shell cmd 55allow em_svr shell_exec:file { getattr execute read open execute_no_trans }; 56 57# Date: WK1812 58# Purpose: add for power battery charge/PMU 59allow em_svr toolbox_exec:file { getattr execute read open execute_no_trans }; 60 61# Date: WK1812 62# Purpose: sys file access 63allow em_svr sysfs:dir { open read }; 64