type oem_qmi_server, domain, domain_deprecated, mlstrustedsubject;
type oem_qmi_server_exec, exec_type, file_type;

init_daemon_domain(oem_qmi_server)


# b/22871314
allow oem_qmi_server shared_log_device:chr_file rw_file_perms;

allow oem_qmi_server sysfs_msm_subsys:dir r_dir_perms;
allow oem_qmi_server sysfs_msm_subsys:lnk_file rw_file_perms;

allow oem_qmi_server self:socket create_socket_perms;

# Access device /dev/diag
userdebug_or_eng(`
    allow oem_qmi_server diag_device:chr_file rw_file_perms;
')

qmux_socket(oem_qmi_server)