Merge changes from topic "switch_to_aidl" into udc-d1-dev

* changes:
  Switch to AIDL and add sepolicy for bluetooth extension
  Switch to AIDL vendor service
This commit is contained in:
Ted Wang 2023-05-05 06:19:10 +00:00 committed by Android (Google) Code Review
commit 22ce2ab92d
7 changed files with 34 additions and 72 deletions

View file

@ -1,6 +1,8 @@
PRODUCT_SOONG_NAMESPACES += vendor/broadcom/bluetooth
PRODUCT_PACKAGES += \
android.hardware.bluetooth@1.1-service.bcmbtlinux \
android.hardware.bluetooth-V1-ndk.so \
android.hardware.bluetooth-service.bcmbtlinux \
vendor.google.bluetooth_ext-V1-ndk.so \
bt_vendor.conf \
android.hardware.bluetooth.prebuilt.xml \
android.hardware.bluetooth_le.prebuilt.xml

View file

@ -1,39 +1,28 @@
<compatibility-matrix version="1.0" type="framework" level="7">
<hal format="hidl">
<name>hardware.google.bluetooth.ccc</name>
<version>1.1</version>
<hal format="aidl" optional="true">
<name>vendor.google.bluetooth_ext</name>
<version>1</version>
<interface>
<name>IBluetoothFinder</name>
<instance>default</instance>
</interface>
<fqname>IBluetoothFinder/default</fqname>
<interface>
<name>IBluetoothCcc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>hardware.google.bluetooth.bt_channel_avoidance</name>
<version>1.0</version>
<interface>
<name>IBTChannelAvoidance</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>hardware.google.bluetooth.sar</name>
<version>1.1</version>
<interface>
<name>IBluetoothSar</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>hardware.google.bluetooth.ext</name>
<version>1.0</version>
<interface>
<name>IBluetoothExt</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>hardware.google.bluetooth.ewp</name>
<version>1.0</version>
<interface>
<name>IBluetoothEwp</name>
<instance>default</instance>

View file

@ -1,56 +1,17 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<hal format="aidl">
<name>android.hardware.bluetooth</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IBluetoothHci</name>
<instance>default</instance>
</interface>
<version>1</version>
<fqname>IBluetoothHci/default</fqname>
</hal>
<hal format="hidl">
<name>hardware.google.bluetooth.bt_channel_avoidance</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IBTChannelAvoidance</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>hardware.google.bluetooth.sar</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IBluetoothSar</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>hardware.google.bluetooth.ext</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IBluetoothExt</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>hardware.google.bluetooth.ccc</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IBluetoothCcc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>hardware.google.bluetooth.ewp</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IBluetoothEwp</name>
<instance>default</instance>
</interface>
<hal format="aidl">
<name>vendor.google.bluetooth_ext</name>
<version>1</version>
<fqname>IBTChannelAvoidance/default</fqname>
<fqname>IBluetoothCcc/default</fqname>
<fqname>IBluetoothEwp/default</fqname>
<fqname>IBluetoothExt/default</fqname>
<fqname>IBluetoothFinder/default</fqname>
<fqname>IBluetoothSar/default</fqname>
</hal>
</manifest>

View file

@ -1,5 +1,5 @@
# Bluetooth
/(vendor|system/vendor)/bin/hw/android\.hardware\.bluetooth@1\.1-service\.bcmbtlinux u:object_r:hal_bluetooth_btlinux_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.bluetooth-service\.bcmbtlinux u:object_r:hal_bluetooth_btlinux_exec:s0
/dev/wbrc u:object_r:wb_coexistence_dev:s0
/dev/ttySAC16 u:object_r:hci_attach_dev:s0

View file

@ -1,4 +1,5 @@
add_hwservice(hal_bluetooth_btlinux, hal_bluetooth_coexistence_hwservice);
add_service(hal_bluetooth_btlinux, hal_bluetooth_coexistence_service);
get_prop(hal_bluetooth_btlinux, boot_status_prop)
allow hal_bluetooth_btlinux sysfs_bluetooth_writable:file rw_file_perms;

View file

@ -0,0 +1,2 @@
# Bluetooth HAL extension
type hal_bluetooth_coexistence_service, hal_service_type, service_manager_type;

View file

@ -0,0 +1,7 @@
# Bluetooth HAL extension
vendor.google.bluetooth_ext.IBTChannelAvoidance/default u:object_r:hal_bluetooth_coexistence_service:s0
vendor.google.bluetooth_ext.IBluetoothSar/default u:object_r:hal_bluetooth_coexistence_service:s0
vendor.google.bluetooth_ext.IBluetoothCcc/default u:object_r:hal_bluetooth_coexistence_service:s0
vendor.google.bluetooth_ext.IBluetoothEwp/default u:object_r:hal_bluetooth_coexistence_service:s0
vendor.google.bluetooth_ext.IBluetoothExt/default u:object_r:hal_bluetooth_coexistence_service:s0
vendor.google.bluetooth_ext.IBluetoothFinder/default u:object_r:hal_bluetooth_coexistence_service:s0