1# mediatranscoding - daemon for transcoding video and image.
2type mediatranscoding, domain;
3type mediatranscoding_exec, system_file_type, exec_type, file_type;
4
5binder_use(mediatranscoding)
6binder_service(mediatranscoding)
7
8add_service(mediatranscoding, mediatranscoding_service)
9
10allow mediatranscoding system_server:fd use;
11
12# mediatranscoding should never execute any executable without a
13# domain transition
14neverallow mediatranscoding { file_type fs_type }:file execute_no_trans;
15
16# The goal of the mediaserver split is to place media processing code into
17# restrictive sandboxes with limited responsibilities and thus limited
18# permissions. Example: Audioserver is only responsible for controlling audio
19# hardware and processing audio content. Cameraserver does the same for camera
20# hardware/content. Etc.
21#
22# Media processing code is inherently risky and thus should have limited
23# permissions and be isolated from the rest of the system and network.
24# Lengthier explanation here:
25# https://android-developers.googleblog.com/2016/05/hardening-media-stack.html
26neverallow mediatranscoding domain:{ tcp_socket udp_socket rawip_socket } *;
27