1*e4a36f41SAndroid Build Coastguard Worker# mmd memory management daemon 2*e4a36f41SAndroid Build Coastguard Workertype mmd, domain; 3*e4a36f41SAndroid Build Coastguard Workertypeattribute mmd coredomain; 4*e4a36f41SAndroid Build Coastguard Workertype mmd_exec, system_file_type, exec_type, file_type; 5*e4a36f41SAndroid Build Coastguard Worker 6*e4a36f41SAndroid Build Coastguard Workerinit_daemon_domain(mmd) 7*e4a36f41SAndroid Build Coastguard Worker 8*e4a36f41SAndroid Build Coastguard Worker# Set mmd.enabled_aconfig properties. 9*e4a36f41SAndroid Build Coastguard Workerset_prop(mmd, mmd_prop) 10*e4a36f41SAndroid Build Coastguard Workerget_prop(mmd, device_config_mmd_native_prop) 11*e4a36f41SAndroid Build Coastguard Worker 12*e4a36f41SAndroid Build Coastguard Worker# mmd binder setup 13*e4a36f41SAndroid Build Coastguard Workeradd_service(mmd, mmd_service) 14*e4a36f41SAndroid Build Coastguard Workerbinder_use(mmd) 15*e4a36f41SAndroid Build Coastguard Worker 16*e4a36f41SAndroid Build Coastguard Worker# Read /proc/swaps 17*e4a36f41SAndroid Build Coastguard Workerallow mmd proc_swaps:file r_file_perms; 18*e4a36f41SAndroid Build Coastguard Worker 19*e4a36f41SAndroid Build Coastguard Worker# zram sysfs access 20*e4a36f41SAndroid Build Coastguard Workerallow mmd sysfs_zram:dir search; 21*e4a36f41SAndroid Build Coastguard Workerallow mmd sysfs_zram:file rw_file_perms; 22*e4a36f41SAndroid Build Coastguard Worker 23*e4a36f41SAndroid Build Coastguard Worker# procfs 24*e4a36f41SAndroid Build Coastguard Workerallow mmd proc_meminfo:file r_file_perms; 25*e4a36f41SAndroid Build Coastguard Worker 26*e4a36f41SAndroid Build Coastguard Worker# mkswap /dev/block/zram command 27*e4a36f41SAndroid Build Coastguard Workerallow mmd block_device:dir search; 28*e4a36f41SAndroid Build Coastguard Workerallow mmd swap_block_device:blk_file rw_file_perms; 29*e4a36f41SAndroid Build Coastguard Worker 30*e4a36f41SAndroid Build Coastguard Worker# swapon syscall 31*e4a36f41SAndroid Build Coastguard Workerallow mmd self:capability sys_admin; 32