modularize hal_audio_default
Bug: 197585437 Test: boot with hal_audio_default initialized Change-Id: I90435ffa66d342ee5c96bcb872d2ebefe5b4ef7c
This commit is contained in:
parent
ee94f61357
commit
d9c4ed7b59
12 changed files with 46 additions and 48 deletions
|
@ -1,2 +1,5 @@
|
||||||
# AOC device
|
# AOC device
|
||||||
type aoc_device, dev_type;
|
type aoc_device, dev_type;
|
||||||
|
|
||||||
|
# AMCS device
|
||||||
|
type amcs_device, dev_type;
|
||||||
|
|
|
@ -6,6 +6,10 @@ type sysfs_aoc_reset, sysfs_type, fs_type;
|
||||||
|
|
||||||
# persist
|
# persist
|
||||||
type persist_aoc_file, file_type, vendor_persist_type;
|
type persist_aoc_file, file_type, vendor_persist_type;
|
||||||
|
type persist_audio_file, file_type, vendor_persist_type;
|
||||||
|
|
||||||
|
# vendor
|
||||||
|
type aoc_audio_file, file_type, vendor_file_type;
|
||||||
|
|
||||||
# data
|
# data
|
||||||
type audio_vendor_data_file, file_type, data_file_type;
|
type audio_vendor_data_file, file_type, data_file_type;
|
||||||
|
|
|
@ -16,13 +16,18 @@
|
||||||
/dev/acd-com.google.usf u:object_r:aoc_device:s0
|
/dev/acd-com.google.usf u:object_r:aoc_device:s0
|
||||||
/dev/acd-logging u:object_r:aoc_device:s0
|
/dev/acd-logging u:object_r:aoc_device:s0
|
||||||
/dev/aoc u:object_r:aoc_device:s0
|
/dev/aoc u:object_r:aoc_device:s0
|
||||||
|
/dev/amcs u:object_r:amcs_device:s0
|
||||||
|
|
||||||
# AoC vendor binaries
|
# AoC vendor binaries
|
||||||
/vendor/bin/aocd u:object_r:aocd_exec:s0
|
/vendor/bin/aocd u:object_r:aocd_exec:s0
|
||||||
/vendor/bin/aocdump u:object_r:aocdump_exec:s0
|
/vendor/bin/aocdump u:object_r:aocdump_exec:s0
|
||||||
|
|
||||||
|
# AoC audio files
|
||||||
|
/vendor/etc/aoc(/.*)? u:object_r:aoc_audio_file:s0
|
||||||
|
|
||||||
# Aoc persist files
|
# Aoc persist files
|
||||||
/mnt/vendor/persist/aoc(/.*)? u:object_r:persist_aoc_file:s0
|
/mnt/vendor/persist/aoc(/.*)? u:object_r:persist_aoc_file:s0
|
||||||
|
/mnt/vendor/persist/audio(/.*)? u:object_r:persist_audio_file:s0
|
||||||
|
|
||||||
# Audio data files
|
# Audio data files
|
||||||
/data/vendor/audio(/.*)? u:object_r:audio_vendor_data_file:s0
|
/data/vendor/audio(/.*)? u:object_r:audio_vendor_data_file:s0
|
||||||
|
|
30
aoc/hal_audio_default.te
Normal file
30
aoc/hal_audio_default.te
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
vndbinder_use(hal_audio_default)
|
||||||
|
hwbinder_use(hal_audio_default)
|
||||||
|
|
||||||
|
allow hal_audio_default audio_vendor_data_file:dir rw_dir_perms;
|
||||||
|
allow hal_audio_default audio_vendor_data_file:file create_file_perms;
|
||||||
|
|
||||||
|
r_dir_file(hal_audio_default, aoc_audio_file);
|
||||||
|
r_dir_file(hal_audio_default, mnt_vendor_file);
|
||||||
|
r_dir_file(hal_audio_default, persist_audio_file);
|
||||||
|
|
||||||
|
allow hal_audio_default persist_file:dir search;
|
||||||
|
allow hal_audio_default aoc_device:file rw_file_perms;
|
||||||
|
allow hal_audio_default aoc_device:chr_file rw_file_perms;
|
||||||
|
|
||||||
|
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 access to DMABUF Heaps for AAudio API
|
||||||
|
allow hal_audio_default dmabuf_heap_device:chr_file r_file_perms;
|
||||||
|
|
||||||
|
get_prop(hal_audio_default, vendor_audio_prop);
|
||||||
|
|
||||||
|
userdebug_or_eng(`
|
||||||
|
allow hal_audio_default self:unix_stream_socket create_stream_socket_perms;
|
||||||
|
allow hal_audio_default audio_vendor_data_file:sock_file { create unlink };
|
||||||
|
')
|
||||||
|
|
||||||
|
wakelock_use(hal_audio_default);
|
2
aoc/hwservice.te
Normal file
2
aoc/hwservice.te
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Audio
|
||||||
|
type hal_audio_ext_hwservice, hwservice_manager_type;
|
2
aoc/hwservice_contexts
Normal file
2
aoc/hwservice_contexts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Audio
|
||||||
|
vendor.google.whitechapel.audio.audioext::IAudioExt u:object_r:hal_audio_ext_hwservice:s0
|
|
@ -49,6 +49,3 @@ type vscaler_heap_device, dmabuf_heap_device_type, dev_type;
|
||||||
# Fingerprint device
|
# Fingerprint device
|
||||||
type fingerprint_device, dev_type;
|
type fingerprint_device, dev_type;
|
||||||
|
|
||||||
# AMCS device
|
|
||||||
type amcs_device, dev_type;
|
|
||||||
|
|
||||||
|
|
|
@ -83,10 +83,6 @@ type per_boot_file, file_type, data_file_type, core_data_file_type;
|
||||||
type proc_touch, proc_type, fs_type, mlstrustedobject;
|
type proc_touch, proc_type, fs_type, mlstrustedobject;
|
||||||
type sysfs_touch, sysfs_type, fs_type;
|
type sysfs_touch, sysfs_type, fs_type;
|
||||||
|
|
||||||
# Audio
|
|
||||||
type persist_audio_file, file_type, vendor_persist_type;
|
|
||||||
type aoc_audio_file, file_type, vendor_file_type;
|
|
||||||
|
|
||||||
# RILD
|
# RILD
|
||||||
type rild_vendor_data_file, file_type, data_file_type;
|
type rild_vendor_data_file, file_type, data_file_type;
|
||||||
|
|
||||||
|
|
|
@ -260,11 +260,6 @@
|
||||||
/dev/logbuffer_btlpm u:object_r:logbuffer_device:s0
|
/dev/logbuffer_btlpm u:object_r:logbuffer_device:s0
|
||||||
/dev/logbuffer_tty16 u:object_r:logbuffer_device:s0
|
/dev/logbuffer_tty16 u:object_r:logbuffer_device:s0
|
||||||
|
|
||||||
# Audio
|
|
||||||
/mnt/vendor/persist/audio(/.*)? u:object_r:persist_audio_file:s0
|
|
||||||
/vendor/etc/aoc(/.*)? u:object_r:aoc_audio_file:s0
|
|
||||||
/dev/amcs u:object_r:amcs_device:s0
|
|
||||||
|
|
||||||
# AudioMetric
|
# AudioMetric
|
||||||
/(vendor|system/vendor)/bin/hw/vendor\.google\.audiometricext@1\.0-service-vendor u:object_r:hal_audiometricext_default_exec:s0
|
/(vendor|system/vendor)/bin/hw/vendor\.google\.audiometricext@1\.0-service-vendor u:object_r:hal_audiometricext_default_exec:s0
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1 @@
|
||||||
vndbinder_use(hal_audio_default)
|
|
||||||
hwbinder_use(hal_audio_default)
|
|
||||||
|
|
||||||
allow hal_audio_default audio_vendor_data_file:dir rw_dir_perms;
|
|
||||||
allow hal_audio_default audio_vendor_data_file:file create_file_perms;
|
|
||||||
|
|
||||||
r_dir_file(hal_audio_default, aoc_audio_file);
|
|
||||||
r_dir_file(hal_audio_default, mnt_vendor_file);
|
|
||||||
r_dir_file(hal_audio_default, persist_audio_file);
|
|
||||||
|
|
||||||
allow hal_audio_default persist_file:dir search;
|
|
||||||
allow hal_audio_default aoc_device:file rw_file_perms;
|
|
||||||
allow hal_audio_default aoc_device:chr_file rw_file_perms;
|
|
||||||
|
|
||||||
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 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;
|
|
||||||
|
|
||||||
get_prop(hal_audio_default, vendor_audio_prop);
|
|
||||||
|
|
||||||
userdebug_or_eng(`
|
|
||||||
allow hal_audio_default self:unix_stream_socket create_stream_socket_perms;
|
|
||||||
allow hal_audio_default audio_vendor_data_file:sock_file { create unlink };
|
|
||||||
')
|
|
||||||
|
|
||||||
wakelock_use(hal_audio_default);
|
|
||||||
|
|
|
@ -7,9 +7,6 @@ type hal_exynos_rild_hwservice, hwservice_manager_type;
|
||||||
# GRIL service
|
# GRIL service
|
||||||
type hal_radioext_hwservice, hwservice_manager_type;
|
type hal_radioext_hwservice, hwservice_manager_type;
|
||||||
|
|
||||||
# Audio
|
|
||||||
type hal_audio_ext_hwservice, hwservice_manager_type;
|
|
||||||
|
|
||||||
# WLC
|
# WLC
|
||||||
type hal_wlc_hwservice, hwservice_manager_type;
|
type hal_wlc_hwservice, hwservice_manager_type;
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,6 @@ android.hardware.media.c2::IConfigurable u:object_r:hal_c
|
||||||
# GRIL HAL
|
# GRIL HAL
|
||||||
vendor.google.radioext::IRadioExt u:object_r:hal_radioext_hwservice:s0
|
vendor.google.radioext::IRadioExt u:object_r:hal_radioext_hwservice:s0
|
||||||
|
|
||||||
#Audio
|
|
||||||
vendor.google.whitechapel.audio.audioext::IAudioExt u:object_r:hal_audio_ext_hwservice:s0
|
|
||||||
|
|
||||||
# Wireless charger hal
|
# Wireless charger hal
|
||||||
vendor.google.wireless_charger::IWirelessCharger u:object_r:hal_wlc_hwservice:s0
|
vendor.google.wireless_charger::IWirelessCharger u:object_r:hal_wlc_hwservice:s0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue