From b3576ef751c3ac38ebaec8d4b63b7d4c32b260fb Mon Sep 17 00:00:00 2001 From: xiaofanj Date: Tue, 7 Jun 2022 03:06:13 +0000 Subject: [PATCH] modem_svc_sit: create oem test iodev - Create radio_test_device for oem_test iodev. - Grant modem_svc_sit to access radio_test_device. Bug: 231380480 Signed-off-by: Xiaofan Jiang Change-Id: Id06deedadf04c70b57e405a05533ed85764bdd1d --- whitechapel_pro/device.te | 1 + whitechapel_pro/file_contexts | 1 + whitechapel_pro/modem_svc_sit.te | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/whitechapel_pro/device.te b/whitechapel_pro/device.te index 6b81f2a1..952a1675 100644 --- a/whitechapel_pro/device.te +++ b/whitechapel_pro/device.te @@ -18,6 +18,7 @@ type faceauth_heap_device, dmabuf_heap_device_type, dev_type; type vframe_heap_device, dmabuf_heap_device_type, dev_type; type vscaler_heap_device, dmabuf_heap_device_type, dev_type; type battery_history_device, dev_type; +type radio_test_device, dev_type; # SecureElement SPI device type st54spi_device, dev_type; diff --git a/whitechapel_pro/file_contexts b/whitechapel_pro/file_contexts index 79bb698f..a7aba25f 100644 --- a/whitechapel_pro/file_contexts +++ b/whitechapel_pro/file_contexts @@ -149,6 +149,7 @@ /dev/st33spi u:object_r:st33spi_device:s0 /dev/ttyGS[0-3] u:object_r:serial_device:s0 /dev/oem_ipc[0-7] u:object_r:radio_device:s0 +/dev/oem_test u:object_r:radio_test_device:s0 /dev/umts_boot0 u:object_r:radio_device:s0 /dev/umts_ipc0 u:object_r:radio_device:s0 /dev/umts_ipc1 u:object_r:radio_device:s0 diff --git a/whitechapel_pro/modem_svc_sit.te b/whitechapel_pro/modem_svc_sit.te index d3e79c93..9954f493 100644 --- a/whitechapel_pro/modem_svc_sit.te +++ b/whitechapel_pro/modem_svc_sit.te @@ -24,3 +24,7 @@ get_prop(modem_svc_sit, vendor_rild_prop) # hwservice permission allow modem_svc_sit hal_exynos_rild_hwservice:hwservice_manager find; get_prop(modem_svc_sit, hwservicemanager_prop) + +userdebug_or_eng(` + allow modem_svc_sit radio_test_device:chr_file rw_file_perms; +')