1# android recovery refresh log manager 2type recovery_refresh, domain; 3type recovery_refresh_exec, exec_type, file_type; 4 5init_daemon_domain(recovery_refresh) 6 7allow recovery_refresh pstorefs:dir search; 8allow recovery_refresh pstorefs:file r_file_perms; 9# NB: domain inherits write_logd which hands us write to pmsg_device 10 11### 12### Neverallow rules 13### 14### recovery_refresh should NEVER do any of this 15 16# Block device access. 17neverallow recovery_refresh dev_type:blk_file { read write }; 18 19# ptrace any other app 20neverallow recovery_refresh domain:process ptrace; 21 22# Write to /system. 23neverallow recovery_refresh system_file:dir_file_class_set write; 24 25# Write to files in /data/data or system files on /data 26neverallow recovery_refresh { app_data_file system_data_file }:dir_file_class_set write; 27 28# recovery_refresh is not allowed to write anywhere 29neverallow recovery_refresh { file_type -recovery_refresh_tmpfs userdebug_or_eng(`-coredump_file') }:file write; 30