diff options
author | Davide Garberi <dade.garberi@gmail.com> | 2019-05-15 17:27:36 +0200 |
---|---|---|
committer | Davide Garberi <dade.garberi@gmail.com> | 2019-05-15 21:03:03 +0200 |
commit | 8ab725708be1487d08637a854f524c31652d66ff (patch) | |
tree | be9ea70c7cc7aec430d5ebd17fe7d30d2ba435ba /sepolicy | |
parent | c271bea7e44ee98a72d0322193e420e337e47a66 (diff) |
msm8996-common: Correct BT mac address with non zui blobs
Change-Id: Ibc6eed2018314e79f3f18749cedd9852c82a8a66
Diffstat (limited to 'sepolicy')
-rw-r--r-- | sepolicy/file_contexts | 1 | ||||
-rw-r--r-- | sepolicy/hal_bluetooth_qti.te | 2 | ||||
-rw-r--r-- | sepolicy/property.te | 1 | ||||
-rw-r--r-- | sepolicy/property_contexts | 3 | ||||
-rw-r--r-- | sepolicy/qti_init_shell.te | 5 | ||||
-rw-r--r-- | sepolicy/system_app.te | 1 |
6 files changed, 13 insertions, 0 deletions
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index d0d9c61..d8e2011 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -1,4 +1,5 @@ # Binaries +/(vendor|system/vendor)/bin/init.bt.sh u:object_r:qti_init_shell_exec:s0 /(vendor|system/vendor)/bin/init.wlan.sh u:object_r:qti_init_shell_exec:s0 /(vendor|system/vendor)/bin/wcg_mac_tool u:object_r:wcg_mac_exec:s0 diff --git a/sepolicy/hal_bluetooth_qti.te b/sepolicy/hal_bluetooth_qti.te index 429585f..ebed0fb 100644 --- a/sepolicy/hal_bluetooth_qti.te +++ b/sepolicy/hal_bluetooth_qti.te @@ -1 +1,3 @@ allow hal_bluetooth_qti sysfs_bluetooth_writable:file rw_file_perms; + +get_prop(hal_bluetooth_qti, bt_mac_prop) diff --git a/sepolicy/property.te b/sepolicy/property.te index 87aea86..e77394a 100644 --- a/sepolicy/property.te +++ b/sepolicy/property.te @@ -1,2 +1,3 @@ type wcg_prop, property_type; type oem_unlock_prop, property_type; +type bt_mac_prop, property_type; diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts index 4691248..ed4d762 100644 --- a/sepolicy/property_contexts +++ b/sepolicy/property_contexts @@ -1,3 +1,6 @@ +# Bluetooth +ro.vendor.bt.bdaddr_path u:object_r:bt_mac_prop:s0 + # Camera persist.camera. u:object_r:camera_prop:s0 diff --git a/sepolicy/qti_init_shell.te b/sepolicy/qti_init_shell.te index c5b8387..1331cc4 100644 --- a/sepolicy/qti_init_shell.te +++ b/sepolicy/qti_init_shell.te @@ -5,8 +5,13 @@ allow qti_init_shell file_contexts_file:file { getattr open read }; allow qti_init_shell mnt_vendor_file:dir rw_dir_perms; allow qti_init_shell mnt_vendor_file:file create_file_perms; +# Allow qti_init_shell to write and read /data/vendor/bluetooth/bdaddr +allow qti_init_shell vendor_bt_data_file:dir { add_name create search write }; +allow qti_init_shell vendor_bt_data_file:file { create getattr open read write }; + # Allow qti_init_shell to read cmdline allow qti_init_shell proc_cmdline:file { getattr open read }; get_prop(qti_init_shell, wcg_prop) set_prop(qti_init_shell, oem_unlock_prop) +set_prop(qti_init_shell, bt_mac_prop) diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te index 1158907..0fbc30e 100644 --- a/sepolicy/system_app.te +++ b/sepolicy/system_app.te @@ -4,3 +4,4 @@ allow system_app shell_prop:property_service set; binder_call(system_app, wificond); get_prop(system_app, oem_unlock_prop); +get_prop(system_app, bt_mac_prop); |