1# mmd memory management daemon 2type mmd, domain; 3typeattribute mmd coredomain; 4type mmd_exec, system_file_type, exec_type, file_type; 5 6init_daemon_domain(mmd) 7 8# Set mmd.enabled_aconfig and zram backing device size. 9set_prop(mmd, mmd_shared_status_prop) 10set_prop(mmd, mmd_status_prop) 11get_prop(mmd, mmd_prop) 12get_prop(mmd, device_config_mmd_native_prop) 13 14# mmd binder setup 15add_service(mmd, mmd_service) 16binder_use(mmd) 17 18# Read /proc/swaps 19allow mmd proc_swaps:file r_file_perms; 20 21# zram sysfs access 22allow mmd sysfs_zram:dir search; 23allow mmd sysfs_zram:file rw_file_perms; 24 25# procfs 26allow mmd proc_meminfo:file r_file_perms; 27 28# mkswap /dev/block/zram command 29allow mmd block_device:dir search; 30allow mmd swap_block_device:blk_file rw_file_perms; 31 32# swapon syscall 33allow mmd self:capability sys_admin; 34 35# Allow mmd to write to statsd socket. 36unix_socket_send(mmd, statsdw, statsd) 37# Allow mmd to interact with statsd binder calls for pulled atoms. 38allow mmd stats_service:service_manager find; 39allow mmd statsmanager_service:service_manager find; 40binder_call(mmd, statsd) 41