diff options
-rw-r--r-- | common/car.mk | 4 | ||||
-rw-r--r-- | common/car_core_hardware.xml | 4 | ||||
-rw-r--r-- | common/manifest.xml | 18 | ||||
-rw-r--r-- | common/sepolicy/file_contexts | 2 |
4 files changed, 27 insertions, 1 deletions
diff --git a/common/car.mk b/common/car.mk index 4dff8f8..de0250a 100644 --- a/common/car.mk +++ b/common/car.mk @@ -64,4 +64,8 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/generic/car/common/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml +# Car emulator specific sepolicy +BOARD_SEPOLICY_DIRS += \ + device/generic/car/common/sepolicy + $(call inherit-product, packages/services/Car/car_product/build/car.mk) diff --git a/common/car_core_hardware.xml b/common/car_core_hardware.xml index 7911cc0..b0d4f12 100644 --- a/common/car_core_hardware.xml +++ b/common/car_core_hardware.xml @@ -16,7 +16,6 @@ <!-- This is a copy of frameworks/native/data/etc/car_core_hardware.xml that is somewhat combined with device/generic/goldfish/data/etc/handheld_core_hardware.xml. - Notably bluetooth is removed since it does not work in the emulator. --> <!-- These are the hardware components that all handheld devices @@ -38,6 +37,9 @@ <feature name="android.hardware.touchscreen" /> <feature name="android.hardware.microphone" /> + <!-- Notably bluetooth is added to avoid crashing. It does not work in the emulator. --> + <feature name="android.hardware.bluetooth" /> + <!-- basic system services --> <feature name="android.software.connectionservice" /> <feature name="android.software.voice_recognizers" notLowRam="true" /> diff --git a/common/manifest.xml b/common/manifest.xml index 6e1f759..d7eaf2a 100644 --- a/common/manifest.xml +++ b/common/manifest.xml @@ -45,6 +45,24 @@ </interface> </hal> <hal format="hidl"> + <name>android.hardware.bluetooth</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IBluetoothHci</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.bluetooth.audio</name> + <transport>hwbinder</transport> + <version>2.0</version> + <interface> + <name>IBluetoothAudioProvidersFactory</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> <name>android.hardware.audio</name> <transport>hwbinder</transport> <version>4.0</version> diff --git a/common/sepolicy/file_contexts b/common/sepolicy/file_contexts new file mode 100644 index 0000000..e3e07d2 --- /dev/null +++ b/common/sepolicy/file_contexts @@ -0,0 +1,2 @@ +# label the bluetooth@1.0-service.sim or it won't register during system boot +/vendor/bin/hw/android\.hardware\.bluetooth@1\.0-service\.sim u:object_r:hal_bluetooth_default_exec:s0 |