type htc_ramdump_exec, exec_type, vendor_file_type, file_type;

userdebug_or_eng(`
type htc_ramdump, domain;
init_daemon_domain(htc_ramdump)

allow htc_ramdump kmsg_device:chr_file { append open };
allow htc_ramdump userdata_block_device:blk_file { read write open };
allow htc_ramdump self:capability { fowner fsetid sys_rawio };

set_prop(htc_ramdump, debug_prop)

allow htc_ramdump rootfs:file { r_file_perms };
allow htc_ramdump misc_block_device:blk_file { rw_file_perms };
allow htc_ramdump ramdump_vendor_data_file:file { create_file_perms };
allow htc_ramdump ramdump_vendor_data_file:dir { create_dir_perms };
allow htc_ramdump block_device:dir { search };
allow htc_ramdump ramdump_block_device:blk_file { open read };
')