1type wifi_sniffer, domain; 2type wifi_sniffer_exec, exec_type, vendor_file_type, file_type; 3 4userdebug_or_eng(` 5 # make transition from init to its domain 6 init_daemon_domain(wifi_sniffer) 7 net_domain(wifi_sniffer) 8 9# configurate con mode 10 allow wifi_sniffer self:capability { net_admin net_raw }; 11 allow wifi_sniffer sysfs_wifi_conmode:file rw_file_perms; 12 13# interface up 14 allowxperm wifi_sniffer self:udp_socket ioctl SIOCSIFFLAGS; 15 allow wifi_sniffer self:netlink_generic_socket create_socket_perms_no_ioctl; 16 17 get_prop(wifi_sniffer, vendor_wifi_sniffer_prop) 18') 19