Alex Klyubin | 168435f | 2017-02-16 20:14:56 -0800 | [diff] [blame^] | 1 | # HwBinder IPC from clients into server, and callbacks |
| 2 | binder_call(hal_bluetooth_client, hal_bluetooth_server) |
| 3 | binder_call(hal_bluetooth_server, hal_bluetooth_client) |
Andre Eisenbach | be27f92 | 2016-10-12 14:49:56 -0700 | [diff] [blame] | 4 | |
| 5 | wakelock_use(hal_bluetooth); |
| 6 | |
| 7 | # bluetooth factory file accesses. |
| 8 | r_dir_file(hal_bluetooth, bluetooth_efs_file) |
| 9 | |
| 10 | allow hal_bluetooth { uhid_device hci_attach_dev }:chr_file rw_file_perms; |
| 11 | |
| 12 | # Access to config files to look for a Bluetooth address |
| 13 | r_dir_file(hal_bluetooth, bluetooth_data_file) |
| 14 | |
| 15 | # sysfs access. |
| 16 | r_dir_file(hal_bluetooth, sysfs_type) |
| 17 | allow hal_bluetooth sysfs_bluetooth_writable:file rw_file_perms; |
| 18 | allow hal_bluetooth self:capability2 wake_alarm; |
| 19 | |
| 20 | # Allow write access to bluetooth-specific properties |
| 21 | set_prop(hal_bluetooth, bluetooth_prop) |
Andre Eisenbach | 6e3a5d0 | 2017-02-07 20:30:40 -0800 | [diff] [blame] | 22 | |
| 23 | # /proc access (bluesleep etc.). |
| 24 | allow hal_bluetooth proc_bluetooth_writable:file rw_file_perms; |