Ver código fonte

Bluetooth: Allow QTI HAL service to access its logbuffer

Bug: 229691092
Test: Pass file permission check
Change-Id: Ic97bf3b23c452d20e5e32f3bafe2f6b2c5d2be3b
Cheney Ni 2 anos atrás
pai
commit
49a3cfae3a
2 arquivos alterados com 7 adições e 1 exclusões
  1. 6 1
      bluetooth/file_contexts
  2. 1 0
      bluetooth/hal_bluetooth_default.te

+ 6 - 1
bluetooth/file_contexts

@@ -1,5 +1,10 @@
-# Bluetooth
+# Bluetooth HAL service
 /vendor/bin/hw/android\.hardware\.bluetooth@1\.0-service-qti  u:object_r:hal_bluetooth_default_exec:s0
 
+# Bluetooth Vendor nodes
 /dev/btpower                                    u:object_r:bt_device:s0
 /dev/ttySAC18                                   u:object_r:hci_attach_dev:s0
+
+# Bluetooth Debuggable HAL nodes
+/dev/logbuffer_btpower                          u:object_r:logbuffer_device:s0
+/dev/logbuffer_tty18                            u:object_r:logbuffer_device:s0

+ 1 - 0
bluetooth/hal_bluetooth_default.te

@@ -3,6 +3,7 @@ allow hal_bluetooth_default bt_device:chr_file rw_file_perms;
 add_hwservice(hal_bluetooth_default, hal_bluetooth_coexistence_hwservice)
 
 userdebug_or_eng(`
+  allow hal_bluetooth_default logbuffer_device:chr_file r_file_perms;
   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)