336d0fed4e
I took current AOSP policy as base, then removed sepolicy so that the set of type and attributes was a subset of types and attributes in Q sepolicy, with exception of those that have not yet been cleand up in current AOSP: mediaswcodec_server netd_socket mediaextractor_update_service thermalserviced thermalserviced_exec Bug: 133196056 Test: n/a Change-Id: I863429d61d3fad0272c1d3f1e429cd997513a74a Merged-In: I3e091652fa8d1757b1f71f7559186d5b32f000d5
32 lines
1.2 KiB
Text
32 lines
1.2 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)
|
|
|
|
hal_attribute_hwservice(hal_bluetooth, hal_bluetooth_hwservice)
|
|
|
|
wakelock_use(hal_bluetooth);
|
|
|
|
# The HAL toggles rfkill to power the chip off/on.
|
|
allow hal_bluetooth self:global_capability_class_set 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:global_capability2_class_set wake_alarm;
|
|
|
|
# Allow write access to bluetooth-specific properties
|
|
set_prop(hal_bluetooth, bluetooth_a2dp_offload_prop)
|
|
set_prop(hal_bluetooth, bluetooth_audio_hal_prop)
|
|
set_prop(hal_bluetooth, bluetooth_prop)
|
|
set_prop(hal_bluetooth, exported_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:global_capability_class_set sys_nice;
|