Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable VirtioVideo on Android T with kernel5.15/lts2021-chromium #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions codecs/v4l2-codec2/file_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor/bin/hw/android\.hardware\.media\.c2@1\.0-service-v4l2(.*)? u:object_r:media_c2_v4l2_hal_exec:s0
/dev/video[0-9] u:object_r:video_device:s0
34 changes: 34 additions & 0 deletions codecs/v4l2-codec2/media_c2_v4l2_hal.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
type media_c2_v4l2_hal, domain;

type media_c2_v4l2_hal_exec, exec_type, file_type, vendor_file_type;
init_daemon_domain(media_c2_v4l2_hal)

vndbinder_use(media_c2_v4l2_hal)
hal_client_domain(media_c2_v4l2_hal, hal_codec2)
hal_server_domain(media_c2_v4l2_hal, hal_codec2)

#allow media_c2_v4l2_hal hwservicemanager_prop:file { open read getattr map };
get_prop(media_c2_v4l2_hal, hwservicemanager_prop)

allow media_c2_v4l2_hal hwservicemanager:binder call;
allow media_c2_v4l2_hal tombstoned_crash_socket:sock_file write;
allow media_c2_v4l2_hal hal_codec2_hwservice:hwservice_manager { find add };

allow media_c2_v4l2_hal hidl_base_hwservice:hwservice_manager add;

#allow media_c2_v4l2_hal mediaserver:binder transfer;
#allow mediaserver media_c2_v4l2_hal:binder call;
binder_call(media_c2_v4l2_hal, mediaserver)
binder_call(mediaserver, media_c2_v4l2_hal)

allow media_c2_v4l2_hal cgroup_v2:dir search;
allow media_c2_v4l2_hal video_device:chr_file { open read write ioctl };

allow media_c2_v4l2_hal hal_graphics_mapper_hwservice:hwservice_manager find;
hal_client_domain(media_c2_v4l2_hal, hal_graphics_allocator)

allow media_c2_v4l2_hal hal_graphics_allocator_default_tmpfs:file { read write map };
allow media_c2_v4l2_hal gpu_device:dir search;
allow media_c2_v4l2_hal gpu_device:chr_file { open read write ioctl getattr map};

crash_dump_fallback(media_c2_v4l2_hal)
2 changes: 2 additions & 0 deletions codecs/v4l2-codec2/mediaswcodec.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#============= mediaswcodec ==============
allow mediaswcodec gpu_device:chr_file map;