UVC的项目,在Android10以上系统运行后报错:User has not given permission to access device /dev/bus/usb/005/002

对比了一下发现是UsbDevice.getSerialNumber()的时候报的异常,尝试搜了一些资料无果,于是与android8系统对比了一下,将这里强行定制化了。

因为我们是用固定的摄像头去生产产品,即使这里不改其他地方也有限制,所以直接在这里改了。

尝试了下网上开源的UVC项目也是崩溃,git项目也没有在维护了。

有一个权限的开源项目不知道能不能行,这里记录一下:

https://github/felHR85/UsbSerial

更多推荐

android10+ User has not given permission to access device /dev/bus/usb/005/002