diff --git a/edgetpu/debug_camera_app.te b/edgetpu/debug_camera_app.te new file mode 100644 index 00000000..44382239 --- /dev/null +++ b/edgetpu/debug_camera_app.te @@ -0,0 +1,5 @@ +userdebug_or_eng(` + # Allows GCA-Eng to find and access the EdgeTPU. + allow debug_camera_app edgetpu_app_service:service_manager find; + allow debug_camera_app edgetpu_device:chr_file { getattr read write ioctl map }; +') \ No newline at end of file diff --git a/edgetpu/file_contexts b/edgetpu/file_contexts new file mode 100644 index 00000000..ef141fdd --- /dev/null +++ b/edgetpu/file_contexts @@ -0,0 +1,2 @@ +# EdgeTPU device (DarwiNN) +/dev/edgetpu-soc u:object_r:edgetpu_device:s0 diff --git a/edgetpu/genfs_contexts b/edgetpu/genfs_contexts new file mode 100644 index 00000000..8123a73c --- /dev/null +++ b/edgetpu/genfs_contexts @@ -0,0 +1,2 @@ +# EdgeTPU +genfscon sysfs /devices/platform/1ce00000.rio u:object_r:sysfs_edgetpu:s0 diff --git a/edgetpu/google_camera_app.te b/edgetpu/google_camera_app.te new file mode 100644 index 00000000..a0ad7316 --- /dev/null +++ b/edgetpu/google_camera_app.te @@ -0,0 +1,3 @@ +# Allows GCA to find and access the EdgeTPU. +allow google_camera_app edgetpu_app_service:service_manager find; +allow google_camera_app edgetpu_device:chr_file { getattr read write ioctl map };