diff --git a/device.mk b/device.mk index e62533b9..3b645a9d 100644 --- a/device.mk +++ b/device.mk @@ -301,6 +301,11 @@ PRODUCT_PACKAGES += \ fs_config_dirs \ fs_config_files +# Context hub HAL +PRODUCT_PACKAGES += \ + android.hardware.contexthub@1.0-impl.generic \ + android.hardware.contexthub@1.0-service + # Boot control HAL PRODUCT_PACKAGES += \ android.hardware.boot@1.0-impl \ diff --git a/manifest.xml b/manifest.xml index 3976cdef..ac94159f 100644 --- a/manifest.xml +++ b/manifest.xml @@ -37,6 +37,12 @@ legacy/0 + + android.hardware.contexthub + hwbinder + + 1.0 + android.hardware.graphics.allocator hwbinder diff --git a/sepolicy/file.te b/sepolicy/file.te index 1faab618..c671e7ea 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -24,6 +24,7 @@ type perfd_socket, file_type; type ims_socket, file_type; type cnd_socket, file_type; +type chre_socket, file_type; type firmware_file, fs_type, contextmount_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 50bbb489..cf9dd598 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -34,6 +34,7 @@ /dev/easelcomm-client u:object_r:easel_device:s0 # dev socket nodes +/dev/socket/chre u:object_r:chre_socket:s0 /dev/socket/qmux_audio(/.*)? u:object_r:qmuxd_socket:s0 /dev/socket/qmux_bluetooth(/.*)? u:object_r:qmuxd_socket:s0 /dev/socket/qmux_gps(/.*)? u:object_r:qmuxd_socket:s0 diff --git a/sepolicy/hal_contexthub.te b/sepolicy/hal_contexthub.te new file mode 100644 index 00000000..10c5d53d --- /dev/null +++ b/sepolicy/hal_contexthub.te @@ -0,0 +1,3 @@ +# Allow context hub HAL to communicate with daemon via socket +allow hal_contexthub_default chre:unix_stream_socket connectto; +allow hal_contexthub_default chre_socket:sock_file write;