Skip to content
Snippets Groups Projects
Commit e21871c8 authored by rpcraig's avatar rpcraig Committed by Robert Craig
Browse files

Address screenrecord denials.


Steps to reproduce across devices.
  adb shell screenrecord --bit-rate 8000000 --time-limit 10 /data/local/tmp/test.mp4

* Allow surfaceflinger to talk to mediaserver
   avc:  denied  { call } for  pid=122 comm="surfaceflinger" scontext=u:r:surfaceflinger:s0 tcontext=u:r:mediaserver:s0 tclass=binder

* Give mediaserver access to gpu_device
   avc:  denied  { read write } for  pid=2793 comm="VideoEncMsgThre" name="kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
   avc:  denied  { open } for  pid=2793 comm="VideoEncMsgThre" name="kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
   avc:  denied  { ioctl } for  pid=2793 comm="VideoEncMsgThre" path="/dev/kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file

Change-Id: Id1812ec95662f4b2433e2989f5fccce6a85c3a41
Signed-off-by: default avatarrpcraig <rpcraig@tycho.ncsc.mil>
parent 629c98c2
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ allow mediaserver app_data_file:dir search; ...@@ -24,7 +24,7 @@ allow mediaserver app_data_file:dir search;
allow mediaserver app_data_file:file rw_file_perms; allow mediaserver app_data_file:file rw_file_perms;
allow mediaserver platform_app_data_file:file { getattr read }; allow mediaserver platform_app_data_file:file { getattr read };
allow mediaserver sdcard_type:file write; allow mediaserver sdcard_type:file write;
allow mediaserver graphics_device:chr_file rw_file_perms; allow mediaserver { gpu_device graphics_device }:chr_file rw_file_perms;
allow mediaserver video_device:dir r_dir_perms; allow mediaserver video_device:dir r_dir_perms;
allow mediaserver video_device:chr_file rw_file_perms; allow mediaserver video_device:chr_file rw_file_perms;
allow mediaserver audio_device:dir r_dir_perms; allow mediaserver audio_device:dir r_dir_perms;
......
...@@ -13,6 +13,7 @@ unix_socket_connect(surfaceflinger, property, init) ...@@ -13,6 +13,7 @@ unix_socket_connect(surfaceflinger, property, init)
binder_use(surfaceflinger) binder_use(surfaceflinger)
binder_call(surfaceflinger, system_server) binder_call(surfaceflinger, system_server)
binder_call(surfaceflinger, nfc) binder_call(surfaceflinger, nfc)
binder_call(surfaceflinger, mediaserver)
binder_service(surfaceflinger) binder_service(surfaceflinger)
# Access the GPU. # Access the GPU.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment