Selinux denials while trying to open camera device when targeting to Android 10

Viewed 481

Device: Oneplus 7 Pro, Android 10. My app uses Camera2 api to open camera device and capture photo (actually, that's one of libraries, not app itself). As long as I'm targeting to api 28, all is fine. But after changing target api to 29, it freezes due to selinux denials:

2019-10-22 11:32:17.734 4305-4305/? I/CameraManagerGlobal: Connecting to camera service 2019-10-22 11:32:17.726 4305-4305/? W/my.app: type=1400 audit(0.0:44232): avc: denied { read } for name="u:object_r:persist_camera_prop:s0" dev="tmpfs" ino=17156 scontext=u:r:untrusted_app_27:s0:c120,c257,c512,c768 tcontext=u:object_r:persist_camera_prop:s0 tclass=file permissive=0 2019-10-22 11:32:17.726 4305-4305/? W/my.app: type=1400 audit(0.0:44233): avc: denied { read } for name="u:object_r:persist_camera_prop:s0" dev="tmpfs" ino=17156 scontext=u:r:untrusted_app_27:s0:c120,c257,c512,c768 tcontext=u:object_r:persist_camera_prop:s0 tclass=file permissive=0 2019-10-22 11:32:17.738 4305-4305/? E/libc: Access denied finding property "vendor.camera.aux.packagelist" 2019-10-22 11:32:17.738 4305-4305/? I/chatty: uid=10376(my.app) identical 1 line 2019-10-22 11:32:17.738 4305-4305/? E/libc: Access denied finding property "vendor.camera.aux.packagelist" 2019-10-22 11:32:17.738 4305-4305/? W/CameraManagerGlobal: [soar.cts] ignore the status update of camera: 2 2019-10-22 11:32:17.738 4305-4305/? E/libc: Access denied finding property "vendor.camera.aux.packagelist" 2019-10-22 11:32:17.738 4305-4305/? W/CameraManagerGlobal: [soar.cts] ignore the status update of camera: 3 2019-10-22 11:32:17.739 4305-4305/? E/libc: Access denied finding property "vendor.camera.aux.packagelist" 2019-10-22 11:32:17.739 4305-4305/? W/CameraManagerGlobal: [soar.cts] ignore the status update of camera: 4 2019-10-22 11:32:17.726 4305-4305/? W/my.app: type=1400 audit(0.0:44234): avc: denied { read } for name="u:object_r:persist_camera_prop:s0" dev="tmpfs" ino=17156 scontext=u:r:untrusted_app_27:s0:c120,c257,c512,c768 tcontext=u:object_r:persist_camera_prop:s0 tclass=file permissive=0 2019-10-22 11:32:17.739 4305-4305/? E/libc: Access denied finding property "vendor.camera.aux.packagelist" 2019-10-22 11:32:17.739 4305-4305/? W/CameraManagerGlobal: [soar.cts] ignore the status update of camera: 5 2019-10-22 11:32:17.739 4305-4305/? E/libc: Access denied finding property "vendor.camera.aux.packagelist" 2019-10-22 11:32:17.739 4305-4535/? E/libc: Access denied finding property "vendor.camera.aux.packagelist" 2019-10-22 11:32:17.726 4305-4305/? W/my.app: type=1400 audit(0.0:44235): avc: denied { read } for name="u:object_r:persist_camera_prop:s0" dev="tmpfs" ino=17156 scontext=u:r:untrusted_app_27:s0:c120,c257,c512,c768 tcontext=u:object_r:persist_camera_prop:s0 tclass=file permissive=0

So it looks like SELinux prevents my app from using the camera hardware. Any ideas why?

0 Answers
Related