1# boot_mdoe file access 2allow mobile_log_d sysfs_boot_mode:file { open read }; 3 4#proc/ access 5allow mobile_log_d proc_kmsg:file r_file_perms; 6allow mobile_log_d proc_cmdline:file r_file_perms; 7allow mobile_log_d proc_atf_log:dir search; 8allow mobile_log_d proc_atf_log:file r_file_perms; 9allow mobile_log_d proc_gz_log:file r_file_perms; 10allow mobile_log_d proc_last_kmsg:file r_file_perms; 11allow mobile_log_d proc_bootprof:file r_file_perms; 12allow mobile_log_d proc_pl_lk:file r_file_perms; 13 14#scp 15allow mobile_log_d sysfs_scp:file { open write }; 16allow mobile_log_d sysfs_scp:dir search; 17allow mobile_log_d scp_device:chr_file { read open }; 18 19#adsp 20allow mobile_log_d sysfs_adsp:file { open write }; 21allow mobile_log_d sysfs_adsp:dir search; 22allow mobile_log_d adsp_device:chr_file r_file_perms; 23 24#sspm 25allow mobile_log_d sysfs_sspm:file { open write }; 26allow mobile_log_d sysfs_sspm:dir search; 27allow mobile_log_d sspm_device:chr_file { read open }; 28 29#data/misc/mblog 30allow mobile_log_d logmisc_data_file:dir { relabelto create_dir_perms }; 31allow mobile_log_d logmisc_data_file:file create_file_perms; 32 33#data/log_temp 34allow mobile_log_d logtemp_data_file:dir { relabelto create_dir_perms }; 35allow mobile_log_d logtemp_data_file:file create_file_perms; 36 37#data/data_tmpfs_log 38allow mobile_log_d data_tmpfs_log_file:dir create_dir_perms; 39allow mobile_log_d data_tmpfs_log_file:file create_file_perms; 40 41# Date: 2016/11/11 42# purpose: allow MobileLog to access aee socket 43allow mobile_log_d crash_dump:unix_stream_socket connectto; 44 45# purpose: send log to com port 46allow mobile_log_d ttyGS_device:chr_file { read write ioctl open }; 47 48# purpose: allow mobile_log_d to access persist.meta.connecttype 49get_prop(mobile_log_d, vendor_mtk_meta_connecttype_prop) 50 51# purpose: allow mobile_log_d to create socket 52allow mobile_log_d port:tcp_socket { name_connect name_bind }; 53allow mobile_log_d mobile_log_d:tcp_socket { create connect setopt bind }; 54allow mobile_log_d mobile_log_d:tcp_socket { bind setopt listen accept read write }; 55allow mobile_log_d node:tcp_socket node_bind; 56 57# purpose: allow mobile_log_d to read system property init.svc.vendor. 58# GOOGLE: Commented out for b/169606103 59#get_prop(mobile_log_d, vendor_default_prop) 60