diff --git a/bluetooth/file_contexts b/bluetooth/file_contexts index da02008..66d690f 100644 --- a/bluetooth/file_contexts +++ b/bluetooth/file_contexts @@ -1,5 +1,4 @@ # Bluetooth -/vendor/bin/hw/android\.hardware\.bluetooth@1\.0-service-qti u:object_r:hal_bluetooth_default_exec:s0 +/vendor/bin/hw/android\.hardware\.bluetooth@1\.1-service\.synabtlinux u:object_r:hal_bluetooth_synabtlinux_exec:s0 -/dev/btpower u:object_r:bt_device:s0 /dev/ttySAC18 u:object_r:hci_attach_dev:s0 diff --git a/bluetooth/genfs_contexts b/bluetooth/genfs_contexts index 2b2d437..d18d164 100644 --- a/bluetooth/genfs_contexts +++ b/bluetooth/genfs_contexts @@ -1 +1,3 @@ -genfscon sysfs /devices/platform/odm/odm:btqcom/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0 +genfscon sysfs /devices/platform/odm/odm:btbcm/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0 +genfscon proc /bluetooth/sleep/btwrite u:object_r:proc_bluetooth_writable:s0 +genfscon proc /bluetooth/sleep/lpm u:object_r:proc_bluetooth_writable:s0 diff --git a/bluetooth/hal_bluetooth_default.te b/bluetooth/hal_bluetooth_default.te index dcd2b7f..b8091d9 100644 --- a/bluetooth/hal_bluetooth_default.te +++ b/bluetooth/hal_bluetooth_default.te @@ -1,9 +1,21 @@ -allow hal_bluetooth_default bt_device:chr_file rw_file_perms; +type hal_bluetooth_synabtlinux, domain; +type hal_bluetooth_synabtlinux_exec, exec_type, file_type, vendor_file_type; -add_hwservice(hal_bluetooth_default, hal_bluetooth_coexistence_hwservice) +hal_server_domain(hal_bluetooth_synabtlinux, hal_bluetooth) +init_daemon_domain(hal_bluetooth_synabtlinux) -userdebug_or_eng(` - allow hal_bluetooth_default sscoredump_vendor_data_crashinfo_file:dir rw_dir_perms; - allow hal_bluetooth_default sscoredump_vendor_data_crashinfo_file:file { create_file_perms }; - set_prop(hal_bluetooth_default, vendor_ssrdump_prop) -') +allow hal_bluetooth_synabtlinux self:socket { create bind read write }; +allow hal_bluetooth_synabtlinux self:bluetooth_socket { create bind read write }; +allow hal_bluetooth_synabtlinux hci_attach_dev:chr_file rw_file_perms; +allow hal_bluetooth_synabtlinux hal_power_stats_vendor_service:service_manager find; +add_hwservice(hal_bluetooth_synabtlinux, hal_bluetooth_coexistence_hwservice) +vndbinder_use(hal_bluetooth_synabtlinux) + +allow hal_bluetooth_synabtlinux sscoredump_vendor_data_crashinfo_file:dir create_dir_perms; +allow hal_bluetooth_synabtlinux sscoredump_vendor_data_crashinfo_file:file create_file_perms; + + userdebug_or_eng(` + allow hal_bluetooth_synabtlinux logbuffer_device:chr_file r_file_perms; + allow hal_bluetooth_synabtlinux sscoredump_vendor_data_coredump_file:dir create_dir_perms; + allow hal_bluetooth_synabtlinux sscoredump_vendor_data_coredump_file:file create_file_perms; + ')