Lei Ju | 35e5021 | 2023-12-26 17:25:29 -0800 | [diff] [blame] | 1 | # |
| 2 | # Context hub multiclient HAL common selinux policies |
| 3 | # |
Lei Ju | f7f93da | 2023-12-15 14:48:25 -0800 | [diff] [blame] | 4 | |
| 5 | # Permit communication with AoC |
| 6 | allow hal_contexthub_default aoc_device:chr_file rw_file_perms; |
| 7 | |
| 8 | # Allow context hub HAL to determine AoC's current clock |
| 9 | allow hal_contexthub_default sysfs_aoc:dir search; |
| 10 | allow hal_contexthub_default sysfs_aoc_boottime:file r_file_perms; |
| 11 | |
| 12 | # Allow context hub HAL to create thread to watch AOC's device |
Lei Ju | 403baea | 2023-12-20 16:36:18 -0800 | [diff] [blame] | 13 | allow hal_contexthub_default device:dir r_dir_perms; |
Lei Ju | f7f93da | 2023-12-15 14:48:25 -0800 | [diff] [blame] | 14 | |
| 15 | # Allow context hub HAL to use the USF low latency transport |
| 16 | usf_low_latency_transport(hal_contexthub_default) |
| 17 | |
| 18 | # Allow context hub HAL to talk to the WiFi HAL |
| 19 | binder_call(hal_contexthub_default, hal_wifi_ext) |
| 20 | allow hal_contexthub_default hal_wifi_ext_service:service_manager find; |
| 21 | |
| 22 | # Allow context hub HAL to talk to stats service |
| 23 | binder_call(hal_contexthub_default, stats_service_server) |
| 24 | allow hal_contexthub_default fwk_stats_service:service_manager find; |
| 25 | |
Lei Ju | 403baea | 2023-12-20 16:36:18 -0800 | [diff] [blame] | 26 | # Allow context hub HAL to write data to /data/vendor/chre/ directory |
| 27 | allow hal_contexthub_default chre_data_file:dir create_dir_perms; |
| 28 | allow hal_contexthub_default chre_data_file:file create_file_perms; |
| 29 | |
Lei Ju | f7f93da | 2023-12-15 14:48:25 -0800 | [diff] [blame] | 30 | # Allow context hub HAL to use WakeLock |
| 31 | wakelock_use(hal_contexthub_default) |
| 32 | |
| 33 | # Allow context hub HAL to block suspend, which is required to use EPOLLWAKEUP |
| 34 | allow hal_contexthub_default self:global_capability2_class_set block_suspend; |
Lei Ju | 7e89a67 | 2024-01-23 11:18:55 -0800 | [diff] [blame] | 35 | |
| 36 | # Allow binder calls with clients |
| 37 | binder_call(hal_contexthub_default, hal_sensors_default) |