嵌入式爱好者

查看: 3024|回复: 1

[Android] V4L2没办法打开摄像头

[复制链接]

2

主题

3

帖子

13

积分

A40i/T3/T507/T527通行证

扫一扫,手机访问本帖
发表于 2021-12-8 20:14:35 | 显示全部楼层 |阅读模式
通过jni调用c++ .so
.so里面要通过v4l2取数据,但是第一步查询状态就失败了。
提示avc: denied

网上查了一大堆都没办法解决。不知道各位大神有没办法。

[ 2456.730005] type=1400 audit(1638956391.976:15462): avc: denied { getattr } for comm="e.cameracap1207" path="/dev/video1" dev="tmpfs" ino=4500 scontext=u:r:system_app:s0 tcontext=u:object_r:video_device:s0 tclass=chr_file permissive=0
[ 2456.753693] type=1400 audit(1638956391.976:15462): avc: denied { getattr } for comm="e.cameracap1207" path="/dev/video1" dev="tmpfs" ino=4500 scontext=u:r:system_app:s0 tcontext=u:object_r:video_device:s0 tclass=chr_file permissive=0
[ 2456.777096] type=1400 audit(1638956391.976:15463): avc: denied { getattr } for comm="e.cameracap1207" path="/dev/video2" dev="tmpfs" ino=491 scontext=u:r:system_app:s0 tcontext=u:object_r:video_device:s0 tclass=chr_file permissive=0
[ 2456.800643] type=1400 audit(1638956391.976:15463): avc: denied { getattr } for comm="e.cameracap1207" path="/dev/video2" dev="tmpfs" ino=491 scontext=u:r:system_app:s0 tcontext=u:object_r:video_device:s0 tclass=chr_file permissive=0
[ 2456.824072] type=1400 audit(1638956391.976:15464): avc: denied { getattr } for comm="e.cameracap1207" path="/dev/video3" dev="tmpfs" ino=488 scontext=u:r:system_app:s0 tcontext=u:object_r:video_device:s0 tclass=chr_file permissive=0

回复

使用道具 举报

9

主题

25

帖子

63

积分

A40i/T3/T507/T527通行证

发表于 2022-2-9 16:02:32 | 显示全部楼层
调试阶段    命令行输入getenforce ,看看selinux是否关闭,如没有关闭,输入setenforce 0,关闭selinux权限
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-4-26 05:14

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表