blob: b6ae4599c663dd6bb13017ea6e1c8b25f1975d87 [file] [log] [blame]
Alex Klyubin168435f2017-02-16 20:14:56 -08001# HwBinder IPC from clients into server, and callbacks
2binder_call(hal_bluetooth_client, hal_bluetooth_server)
3binder_call(hal_bluetooth_server, hal_bluetooth_client)
Andre Eisenbachbe27f922016-10-12 14:49:56 -07004
Steven Moreland8fc79812018-05-30 16:43:17 -07005hal_attribute_hwservice_client(hal_bluetooth, hal_bluetooth_hwservice)
Alex Klyubin53656c12017-04-13 19:05:27 -07006
Andre Eisenbachbe27f922016-10-12 14:49:56 -07007wakelock_use(hal_bluetooth);
8
Myles Watson20b8d6b2017-02-22 11:50:20 -08009# The HAL toggles rfkill to power the chip off/on.
Benjamin Gordon9b2e0cb2017-11-09 15:51:26 -070010allow hal_bluetooth self:global_capability_class_set net_admin;
Myles Watson20b8d6b2017-02-22 11:50:20 -080011
Andre Eisenbachbe27f922016-10-12 14:49:56 -070012# bluetooth factory file accesses.
13r_dir_file(hal_bluetooth, bluetooth_efs_file)
14
15allow hal_bluetooth { uhid_device hci_attach_dev }:chr_file rw_file_perms;
16
Andre Eisenbachbe27f922016-10-12 14:49:56 -070017# sysfs access.
18r_dir_file(hal_bluetooth, sysfs_type)
19allow hal_bluetooth sysfs_bluetooth_writable:file rw_file_perms;
Benjamin Gordon9b2e0cb2017-11-09 15:51:26 -070020allow hal_bluetooth self:global_capability2_class_set wake_alarm;
Andre Eisenbachbe27f922016-10-12 14:49:56 -070021
22# Allow write access to bluetooth-specific properties
Jaekyun Seok224921d2018-04-09 12:07:32 +090023set_prop(hal_bluetooth, bluetooth_a2dp_offload_prop)
Andre Eisenbachbe27f922016-10-12 14:49:56 -070024set_prop(hal_bluetooth, bluetooth_prop)
Jaekyun Seok224921d2018-04-09 12:07:32 +090025set_prop(hal_bluetooth, exported_bluetooth_prop)
Andre Eisenbach6e3a5d02017-02-07 20:30:40 -080026
27# /proc access (bluesleep etc.).
28allow hal_bluetooth proc_bluetooth_writable:file rw_file_perms;
Martijn Coenen0d1f7d22017-05-09 09:53:46 -070029
30# allow to run with real-time scheduling policy
Benjamin Gordon9b2e0cb2017-11-09 15:51:26 -070031allow hal_bluetooth self:global_capability_class_set sys_nice;