universal7885: sepolicy: Label FM Radio HAL

This commit is contained in:
roynatech2544 2022-02-19 01:35:38 +09:00
commit 02eded67c8
No known key found for this signature in database
GPG key ID: 9675C32163D88D30
7 changed files with 28 additions and 1 deletions

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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 };