diff --git a/radio/file.te b/radio/file.te index 62a9b514..c1042132 100644 --- a/radio/file.te +++ b/radio/file.te @@ -18,6 +18,7 @@ type persist_modem_file, file_type, vendor_persist_type; # Modem type modem_efs_file, file_type; type modem_userdata_file, file_type; +type sysfs_modem, sysfs_type, fs_type; # Exynos Firmware type vendor_fw_file, vendor_file_type, file_type; diff --git a/radio/genfs_contexts b/radio/genfs_contexts index 4d205887..347e461e 100644 --- a/radio/genfs_contexts +++ b/radio/genfs_contexts @@ -6,3 +6,6 @@ genfscon sysfs /firmware/devicetree/base/chosen u:obje # GPS genfscon sysfs /devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby u:object_r:sysfs_gps:s0 + +# Modem +genfscon sysfs /devices/platform/cp-tm1/cp_temp u:object_r:sysfs_modem:s0 diff --git a/radio/modem_svc_sit.te b/radio/modem_svc_sit.te index 46b17dc7..3b8b55e4 100644 --- a/radio/modem_svc_sit.te +++ b/radio/modem_svc_sit.te @@ -5,6 +5,9 @@ init_daemon_domain(modem_svc_sit) hwbinder_use(modem_svc_sit) binder_call(modem_svc_sit, rild) +# Grant sysfs_modem access +allow modem_svc_sit sysfs_modem:file rw_file_perms; + # Grant radio device access allow modem_svc_sit radio_device:chr_file rw_file_perms;