Merge changes from topic "move_shared_modem_platform_sepolicy" into main
* changes: modem_svc: add modem_svc_sit to solve sepolicy conflicts arising from different device versions modem_svc: move shared_modem_platform related sepolicy to gs-common
This commit is contained in:
commit
37bd9aa71e
11 changed files with 49 additions and 1 deletions
11
modem/modem_svc_sit/compatibility_matrix.xml
Normal file
11
modem/modem_svc_sit/compatibility_matrix.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<compatibility-matrix version="1.0" type="framework">
|
||||||
|
<!-- Optional since older devices will not register any services. -->
|
||||||
|
<hal format="aidl" optional="true">
|
||||||
|
<name>com.google.pixel.shared_modem_platform</name>
|
||||||
|
<version>3</version>
|
||||||
|
<interface>
|
||||||
|
<name>ISharedModemPlatform</name>
|
||||||
|
<instance>default</instance>
|
||||||
|
</interface>
|
||||||
|
</hal>
|
||||||
|
</compatibility-matrix>
|
1
modem/modem_svc_sit/sepolicy/attributes
Normal file
1
modem/modem_svc_sit/sepolicy/attributes
Normal file
|
@ -0,0 +1 @@
|
||||||
|
hal_attribute(shared_modem_platform)
|
2
modem/modem_svc_sit/sepolicy/file_contexts
Normal file
2
modem/modem_svc_sit/sepolicy/file_contexts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# modem_svc_sit
|
||||||
|
/vendor/bin/shared_modem_platform u:object_r:modem_svc_sit_exec:s0
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Allow binder connection from client to server
|
||||||
|
binder_call(hal_shared_modem_platform_client, hal_shared_modem_platform_server)
|
||||||
|
|
||||||
|
# Allow client to find the service, server to register the service
|
||||||
|
hal_attribute_service(hal_shared_modem_platform, hal_shared_modem_platform_service)
|
||||||
|
|
||||||
|
# Allow binder communication from server to service_manager
|
||||||
|
binder_use(hal_shared_modem_platform_server)
|
2
modem/modem_svc_sit/sepolicy/modem_svc_sit.te
Normal file
2
modem/modem_svc_sit/sepolicy/modem_svc_sit.te
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Modem SVC will register the default instance of the AIDL ISharedModemPlatform hal.
|
||||||
|
hal_server_domain(modem_svc_sit, hal_shared_modem_platform)
|
2
modem/modem_svc_sit/sepolicy/service.te
Normal file
2
modem/modem_svc_sit/sepolicy/service.te
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# define hal_shared_modem_platform_service
|
||||||
|
type hal_shared_modem_platform_service, hal_service_type, service_manager_type;
|
2
modem/modem_svc_sit/sepolicy/service_contexts
Normal file
2
modem/modem_svc_sit/sepolicy/service_contexts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Bind Shared Modem Platform AIDL service name to the SELinux type.
|
||||||
|
com.google.pixel.shared_modem_platform.ISharedModemPlatform/default u:object_r:hal_shared_modem_platform_service:s0
|
14
modem/modem_svc_sit/shared_modem_platform.mk
Normal file
14
modem/modem_svc_sit/shared_modem_platform.mk
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# This file is not included in `modem.mk` since this is included at the
|
||||||
|
# beginning of each `device.mk` file, and so will be called before
|
||||||
|
# `SHARED_MODEM_PLATFORM_VENDOR` is defined later in the file.
|
||||||
|
# This file supoorts Whitechapel(gs101), Whitechapel Pro(gs201), Zuma, Zuma Pro.
|
||||||
|
# This file doesn't support devices which AP is after Zuma Pro.
|
||||||
|
# For device after Zuma Pro please use gs-common/modem/shared_modem_platform/shared_modem_platform.mk
|
||||||
|
SOONG_CONFIG_NAMESPACES += shared_modem_platform
|
||||||
|
SOONG_CONFIG_shared_modem_platform += \
|
||||||
|
vendor
|
||||||
|
SOONG_CONFIG_shared_modem_platform_vendor := $(SHARED_MODEM_PLATFORM_VENDOR)
|
||||||
|
|
||||||
|
PRODUCT_PACKAGES += shared_modem_platform
|
||||||
|
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/modem/modem_svc_sit/compatibility_matrix.xml
|
||||||
|
BOARD_SEPOLICY_DIRS += device/google/gs-common/modem/modem_svc_sit/sepolicy
|
2
modem/shared_modem_platform/sepolicy/file_contexts
Normal file
2
modem/shared_modem_platform/sepolicy/file_contexts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# shared_modem_platform
|
||||||
|
/vendor/bin/shared_modem_platform u:object_r:shared_modem_platform_exec:s0
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Shared modem platform will register the default instance of the AIDL ISharedModemPlatform hal.
|
||||||
|
hal_server_domain(shared_modem_platform, hal_shared_modem_platform)
|
|
@ -1,6 +1,8 @@
|
||||||
# This file is not included in `modem.mk` since this is included at the
|
# This file is not included in `modem.mk` since this is included at the
|
||||||
# beginning of each `device.mk` file, and so will be called before
|
# beginning of each `device.mk` file, and so will be called before
|
||||||
# `SHARED_MODEM_PLATFORM_VENDOR` is defined later in the file.
|
# `SHARED_MODEM_PLATFORM_VENDOR` is defined later in the file.
|
||||||
|
# This file supports support devices which AP is after zumapro(not include).
|
||||||
|
# For device before zumapro(include) please use gs-common/modem/modem_svc_sit/shared_modem_platform.mk
|
||||||
SOONG_CONFIG_NAMESPACES += shared_modem_platform
|
SOONG_CONFIG_NAMESPACES += shared_modem_platform
|
||||||
SOONG_CONFIG_shared_modem_platform += \
|
SOONG_CONFIG_shared_modem_platform += \
|
||||||
vendor
|
vendor
|
||||||
|
@ -8,4 +10,4 @@ SOONG_CONFIG_shared_modem_platform_vendor := $(SHARED_MODEM_PLATFORM_VENDOR)
|
||||||
|
|
||||||
PRODUCT_PACKAGES += shared_modem_platform
|
PRODUCT_PACKAGES += shared_modem_platform
|
||||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/modem/shared_modem_platform/compatibility_matrix.xml
|
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/modem/shared_modem_platform/compatibility_matrix.xml
|
||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/modem/shared_modem_platform/sepolicy
|
BOARD_SEPOLICY_DIRS += device/google/gs-common/modem/shared_modem_platform/sepolicy
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue