1type mediaswcodec, domain;
2type mediaswcodec_exec, system_file_type, exec_type, file_type;
3
4hal_server_domain(mediaswcodec, hal_codec2)
5
6# mediaswcodec may use an input surface from a different Codec2 service or an
7# OMX service
8hal_client_domain(mediaswcodec, hal_codec2)
9hal_client_domain(mediaswcodec, hal_omx)
10
11hal_client_domain(mediaswcodec, hal_allocator)
12hal_client_domain(mediaswcodec, hal_graphics_allocator)
13
14crash_dump_fallback(mediaswcodec)
15
16# mediaswcodec_server should never execute any executable without a
17# domain transition
18neverallow mediaswcodec { file_type fs_type }:file execute_no_trans;
19
20# Media processing code is inherently risky and thus should have limited
21# permissions and be isolated from the rest of the system and network.
22# Lengthier explanation here:
23# https://android-developers.googleblog.com/2016/05/hardening-media-stack.html
24neverallow mediaswcodec domain:{ tcp_socket udp_socket rawip_socket } *;
25
26