blob: 69f12fc55519821ee95d579ab76f41bc5d4e2c88 [file] [log] [blame]
Hung Nguyen9c7d3062024-11-05 15:50:00 -08001# 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
Shintaro Kawamura9444dab2024-11-22 14:05:05 +09008# Set mmd.enabled_aconfig properties.
9set_prop(mmd, mmd_prop)
Shintaro Kawamura81c4bae2024-11-22 17:37:03 +090010get_prop(mmd, device_config_mmd_native_prop)
Shintaro Kawamura9444dab2024-11-22 14:05:05 +090011
Hung Nguyen9c7d3062024-11-05 15:50:00 -080012# mmd binder setup
13add_service(mmd, mmd_service)
14binder_use(mmd)
Shintaro Kawamura2712c902024-11-21 11:59:17 +090015
Hung Nguyen0e30a882024-12-02 23:32:48 +000016# Read /proc/swaps
17allow mmd proc_swaps:file r_file_perms;
18
Shintaro Kawamura2712c902024-11-21 11:59:17 +090019# zram sysfs access
20allow mmd sysfs_zram:dir search;
21allow mmd sysfs_zram:file rw_file_perms;
22
23# procfs
24allow mmd proc_meminfo:file r_file_perms;
Hung Nguyen0e30a882024-12-02 23:32:48 +000025
26# mkswap /dev/block/zram command
27allow mmd block_device:dir search;
28allow mmd swap_block_device:blk_file rw_file_perms;
29
30# swapon syscall
31allow mmd self:capability sys_admin;
Shintaro Kawamura6ebb5372025-01-29 15:01:41 +090032
33# Allow mmd to write to statsd socket.
34unix_socket_send(mmd, statsdw, statsd)