Bruce Po d202a34dbc Allow aocxd to set thread priority
aocxd sets thread scheduler to SCHED_FIFO. This is so audio processing
in aocxd can run without glitching.

vndbinder:11464: type=1400 audit(0.0:17): avc:  denied  { sys_nice } for  capability=23  scontext=u:r:aocxd:s0 tcontext=u:r:aocxd:s0 tclass=capability permissive=0

BUG: 318791959
Change-Id: I9c9148aa7b18ce525091f93956e112b4c178a129
2024-01-17 18:58:06 +00:00

29 lines
634 B
Plaintext

# aocxd server domain
type aocxd, domain;
type aocxd_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(aocxd)
# sysfs operations
allow aocxd sysfs_aoc:dir search;
# dev operations
allow aocxd aoc_device:chr_file rw_file_perms;
# allow inotify to watch for additions/removals from /dev
allow aocxd device:dir r_dir_perms;
# set properties
set_prop(aocxd, vendor_aoc_prop);
# allow binder access
vndbinder_use(aocxd);
# allow managing wakelocks
wakelock_use(aocxd);
# add aocx service to the domain
add_service(aocxd, aocx);
# allow managing thread priority
allow aocxd self:global_capability_class_set sys_nice;