1# HwBinder IPC from clients to server and callbacks 2binder_call(hal_camera_client, hal_camera_server) 3binder_call(hal_camera_server, hal_camera_client) 4 5hal_attribute_hwservice(hal_camera, hal_camera_hwservice) 6 7allow hal_camera device:dir r_dir_perms; 8allow hal_camera video_device:dir r_dir_perms; 9allow hal_camera video_device:chr_file rw_file_perms; 10allow hal_camera camera_device:chr_file rw_file_perms; 11allow hal_camera ion_device:chr_file rw_file_perms; 12allow hal_camera dmabuf_system_heap_device:chr_file r_file_perms; 13 14# Both the client and the server need to use the graphics allocator 15allow { hal_camera_client hal_camera_server } hal_graphics_allocator:fd use; 16 17# Allow hal_camera to use fd from app,gralloc,and ashmem HAL 18allow hal_camera { appdomain -isolated_app }:fd use; 19allow hal_camera surfaceflinger:fd use; 20allow hal_camera hal_allocator_server:fd use; 21 22# Needed to provide debug dump output via dumpsys' pipes. 23allow hal_camera shell:fd use; 24allow hal_camera shell:fifo_file write; 25 26### 27### neverallow rules 28### 29 30# hal_camera should never execute any executable without a 31# domain transition 32neverallow hal_camera_server { file_type fs_type }:file execute_no_trans; 33 34# hal_camera should never need network access. Disallow network sockets. 35neverallow hal_camera_server domain:{ tcp_socket udp_socket rawip_socket } *; 36 37# Only camera HAL may directly access the camera hardware 38neverallow { halserverdomain -hal_camera_server } camera_device:chr_file *; 39