diff --git a/private/file_contexts b/private/file_contexts index 382a20d295bd6eb4744a9843eb0cecec7a4c7e33..a341d7e86f6e9cf34c1fd1cd29119962dd0a3fda 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -226,6 +226,7 @@ /system/bin/hw/android\.hardware\.audio@2\.0-service u:object_r:hal_audio_exec:s0 /system/bin/hw/android\.hardware\.boot@1\.0-service u:object_r:hal_boot_exec:s0 /system/bin/hw/android\.hardware\.graphics\.allocator@2\.0-service u:object_r:hal_graphics_allocator_exec:s0 +/system/bin/hw/android\.hardware\.graphics\.composer@2\.1-service u:object_r:hal_graphics_composer_exec:s0 /system/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_exec:s0 /system/bin/hw/android\.hardware\.memtrack@1\.0-service u:object_r:hal_memtrack_exec:s0 /system/bin/hw/android\.hardware\.nfc@1\.0-service u:object_r:hal_nfc_exec:s0 diff --git a/private/hal_graphics_composer.te b/private/hal_graphics_composer.te new file mode 100644 index 0000000000000000000000000000000000000000..128171f012899b7310d59413a24616559f7e6c5a --- /dev/null +++ b/private/hal_graphics_composer.te @@ -0,0 +1 @@ +init_daemon_domain(hal_graphics_composer) diff --git a/public/bootanim.te b/public/bootanim.te index 4d16f551a2f20f3f293408d1b4c0230279ddc89f..3e0af8e1e5aaee2cc545d2f8e0101035bda6339e 100644 --- a/public/bootanim.te +++ b/public/bootanim.te @@ -22,6 +22,9 @@ allow bootanim surfaceflinger_service:service_manager find; allow bootanim ion_device:chr_file rw_file_perms; allow bootanim hal_graphics_allocator:fd use; +# Fences +allow bootanim hal_graphics_composer:fd use; + # Read access to pseudo filesystems. r_dir_file(bootanim, proc) allow bootanim proc_meminfo:file r_file_perms; diff --git a/public/hal_graphics_composer.te b/public/hal_graphics_composer.te new file mode 100644 index 0000000000000000000000000000000000000000..e92eeafd51a2506e21220f114c68af8e5c4e1921 --- /dev/null +++ b/public/hal_graphics_composer.te @@ -0,0 +1,22 @@ +# graphics composer subsystem +type hal_graphics_composer, domain; +type hal_graphics_composer_exec, exec_type, file_type; + +# HwBinder access +hwbinder_use(hal_graphics_composer) +# IComposerCallback +binder_call(hal_graphics_composer, surfaceflinger) + +# GPU device access +allow hal_graphics_composer gpu_device:chr_file rw_file_perms; +allow hal_graphics_composer ion_device:chr_file r_file_perms; +allow hal_graphics_composer hal_graphics_allocator:fd use; + +# Access /dev/graphics/fb0. +allow hal_graphics_composer graphics_device:dir search; +allow hal_graphics_composer graphics_device:chr_file rw_file_perms; + +# Fences +allow hal_graphics_composer system_server:fd use; +allow hal_graphics_composer bootanim:fd use; +allow hal_graphics_composer {appdomain ephemeral_app}:fd use; diff --git a/public/surfaceflinger.te b/public/surfaceflinger.te index 4f9f8efaf00008dc4b21bbb94d9544a123b6f2a0..608afc5d62a4922d35920b403e6a3884bf1eb0c3 100644 --- a/public/surfaceflinger.te +++ b/public/surfaceflinger.te @@ -7,6 +7,7 @@ typeattribute surfaceflinger mlstrustedsubject; # Perform HwBinder IPC. hwbinder_use(surfaceflinger) binder_call(surfaceflinger, hal_graphics_allocator) +binder_call(surfaceflinger, hal_graphics_composer) # Perform Binder IPC. binder_use(surfaceflinger)