2018-07-04 16:33:12 +00:00
|
|
|
type bluetooth_loader, domain;
|
|
|
|
type bluetooth_loader_exec, exec_type, vendor_file_type, file_type;
|
|
|
|
|
|
|
|
# Started by init
|
|
|
|
init_daemon_domain(bluetooth_loader)
|
|
|
|
|
|
|
|
# Get persist.service.bdroid.*, bluetooth.* and wcnss property values
|
|
|
|
get_prop(bluetooth_loader, bluetooth_prop)
|
|
|
|
get_prop(bluetooth_loader, wcnss_prop)
|
|
|
|
|
|
|
|
# Access the serial device
|
|
|
|
allow bluetooth_loader serial_device:chr_file rw_file_perms;
|
|
|
|
|
|
|
|
# And the smd device
|
|
|
|
allow bluetooth_loader smd_device:chr_file rw_file_perms;
|
|
|
|
|
2017-10-08 12:56:20 +00:00
|
|
|
allow bluetooth_loader persist_bluetooth_file:dir search;
|
|
|
|
allow bluetooth_loader persist_bluetooth_file:file rw_file_perms;
|
2018-07-04 16:33:12 +00:00
|
|
|
|
|
|
|
# And qmuxd
|
|
|
|
allow bluetooth_loader qmuxd_socket:dir create_dir_perms;
|
|
|
|
allow bluetooth_loader qmuxd_socket:sock_file create_file_perms;
|
|
|
|
allow bluetooth_loader qmuxd:unix_stream_socket connectto;
|
|
|
|
|
|
|
|
r_dir_file(bluetooth_loader, persist_file)
|
|
|
|
|
|
|
|
userdebug_or_eng(`
|
|
|
|
diag_use(bluetooth_loader)
|
|
|
|
')
|