Allow tachyon service to make binder calls to GCA

This permission is needed for tachyon service to call callbacks.

AVC Error seen when tachyon tries accessing GCA:
12-02 11:40:03.212  6987  6987 W com.google.edge: type=1400 audit(0.0:17): avc:  denied  { call } for  scontext=u:r:edgetpu_tachyon_server:s0 tcontext=u:r:google_camera_app:s0:c145,c256,c512,c768 tclass=binder permissive=0
12-03 07:12:26.424  4166  4166 W com.google.edge: type=1400 audit(0.0:254): avc:  denied  { call } for  scontext=u:r:edgetpu_tachyon_server:s0 tcontext=u:r:debug_camera_app:s0:c67,c257,c512,c768 tclass=binder permissive=0

Bug: 381787911
Flag: EXEMPT updates device sepolicy only
Change-Id: I0913bafb24f02de9090e2d02011287e4deab0d4f
This commit is contained in:
Dinesh Yadav 2024-12-06 03:47:25 +00:00
parent 8059774fe7
commit a3d0621213
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,4 @@
# File containing sepolicies for GCA-Eng & GCA-Next.
userdebug_or_eng(` userdebug_or_eng(`
# Allows camera app to access the GXP device and properties. # Allows camera app to access the GXP device and properties.
allow debug_camera_app gxp_device:chr_file rw_file_perms; allow debug_camera_app gxp_device:chr_file rw_file_perms;
@ -9,4 +10,7 @@ userdebug_or_eng(`
# Allows GCA-Eng to find and access the EdgeTPU. # Allows GCA-Eng to find and access the EdgeTPU.
allow debug_camera_app edgetpu_app_service:service_manager find; allow debug_camera_app edgetpu_app_service:service_manager find;
allow debug_camera_app edgetpu_device:chr_file { getattr read write ioctl map }; allow debug_camera_app edgetpu_device:chr_file { getattr read write ioctl map };
# Allows tachyon_service to communicate with GCA-Eng via binder.
binder_call(edgetpu_tachyon_server, debug_camera_app);
') ')

View file

@ -8,3 +8,6 @@ allow google_camera_app vendor_fw_file:dir search;
# Allows GCA to find and access the EdgeTPU. # Allows GCA to find and access the EdgeTPU.
allow google_camera_app edgetpu_app_service:service_manager find; allow google_camera_app edgetpu_app_service:service_manager find;
allow google_camera_app edgetpu_device:chr_file { getattr read write ioctl map }; allow google_camera_app edgetpu_device:chr_file { getattr read write ioctl map };
# Allows tachyon service to communicate with google_camera_app via binder.
binder_call(edgetpu_tachyon_server, google_camera_app);