sepolicy: qti: Allow audio/sensors to handle ultrasound prox

Change-Id: I0c93de7578086ac97eb1ff3110c2bac6afba19c4
This commit is contained in:
LuK1337
2022-10-02 21:47:53 +02:00
parent d25dfa3834
commit e4a06d1d09
6 changed files with 16 additions and 0 deletions

View File

@@ -7,5 +7,8 @@ type vendor_reserve_partition, dev_type;
# Sensors
type ssc_interactive_device, dev_type;
# Ultrasound
type ultrasound_device, dev_type;
# Wlchgmonitor
type wlchg_device, dev_type;

View File

@@ -22,5 +22,8 @@ type vendor_proc_eng_cali_file, fs_type, proc_type;
type vendor_proc_oplus_als_file, fs_type, proc_type;
type vendor_sysfs_sensor_fb, fs_type, sysfs_type;
# Ultrasound
type vendor_proc_ultrasound, fs_type, proc_type;
# Versioning
type vendor_proc_oplus_version, fs_type, proc_type;

View File

@@ -74,6 +74,10 @@
# Touch
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.oplus u:object_r:hal_lineage_touch_default_exec:s0
# Ultrasound
/dev/audio_ultrasound u:object_r:ultrasound_device:s0
/dev/sensor_ultrasound u:object_r:ultrasound_device:s0
# Vibrator
/(vendor|system/vendor)/bin/hw/vendor\.qti\.hardware\.vibrator\.service\.oplus u:object_r:hal_vibrator_default_exec:s0

View File

@@ -24,6 +24,9 @@ genfscon proc /sensor/als_cali u:object_r:vendor_proc_opl
genfscon proc /sensor/pressure_cali u:object_r:vendor_proc_eng_cali_file:s0
genfscon sysfs /devices/platform/soc/soc:sensor_fb u:object_r:vendor_sysfs_sensor_fb:s0
# Ultrasound
genfscon proc /ultrasound u:object_r:vendor_proc_ultrasound:s0
# Versioning
genfscon proc /oplusVersion u:object_r:vendor_proc_oplus_version:s0

View File

@@ -0,0 +1 @@
allow hal_audio_default ultrasound_device:chr_file rw_file_perms;

View File

@@ -1,5 +1,7 @@
allow hal_sensors_default ssc_interactive_device:chr_file rw_file_perms;
allow hal_sensors_default ultrasound_device:chr_file rw_file_perms;
r_dir_file(hal_sensors_default, vendor_proc_ultrasound)
rw_dir_file(hal_sensors_default, vendor_persist_engineer_file)
rw_dir_file(hal_sensors_default, vendor_sysfs_graphics)
rw_dir_file(hal_sensors_default, vendor_sysfs_sensor_fb)