diff --git a/aoc/file.te b/aoc/file.te index 4d392938..fec17dcb 100644 --- a/aoc/file.te +++ b/aoc/file.te @@ -3,6 +3,7 @@ type sysfs_aoc_boottime, sysfs_type, fs_type; type sysfs_aoc_firmware, sysfs_type, fs_type; type sysfs_aoc, sysfs_type, fs_type; type sysfs_aoc_reset, sysfs_type, fs_type; +type sysfs_pixelstats, fs_type, sysfs_type; # persist type persist_aoc_file, file_type, vendor_persist_type; diff --git a/aoc/genfs_contexts b/aoc/genfs_contexts index 0ddd61d5..4be738a6 100644 --- a/aoc/genfs_contexts +++ b/aoc/genfs_contexts @@ -3,3 +3,14 @@ genfscon sysfs /devices/platform/19000000.aoc/aoc_clock_and_kernel_boottime u:ob genfscon sysfs /devices/platform/19000000.aoc/firmware u:object_r:sysfs_aoc_firmware:s0 genfscon sysfs /devices/platform/19000000.aoc u:object_r:sysfs_aoc:s0 genfscon sysfs /devices/platform/19000000.aoc/reset u:object_r:sysfs_aoc_reset:s0 + +# pixelstat_vendor +genfscon sysfs /devices/platform/audiometrics/codec_state u:object_r:sysfs_pixelstats:s0 +genfscon sysfs /devices/platform/audiometrics/hs_codec_state u:object_r:sysfs_pixelstats:s0 +genfscon sysfs /devices/platform/audiometrics/speaker_impedance u:object_r:sysfs_pixelstats:s0 +genfscon sysfs /devices/platform/audiometrics/speaker_excursion u:object_r:sysfs_pixelstats:s0 +genfscon sysfs /devices/platform/audiometrics/speaker_heartbeat u:object_r:sysfs_pixelstats:s0 +genfscon sysfs /devices/platform/audiometrics/speaker_temp u:object_r:sysfs_pixelstats:s0 +genfscon sysfs /devices/platform/audiometrics/mic_broken_degrade u:object_r:sysfs_pixelstats:s0 +genfscon sysfs /devices/platform/audiometrics/codec_crashed_counter u:object_r:sysfs_pixelstats:s0 + diff --git a/aoc/hal_audio_default.te b/aoc/hal_audio_default.te index 6334b93f..5ee99469 100644 --- a/aoc/hal_audio_default.te +++ b/aoc/hal_audio_default.te @@ -16,6 +16,7 @@ allow hal_audio_default hal_audio_ext_hwservice:hwservice_manager { find add }; allow hal_audio_default amcs_device:file rw_file_perms; allow hal_audio_default amcs_device:chr_file rw_file_perms; +allow hal_audio_default sysfs_pixelstats:file rw_file_perms; #allow access to DMABUF Heaps for AAudio API allow hal_audio_default dmabuf_heap_device:chr_file r_file_perms; diff --git a/legacy/hal_audiometricext_default.te b/aoc/hal_audiometricext_default.te similarity index 100% rename from legacy/hal_audiometricext_default.te rename to aoc/hal_audiometricext_default.te diff --git a/aoc/hwservice.te b/aoc/hwservice.te index 15aaaf71..b7bf5d92 100644 --- a/aoc/hwservice.te +++ b/aoc/hwservice.te @@ -1,2 +1,6 @@ # Audio type hal_audio_ext_hwservice, hwservice_manager_type; + +# AudioMetric +type hal_audiometricext_hwservice, hwservice_manager_type; + diff --git a/aoc/hwservice_contexts b/aoc/hwservice_contexts index 8eadd213..f06c8461 100644 --- a/aoc/hwservice_contexts +++ b/aoc/hwservice_contexts @@ -1,2 +1,4 @@ # Audio vendor.google.whitechapel.audio.audioext::IAudioExt u:object_r:hal_audio_ext_hwservice:s0 +vendor.google.audiometricext::IAudioMetricExt u:object_r:hal_audiometricext_hwservice:s0 + diff --git a/legacy/file.te b/legacy/file.te index f7f9b42f..4ef42471 100644 --- a/legacy/file.te +++ b/legacy/file.te @@ -159,9 +159,6 @@ type sysfs_lhbm, sysfs_type, fs_type, mlstrustedobject; # UWB vendor type uwb_vendor_data_file, file_type, data_file_type, app_data_file_type; -# PixelStats_vendor -type sysfs_pixelstats, fs_type, sysfs_type; - # WLC FW type vendor_wlc_fwupdata_file, vendor_file_type, file_type; # diff --git a/legacy/genfs_contexts b/legacy/genfs_contexts index 461ada53..1991004c 100644 --- a/legacy/genfs_contexts +++ b/legacy/genfs_contexts @@ -281,12 +281,3 @@ genfscon sysfs /devices/platform/wlan/sscoredump/sscd_wlan/report_count # mediacodec genfscon sysfs /devices/platform/mfc/video4linux/video u:object_r:sysfs_video:s0 -# pixelstat_vendor -genfscon sysfs /devices/platform/audiometrics/codec_state u:object_r:sysfs_pixelstats:s0 -genfscon sysfs /devices/platform/audiometrics/hs_codec_state u:object_r:sysfs_pixelstats:s0 -genfscon sysfs /devices/platform/audiometrics/speaker_impedance u:object_r:sysfs_pixelstats:s0 -genfscon sysfs /devices/platform/audiometrics/speaker_excursion u:object_r:sysfs_pixelstats:s0 -genfscon sysfs /devices/platform/audiometrics/speaker_heartbeat u:object_r:sysfs_pixelstats:s0 -genfscon sysfs /devices/platform/audiometrics/speaker_temp u:object_r:sysfs_pixelstats:s0 -genfscon sysfs /devices/platform/audiometrics/mic_broken_degrade u:object_r:sysfs_pixelstats:s0 -genfscon sysfs /devices/platform/audiometrics/codec_crashed_counter u:object_r:sysfs_pixelstats:s0 diff --git a/legacy/hal_audio_default.te b/legacy/hal_audio_default.te deleted file mode 100644 index 31ed6a9b..00000000 --- a/legacy/hal_audio_default.te +++ /dev/null @@ -1 +0,0 @@ -allow hal_audio_default sysfs_pixelstats:file rw_file_perms; diff --git a/legacy/hwservice.te b/legacy/hwservice.te index 81372fc2..eb8e6211 100644 --- a/legacy/hwservice.te +++ b/legacy/hwservice.te @@ -16,6 +16,3 @@ type hal_bluetooth_coexistence_hwservice, hwservice_manager_type, vendor_hwservi # Fingerprint type hal_fingerprint_ext_hwservice, hwservice_manager_type; -# AudioMetric -type hal_audiometricext_hwservice, hwservice_manager_type; - diff --git a/legacy/hwservice_contexts b/legacy/hwservice_contexts index 113d6623..9962c75d 100644 --- a/legacy/hwservice_contexts +++ b/legacy/hwservice_contexts @@ -25,6 +25,3 @@ hardware.google.bluetooth.ccc::IBluetoothCcc u:object_r # Fingerprint vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_ext_hwservice:s0 -#Audio -vendor.google.audiometricext::IAudioMetricExt u:object_r:hal_audiometricext_hwservice:s0 -