0

I need to access an USB camera connected to my (rooted) Android. I'm on a Samsung Galaxy S4 with Android 4.2.2. I want to access it with a normal app, so I need the device to be world readable.

I can connect via shell and type

root@android:/ # su
root@android:/ # cd /dev
root@android:/dev # chmod 666 video4

and it works. But each time I disconnect the camera, and reconnect it, I have to do it again.

Via shell I can remount the root file system r/w

mount -o rw,remount -t rootfs rootfs /

and then edit the file /ueventd.rc (actually it's /ueventd.qcom.rc )

and add

/dev/video*               0666   system     camera

But even if I put 666 I only get

root@android:/dev # ls -la video4                                              
crw-rw---- system   camera    81,  18 2013-08-08 10:14 video4

Is there a way to grant a 666 permission permanently? So that each time I connect the camera it gets the right file permissions?

Thanks

migrated from serverfault.com Aug 8 '13 at 10:44

This question came from our site for system and network administrators.

  • Well, if you look at the standard rights for video4, the group "camera" also has read and write access to it. Is there any reason you couldn't just add every user on the system to the "camera" group? – pzkpfw Aug 8 '13 at 11:19
  • Do i need root permission to access /dev/video1? or is there any other possibility without rooting phone? please let me know – ankita gahoi Aug 22 '13 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy