diff --git a/universal7885-common/sepolicy/vendor/file.te b/universal7885-common/sepolicy/vendor/file.te index 0852b9f..85d09d1 100644 --- a/universal7885-common/sepolicy/vendor/file.te +++ b/universal7885-common/sepolicy/vendor/file.te @@ -102,6 +102,7 @@ type sysfs_camera_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_decon, sysfs_type, r_fs_type, fs_type; type sysfs_gpu, sysfs_type, r_fs_type, fs_type; type sysfs_socinfo, sysfs_type, r_fs_type, fs_type; +type sysfs_fmradio_tune, sysfs_type, rw_fs_type, fs_type; type sysfs_v4l, sysfs_type, r_fs_type, fs_type; type sysfs_v4l_mfc, sysfs_type, r_fs_type, fs_type; type sysfs_v4l_smfc, sysfs_type, r_fs_type, fs_type; diff --git a/universal7885-common/sepolicy/vendor/file_contexts b/universal7885-common/sepolicy/vendor/file_contexts index 1399276..f4f92cd 100644 --- a/universal7885-common/sepolicy/vendor/file_contexts +++ b/universal7885-common/sepolicy/vendor/file_contexts @@ -220,6 +220,8 @@ # SamsungParts /(vendor|system/vendor)/bin/hw/vendor\.eureka\.hardware\.parts@[0-9]\.[0-9]-service u:object_r:hal_parts_default_exec:s0 +# FMRadio +/(vendor|system/vendor)/bin/hw/vendor\.eureka\.hardware\.fmradio@[0-9]\.[0-9]-service u:object_r:hal_fmradio_default_exec:s0 /dev/radio0 u:object_r:fm_radio_device:s0 /factory(/.*)? u:object_r:sec_efs_file:s0 diff --git a/universal7885-common/sepolicy/vendor/genfs_contexts b/universal7885-common/sepolicy/vendor/genfs_contexts index f0dda2a..961b354 100644 --- a/universal7885-common/sepolicy/vendor/genfs_contexts +++ b/universal7885-common/sepolicy/vendor/genfs_contexts @@ -77,6 +77,8 @@ genfscon proc /reset_reason u:object_r:proc_reset_reason:s genfscon proc /sys/vm/swappiness u:object_r:proc_swapiness:s0 # SYSFS +## FMRadio +genfscon sysfs /devices/virtual/s610_radio/s610_radio/ u:object_r:sysfs_fmradio_tune:s0 # class genfscon sysfs /class/video4linux u:object_r:sysfs_v4l:s0 diff --git a/universal7885-common/sepolicy/vendor/hal_fmradio_default.te b/universal7885-common/sepolicy/vendor/hal_fmradio_default.te new file mode 100644 index 0000000..c1d36bd --- /dev/null +++ b/universal7885-common/sepolicy/vendor/hal_fmradio_default.te @@ -0,0 +1,12 @@ +type hal_fmradio_default, domain; +type hal_fmradio_default_exec, exec_type, file_type, vendor_file_type; +add_hwservice(hal_fmradio_default, hal_fmradio_hwservice); +init_daemon_domain(hal_fmradio_default); + +hwbinder_use(hal_fmradio_default); +get_prop(hal_fmradio_default, hwservicemanager_prop); + +allow hal_fmradio_default sysfs_fmradio_tune:file rw_file_perms; +allow hal_fmradio_default sysfs_fmradio_tune:dir search; + +allow hal_fmradio_default sysfs_virtual:dir search; diff --git a/universal7885-common/sepolicy/vendor/hwservice.te b/universal7885-common/sepolicy/vendor/hwservice.te index c7f36ef..79e50df 100644 --- a/universal7885-common/sepolicy/vendor/hwservice.te +++ b/universal7885-common/sepolicy/vendor/hwservice.te @@ -1,4 +1,5 @@ type rild_hwservice, hwservice_manager_type; type hal_parts_hwservice, hwservice_manager_type; +type hal_fmradio_hwservice, hwservice_manager_type; type hal_vendor_configstore_hwservice, hwservice_manager_type; type hal_vendor_surfaceflinger_hwservice, hwservice_manager_type; diff --git a/universal7885-common/sepolicy/vendor/hwservice_contexts b/universal7885-common/sepolicy/vendor/hwservice_contexts index 6030a98..054667b 100644 --- a/universal7885-common/sepolicy/vendor/hwservice_contexts +++ b/universal7885-common/sepolicy/vendor/hwservice_contexts @@ -8,7 +8,10 @@ vendor.lineage.power::ILineagePower u:object_r:hal_power_hwservice:s0 vendor.eureka.hardware.parts::IBattery u:object_r:hal_parts_hwservice:s0 vendor.eureka.hardware.parts::IFlashLight u:object_r:hal_parts_hwservice:s0 vendor.eureka.hardware.parts::IGpu u:object_r:hal_parts_hwservice:s0 -vendor.eureka.security.parts::ISELinux u:object_r:hal_parts_hwservice:s0 +vendor.eureka.hardware.parts::ISELinux u:object_r:hal_parts_hwservice:s0 + +# FMRadio +vendor.eureka.hardware.fmradio::IFMRadio u:object_r:hal_fmradio_hwservice:s0 vendor.samsung_slsi.hardware.ExynosHWCServiceTW::IExynosHWCServiceTW u:object_r:hal_vendor_surfaceflinger_hwservice:s0 vendor.samsung_slsi.hardware.configstore::IExynosHWCConfigs u:object_r:hal_vendor_configstore_hwservice:s0 diff --git a/universal7885-common/sepolicy/vendor/system_app.te b/universal7885-common/sepolicy/vendor/system_app.te index ebb7e61..b060e8b 100644 --- a/universal7885-common/sepolicy/vendor/system_app.te +++ b/universal7885-common/sepolicy/vendor/system_app.te @@ -16,6 +16,12 @@ allow system_app hal_parts_hwservice:hwservice_manager find; allow system_app hal_parts_default:binder call; +# FMRadio + +allow system_app hal_fmradio_hwservice:hwservice_manager find; + +allow system_app hal_fmradio_default:binder call; + allow system_app fm_radio_device:chr_file { read write open ioctl };