Hung Nguyen | 9c7d306 | 2024-11-05 15:50:00 -0800 | [diff] [blame] | 1 | # mmd memory management daemon |
| 2 | type mmd, domain; |
| 3 | typeattribute mmd coredomain; |
| 4 | type mmd_exec, system_file_type, exec_type, file_type; |
| 5 | |
| 6 | init_daemon_domain(mmd) |
| 7 | |
Shintaro Kawamura | 9444dab | 2024-11-22 14:05:05 +0900 | [diff] [blame] | 8 | # Set mmd.enabled_aconfig properties. |
| 9 | set_prop(mmd, mmd_prop) |
Shintaro Kawamura | 81c4bae | 2024-11-22 17:37:03 +0900 | [diff] [blame] | 10 | get_prop(mmd, device_config_mmd_native_prop) |
Shintaro Kawamura | 9444dab | 2024-11-22 14:05:05 +0900 | [diff] [blame] | 11 | |
Hung Nguyen | 9c7d306 | 2024-11-05 15:50:00 -0800 | [diff] [blame] | 12 | # mmd binder setup |
| 13 | add_service(mmd, mmd_service) |
| 14 | binder_use(mmd) |
Shintaro Kawamura | 2712c90 | 2024-11-21 11:59:17 +0900 | [diff] [blame] | 15 | |
Hung Nguyen | 0e30a88 | 2024-12-02 23:32:48 +0000 | [diff] [blame] | 16 | # Read /proc/swaps |
| 17 | allow mmd proc_swaps:file r_file_perms; |
| 18 | |
Shintaro Kawamura | 2712c90 | 2024-11-21 11:59:17 +0900 | [diff] [blame] | 19 | # zram sysfs access |
| 20 | allow mmd sysfs_zram:dir search; |
| 21 | allow mmd sysfs_zram:file rw_file_perms; |
| 22 | |
| 23 | # procfs |
| 24 | allow mmd proc_meminfo:file r_file_perms; |
Hung Nguyen | 0e30a88 | 2024-12-02 23:32:48 +0000 | [diff] [blame] | 25 | |
| 26 | # mkswap /dev/block/zram command |
| 27 | allow mmd block_device:dir search; |
| 28 | allow mmd swap_block_device:blk_file rw_file_perms; |
| 29 | |
| 30 | # swapon syscall |
| 31 | allow mmd self:capability sys_admin; |