muskie: enable BT

Change-Id: I633a7b050941a34e1dc131cdd9f18f6444b2644e
Signed-off-by: Thierry Strudel <tstrudel@google.com>
This commit is contained in:
Thierry Strudel
2016-11-07 15:28:24 -08:00
parent c447f0b684
commit 83a4667ec5
8 changed files with 47 additions and 1 deletions

View File

@@ -207,6 +207,13 @@ on boot
# Increased technology maximums should be reflected here.
write /proc/sys/net/core/rmem_max 8388608
# Bluetooth
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
service init-radio-sh /system/bin/init.radio.sh
class late_start
user radio
@@ -378,3 +385,15 @@ service port-bridge /vendor/bin/port-bridge
user radio
group radio system inet
oneshot
on property:wc_transport.start_hci=true
start hci_filter
on property:wc_transport.start_hci=false
stop hci_filter
service hci_filter /vendor/bin/wcnss_filter
class late_start
user bluetooth
group bluetooth diag
disabled

6
sepolicy/bluetooth.te Normal file
View File

@@ -0,0 +1,6 @@
allow bluetooth wcnss_filter:unix_stream_socket connectto;
set_prop(bluetooth, wc_prop)
# Allow access to net_admin ioctls
allowxperm bluetooth self:udp_socket ioctl priv_sock_ioctls;

View File

@@ -60,6 +60,7 @@
/system/vendor/bin/cnss_diag u:object_r:wcnss_service_exec:s0
/system/vendor/bin/netmgrd u:object_r:netmgrd_exec:s0
/system/vendor/bin/port-bridge u:object_r:port-bridge_exec:s0
/system/vendor/bin/wcnss_filter u:object_r:wcnss_filter_exec:s0
# data files
/data/time(/.*)? u:object_r:time_data_file:s0

1
sepolicy/property.te Normal file
View File

@@ -0,0 +1 @@
type wc_prop, property_type;

View File

@@ -0,0 +1 @@
wc_transport. u:object_r:wc_prop:s0

6
sepolicy/wcnss_filter.te Normal file
View File

@@ -0,0 +1,6 @@
type wcnss_filter, domain;
type wcnss_filter_exec, exec_type, file_type;
init_daemon_domain(wcnss_filter)
set_prop(wcnss_filter, wc_prop)

View File

@@ -82,3 +82,12 @@ persist.data.df.dev_name=rmnet_usb0
persist.data.netmgrd.qos.enable=true
persist.data.mode=concurrent
#system prop for Bluetooth SOC type
qcom.bluetooth.soc=cherokee
#system prop for A4WP profile support
ro.bluetooth.a4wp=false
#system prop for wipower support
ro.bluetooth.emb_wp_mode=true
ro.bluetooth.wipower=true

View File

@@ -81,8 +81,11 @@
/dev/subsys_* 0640 system system
# Ramdump devices
/dev/ramdump_* 0640 system system
/dev/ramdump_* 0640 system system
#ImproveTouch device
/dev/hbtp_input 0660 system system
/dev/hbtp_vm 0660 system system
# BT
/dev/ttyHS0 0660 bluetooth net_bt