Jerry Zhang | 9f152d9 | 2017-04-10 16:57:48 -0700 | [diff] [blame] | 1 | ### |
| 2 | ### A domain for android.process.media, which contains both |
| 3 | ### MediaProvider and DownloadProvider and associated services. |
| 4 | ### |
| 5 | |
| 6 | typeattribute mediaprovider coredomain; |
| 7 | app_domain(mediaprovider) |
| 8 | |
| 9 | # DownloadProvider accesses the network. |
| 10 | net_domain(mediaprovider) |
| 11 | |
| 12 | # DownloadProvider uses /cache. |
| 13 | allow mediaprovider cache_file:dir create_dir_perms; |
| 14 | allow mediaprovider cache_file:file create_file_perms; |
| 15 | # /cache is a symlink to /data/cache on some devices. Allow reading the link. |
| 16 | allow mediaprovider cache_file:lnk_file r_file_perms; |
| 17 | |
| 18 | allow mediaprovider app_api_service:service_manager find; |
| 19 | allow mediaprovider audioserver_service:service_manager find; |
Jerry Zhang | 6f9ac6e | 2017-04-26 10:18:30 -0700 | [diff] [blame] | 20 | allow mediaprovider drmserver_service:service_manager find; |
Jerry Zhang | 9f152d9 | 2017-04-10 16:57:48 -0700 | [diff] [blame] | 21 | allow mediaprovider mediaserver_service:service_manager find; |
| 22 | allow mediaprovider surfaceflinger_service:service_manager find; |
| 23 | |
| 24 | # Allow MediaProvider to read/write cached ringtones (opened by system). |
| 25 | allow mediaprovider ringtone_file:file { getattr read write }; |
| 26 | |
| 27 | # MtpServer uses /dev/mtp_usb |
| 28 | allow mediaprovider mtp_device:chr_file rw_file_perms; |
| 29 | |
| 30 | # MtpServer uses /dev/usb-ffs/mtp |
| 31 | allow mediaprovider functionfs:dir search; |
| 32 | allow mediaprovider functionfs:file rw_file_perms; |
| 33 | |
| 34 | # MtpServer sets sys.usb.ffs.mtp.ready |
| 35 | set_prop(mediaprovider, ffs_prop) |