0d1f7d29f7
New binder kernel changes extend the areas where binder will set real-time scheduling priorities on threads; to make sure the driver can correctly determine whether a process is allowed to run at real-time priority or not, add the capability to the services that need it. Bug: 37293077 Test: processes run at real-time prio on incoming real-time binder calls. Change-Id: Ia4b3e5ecb1f5e18e7272bdaaad5c31a856719633
30 lines
1 KiB
Text
30 lines
1 KiB
Text
# HwBinder IPC from clients into server, and callbacks
|
|
binder_call(hal_bluetooth_client, hal_bluetooth_server)
|
|
binder_call(hal_bluetooth_server, hal_bluetooth_client)
|
|
|
|
add_hwservice(hal_bluetooth_server, hal_bluetooth_hwservice)
|
|
allow hal_bluetooth_client hal_bluetooth_hwservice:hwservice_manager find;
|
|
|
|
wakelock_use(hal_bluetooth);
|
|
|
|
# The HAL toggles rfkill to power the chip off/on.
|
|
allow hal_bluetooth self:capability net_admin;
|
|
|
|
# bluetooth factory file accesses.
|
|
r_dir_file(hal_bluetooth, bluetooth_efs_file)
|
|
|
|
allow hal_bluetooth { uhid_device hci_attach_dev }:chr_file rw_file_perms;
|
|
|
|
# sysfs access.
|
|
r_dir_file(hal_bluetooth, sysfs_type)
|
|
allow hal_bluetooth sysfs_bluetooth_writable:file rw_file_perms;
|
|
allow hal_bluetooth self:capability2 wake_alarm;
|
|
|
|
# Allow write access to bluetooth-specific properties
|
|
set_prop(hal_bluetooth, bluetooth_prop)
|
|
|
|
# /proc access (bluesleep etc.).
|
|
allow hal_bluetooth proc_bluetooth_writable:file rw_file_perms;
|
|
|
|
# allow to run with real-time scheduling policy
|
|
allow hal_bluetooth self:capability sys_nice;
|