openxc/android-webcam

Insufficient permissions, /dev/video4 owned by system user

btut opened this issue · 7 comments

btut commented

Hi,
I tried to compile your example and I am having problems getting it to run. When I can see the line "Insufficient permissions on /dev/video4 -- does the app have the CAMERA permission?". I am sure video4 is the right device since it appears only when the camera is attached via USB.
I did not change anything else in the library or your example. Any idea on how to resolve this?
Thank you!

btut commented

btw, I am using a Samsung Galaxy S5 with Android 5.0

Same issue have you found solution bcs Library already have camera permission in menifest in CameraActivity.

btut commented

Hi,
no, unfortunately I have not found any solution. I can see that the kernel flags that are required are enabled, and video4 shows up with permissions 0660, but is owned not by media but by system. I do not know how to resolve this, any input by the developer would be great!

btut commented

@peplin have you ever experienced this? Any input would be highly appreciated. I checked for the kernel extensions and everything seems to be ok, I don't know where the issue might lie.

Hey, sorry, no I've never experienced any of this - I only ever used this library on one or two devices back on Android 4.x.

btut commented

Thanks for your reply. I downgraded to 4.4, didn't change anything unfortunately. Let's see if I can get this to work.

I had a similar issue where the /dev/video3 (that the one in my device) is owned by system. So I've run chown media /dev/video3 and had it now owned by media user as suggested in the README. Now the only problem is that I am still getting the same error

12-01 17:46:22.044 20837 20837 I WebcamManager: Service starting
12-01 17:46:22.053 20837 20837 W d.openxc.webcam: type=1400 audit(0.0:100): avc: denied { read } for name="video3" dev="tmpfs" ino=192720 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:video_device:s0 tclass=chr_file permissive=0
12-01 17:46:22.055 20837 20837 D NativeWebcam: Insufficient permissions on /dev/video3 -- does the app have the CAMERA permission?
12-01 17:46:22.055 20837 20837 I WebcamManager: Service binding in response to Intent { cmp=com.ford.openxc.webcam/.WebcamManager }
12-01 17:46:22.064 20837 20837 I WebcamPreview: Bound to WebcamManager
12-01 17:46:22.067 20837 20853 E NativeWebcamJNI: Unable to load frame, buffers not initialized