1# Domain for DeviceAsWebcam Service 2type device_as_webcam, domain, coredomain, mlstrustedsubject; 3 4app_domain(device_as_webcam) 5 6allow device_as_webcam system_app_data_file:dir create_dir_perms; 7allow device_as_webcam system_app_data_file:file create_file_perms; 8 9allow device_as_webcam { app_api_service cameraserver_service }:service_manager find; 10 11# Allow DeviceAsWebcam Service needs to access ro.usb.uvc.enabled property to 12# enale/disable itself 13get_prop(device_as_webcam, usb_uvc_enabled_prop) 14 15# need to access /dev to list all devices 16allow device_as_webcam device:dir r_dir_perms; 17 18# UVC nodes are mounted as V4L2 nodes (/dev/video*) on the device. These need to 19# be accessed by the DeviceAsWebcam Service. 20allow device_as_webcam video_device:dir r_dir_perms; 21allow device_as_webcam video_device:chr_file rw_file_perms; 22