From cbc4b64bd1bff8211ef43f8d32856bb342dafa52 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Tue, 19 Sep 2023 03:45:02 +0000 Subject: [PATCH] Add radio_ext aidl to compatibility matrix Test: manual Bug: 285459428 Change-Id: Ic07926b2af7ea980575f4909ebe742efeb39ef82 --- modem/radio_ext/compatibility_matrix.xml | 10 ++++++++++ modem/radio_ext/radio_ext.mk | 5 +++++ modem/radio_ext/sepolicy/file_contexts | 1 + modem/radio_ext/sepolicy/hal_radio_ext.te | 11 +++++++++++ modem/radio_ext/sepolicy/service.te | 2 ++ modem/radio_ext/sepolicy/service_contexts | 1 + 6 files changed, 30 insertions(+) create mode 100644 modem/radio_ext/compatibility_matrix.xml create mode 100644 modem/radio_ext/radio_ext.mk create mode 100644 modem/radio_ext/sepolicy/file_contexts create mode 100644 modem/radio_ext/sepolicy/hal_radio_ext.te create mode 100644 modem/radio_ext/sepolicy/service.te create mode 100644 modem/radio_ext/sepolicy/service_contexts diff --git a/modem/radio_ext/compatibility_matrix.xml b/modem/radio_ext/compatibility_matrix.xml new file mode 100644 index 0000000..8d3adb4 --- /dev/null +++ b/modem/radio_ext/compatibility_matrix.xml @@ -0,0 +1,10 @@ + + + vendor.google.radio_ext + 1 + + IRadioExt + default + + + diff --git a/modem/radio_ext/radio_ext.mk b/modem/radio_ext/radio_ext.mk new file mode 100644 index 0000000..6750fdd --- /dev/null +++ b/modem/radio_ext/radio_ext.mk @@ -0,0 +1,5 @@ +PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces +PRODUCT_PACKAGES += vendor.google.radio_ext-service +DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/modem/radio_ext/compatibility_matrix.xml + +BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/modem/radio_ext/sepolicy diff --git a/modem/radio_ext/sepolicy/file_contexts b/modem/radio_ext/sepolicy/file_contexts new file mode 100644 index 0000000..cd4172c --- /dev/null +++ b/modem/radio_ext/sepolicy/file_contexts @@ -0,0 +1 @@ +/vendor/bin/hw/vendor\.google\.radio_ext-service u:object_r:hal_radio_ext_exec:s0 diff --git a/modem/radio_ext/sepolicy/hal_radio_ext.te b/modem/radio_ext/sepolicy/hal_radio_ext.te new file mode 100644 index 0000000..203ae3b --- /dev/null +++ b/modem/radio_ext/sepolicy/hal_radio_ext.te @@ -0,0 +1,11 @@ +type hal_radio_ext, domain; +type hal_radio_ext_exec, exec_type, vendor_file_type, file_type; + +init_daemon_domain(hal_radio_ext) + +binder_call(hal_radio_ext, servicemanager) +add_service(hal_radio_ext, hal_radio_ext_service) + +# Allow access to the backlight driver to set ssc_mode +allow hal_radio_ext sysfs_leds:dir search; +allow hal_radio_ext sysfs_leds:file rw_file_perms; diff --git a/modem/radio_ext/sepolicy/service.te b/modem/radio_ext/sepolicy/service.te new file mode 100644 index 0000000..7288ef1 --- /dev/null +++ b/modem/radio_ext/sepolicy/service.te @@ -0,0 +1,2 @@ +# Radio Ext AIDL service +type hal_radio_ext_service, hal_service_type, protected_service, service_manager_type; diff --git a/modem/radio_ext/sepolicy/service_contexts b/modem/radio_ext/sepolicy/service_contexts new file mode 100644 index 0000000..44f0766 --- /dev/null +++ b/modem/radio_ext/sepolicy/service_contexts @@ -0,0 +1 @@ +vendor.google.radio_ext.IRadioExt/default u:object_r:hal_radio_ext_service:s0 \ No newline at end of file