msm8953-common: sepolicy: Add missing rules for persist_audio_file

* Rules for persist_audio_file have been removed for legacy devices.

* Instead of labeling "/mnt/vendor/persist/audio", which is the default
  path for audio calibration, label "/mnt/vendor/persist/factory/audio"
  as this is where Moto devices store these calibration files anyway.

Change-Id: Ic27eb7f713e145a795cfec9de3c684fe9e2fc985
This commit is contained in:
Joshua Blanchard
2020-12-08 19:18:54 -05:00
committed by Jorge Lucas
parent 739c49d0e0
commit 3746c2f486
3 changed files with 5 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ type debugfs_rmts, debugfs_type, fs_type;
type debugfs_wlan, debugfs_type, fs_type;
type fsg_firmware_file, file_type, contextmount_type, vendor_file_type;
type perfd_socket, file_type;
type persist_audio_file, file_type, vendor_persist_type;
type persist_camera_file, file_type;
type persist_battery_file, file_type;
type persist_mdm_file, file_type, vendor_persist_type;

View File

@@ -12,6 +12,7 @@
# Persist
/persist(/.*)? u:object_r:mnt_vendor_file:s0
/(mnt/vendor/persist|persist)/factory/audio(/.*)? u:object_r:persist_audio_file:s0
/dev/mmi_sys_temp u:object_r:thermal_device:s0
/dev/socket/perfd u:object_r:perfd_socket:s0

View File

@@ -1,4 +1,7 @@
unix_socket_connect(hal_audio_default, perfd, perfd)
allow hal_audio_default persist_audio_file:dir rw_dir_perms;
allow hal_audio_default persist_audio_file:file create_file_perms;
allow hal_audio_default sysfs:dir { open read };
allow hal_audio_default hal_dms_default:binder { transfer call };
allow hal_audio_default hal_dms_hwservice:hwservice_manager find;