1###
2### A domain for further sandboxing the MediaProvider mainline module.
3###
4type mediaprovider_app, domain, coredomain;
5
6app_domain(mediaprovider_app)
7
8# Access to /mnt/pass_through.
9allow mediaprovider_app mnt_pass_through_file:dir r_dir_perms;
10
11# Allow MediaProvider to host a FUSE daemon for external storage
12allow mediaprovider_app fuse_device:chr_file { read write ioctl getattr };
13
14# Allow MediaProvider to read/write media_rw_data_file files and dirs
15allow mediaprovider_app media_rw_data_file:file create_file_perms;
16allow mediaprovider_app media_rw_data_file:dir create_dir_perms;
17
18# Talk to the DRM service
19allow mediaprovider_app drmserver_service:service_manager find;
20
21# Talk to the MediaServer service
22allow mediaprovider_app mediaserver_service:service_manager find;
23
24# Talk to regular app services
25allow mediaprovider_app app_api_service:service_manager find;
26
27# Talk to the GPU service
28binder_call(mediaprovider_app, gpuservice)
29
30# Talk to statsd
31allow mediaprovider_app statsmanager_service:service_manager find;
32binder_call(mediaprovider_app, statsd)
33
34# read pipe-max-size configuration
35allow mediaprovider_app proc_pipe_conf:file r_file_perms;
36
37# Allow MediaProvider to set extended attributes (such as quota project ID)
38# on media files.
39allowxperm mediaprovider_app media_rw_data_file:{ dir file } ioctl {
40  FS_IOC_FSGETXATTR
41  FS_IOC_FSSETXATTR
42  FS_IOC_GETFLAGS
43  FS_IOC_SETFLAGS
44};
45
46allow mediaprovider_app proc_filesystems:file r_file_perms;
47
48#Allow MediaProvider to see if sdcardfs is in use
49get_prop(mediaprovider_app, storage_config_prop)
50