1type cbd, domain; 2type cbd_exec, vendor_file_type, exec_type, file_type; 3init_daemon_domain(cbd) 4 5set_prop(cbd, vendor_modem_prop) 6set_prop(cbd, vendor_cbd_prop) 7set_prop(cbd, vendor_rild_prop) 8get_prop(cbd, telephony_modem_prop) 9 10allow cbd mnt_vendor_file:dir r_dir_perms; 11 12allow cbd kmsg_device:chr_file rw_file_perms; 13 14allow cbd vendor_shell_exec:file execute_no_trans; 15allow cbd vendor_toolbox_exec:file execute_no_trans; 16 17# Allow cbd to access modem block device 18allow cbd block_device:dir search; 19allow cbd modem_block_device:blk_file r_file_perms; 20 21# Allow cbd to access sysfs chosen files 22allow cbd sysfs_chosen:file r_file_perms; 23allow cbd sysfs_chosen:dir r_dir_perms; 24 25allow cbd radio_device:chr_file rw_file_perms; 26 27allow cbd proc_cmdline:file r_file_perms; 28 29allow cbd persist_modem_file:dir create_dir_perms; 30allow cbd persist_modem_file:file create_file_perms; 31allow cbd persist_file:dir search; 32 33allow cbd radio_vendor_data_file:dir create_dir_perms; 34allow cbd radio_vendor_data_file:file create_file_perms; 35 36# Allow cbd to operate with modem EFS file/dir 37allow cbd modem_efs_file:dir create_dir_perms; 38allow cbd modem_efs_file:file create_file_perms; 39 40# Allow cbd to operate with modem userdata file/dir 41allow cbd modem_userdata_file:dir create_dir_perms; 42allow cbd modem_userdata_file:file create_file_perms; 43 44# Allow cbd to access modem image file/dir 45allow cbd modem_img_file:dir r_dir_perms; 46allow cbd modem_img_file:file r_file_perms; 47allow cbd modem_img_file:lnk_file r_file_perms; 48 49# Allow cbd to collect crash info 50allow cbd sscoredump_vendor_data_crashinfo_file:dir create_dir_perms; 51allow cbd sscoredump_vendor_data_crashinfo_file:file create_file_perms; 52 53userdebug_or_eng(` 54 r_dir_file(cbd, vendor_slog_file) 55 56 allow cbd kernel:system syslog_read; 57 58 allow cbd sscoredump_vendor_data_coredump_file:dir create_dir_perms; 59 allow cbd sscoredump_vendor_data_coredump_file:file create_file_perms; 60') 61 62