Android NDK open() device permission denied

后端 未结 3 1923
不思量自难忘°
不思量自难忘° 2020-12-21 17:07

In a native call, I\'m trying to open(\"/dev/video4\", O_RDWR) but I get errno EACCES 13 \"permission denied\".

If I run the same code* in an executable

3条回答
  •  生来不讨喜
    2020-12-21 17:31

    Since you get an error when running your code from an Android Java application, I would guess that you are missing a permission. It's the camera that you are trying to access, if I am not mistaken, so if you add:

     
    

    to your AndroidManifest.xml, your application should run fine.

提交回复
热议问题