Android P Auto版本evs_app解析之二:evs_app启动和运行

本文详细介绍了在调试Android Auto版本的evs_app程序时遇到的摄像头设备检查、启动权限问题及解决方案。通过修改驱动层代码、赋予权限,最终成功运行evs_app并进入摄像头画面。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近在调试Android Auto版本的evs_app程序。

evs_app相关参考:
《Android P Auto版本evs_app解析之一:evs_app代码架构和通信机制》
《Android P Auto版本evs_app解析之二:evs_app启动和运行》

一、检查摄像头设备

驱动层生成的摄像头设备节点在dev下面查看。adb进入系统目录dev下,ls -l查看摄像头;
生成的摄像头为:dev/video0,dev/video1,dev/video2,dev/video3;
我做实验这里有四个摄像头。

二、运行evs_app程序报错

evs_app是可执行的二进制文件,在system/bin目录下。
adb shell进入系统目录,执行start evs_app启动evs_app.

1、驱动层代码报错

看下面的打印,没有权限对video*设备进行访问。所以没有找到有效的摄像头设备

2019-06-13 18:14:16.420 1909-1963/? I/EvsDriver: Starting dev/video* enumeration
2019-06-13 18:14:16.428 1909-1909/? W/VideoFile-Poll-: type=1400 audit(0.0:2044): avc: denied { read write } for name="video3" dev="tmpfs" ino=9980 scontext=u:r:hal_evs_driver:s0 tcontext=u:object_r:ad_camera_device:s0 tclass=chr_file permissive=0
2019-06-13 18:14:16.428 1909-1909/? W/VideoFile-Poll-: type=1400 audit(0.0:2045): avc: denied { read write } for name="video2" dev="tmpfs" ino=9979 scontext=u:r:hal_evs_driver:s0 tcontext=u:object_r:ad_camera_device:s0 tclass=chr_file permissive=0
2019-06-13 18:14:16.428 1909-1909/? W/VideoFile-Poll-: type=1400 audit(0.0:2046): avc: denied { read write } for name="video1" dev="tmpfs" ino=9978 scontext=u:r:hal_evs_driver:s0 tcontext=u:object_r:ad_camera_device:s0 tclass=chr_file permissive=0
2019-06-13 18:14:16.428 1909-1909/? W/VideoFile-Poll-: type=1400 audit(0.0:2047): avc: denied { read write } for name="video0" dev="tmpfs" ino=20016 scontext=u:r:hal_evs_driver:s0 tcontext=u:object_r:ad_camera_device:s0 tclass=chr_file permissive=0
2019-06-13 18:14:16.431 1909-1963/? I/EvsDriver: enum name:mxc_isi.0.m2m
     path:/dev/video4
2019-06-13 18:14:16.434 1909-1963/? I/EvsDriver: Found 1 qualified video capture devices of 7 checked
2、evs_app应用层也报错提示没有找到摄像头
2019-06-13 18:53:38.331 1909-1909/? D/EvsDriver: openCamera
2019-06-13 18:53:38.331 1909-1909/? E/EvsDriver: Requested camera mxc_isi.0.capture not found
2019-06-13 18:53:38.332 3272-3274/? E/EvsApp: Failed to allocate new EVS Camera interface for mxc_isi.0.capture
2019-06-13 18:53:38.332 3272-3274/? E/EvsApp: Failed to set up video texture for mxc_isi.0.capture (reverse,park)
2019-06-13 18:53:38.332 3272-3274/? E/EvsApp: New renderer failed to activate
2019-06-13 18:53:38.332 3272-3274/? E/EvsApp: selectStateForCurrentConditions failed so we're going to die
2019-06-13 18:53:38.332 3272-3274/? W/EvsApp: EvsSt
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sunxiaolin2016

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值