简体   繁体   English

Android L 5.0和libusb 1.0.9 - 没有权限?

[英]Android L 5.0 & libusb 1.0.9 - no permissions?

I currently have an Android application connecting to a device via USB OTG. 我目前有一个Android应用程序通过USB OTG连接到设备。 The communication is done using the libusb 1.0.9 and it's working pretty well for other devices with api level < 21. (The communication must be native due to performance issues) When running the app under Android L, I get the following error from libusb_init(NULL): 使用libusb 1.0.9进行通信,并且它对api级别<21的其他设备运行良好。(由于性能问题,通信必须是原生的)在Android L下运行应用程序时,我从libusb_init收到以下错误(空值):

type=1400 audit(0.0:107): avc: denied { read } for name="usb" dev="tmpfs" ino=24433 scontext=u:r:untrusted_app:s0 tcontext=u: object_r:usb_device:s0 tclass=dir
A/libc(12605): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 12605 (mapp.sdk.sample)

I'm compiling libusb 1.0.9 using latest NDK 10c on my Nexus 5. I don't think it's ART runtime issue as the app works on Android 4.4.4 with ART enabled instead of Dalvik. 我正在使用我的Nexus 5上的最新NDK 10c编译libusb 1.0.9。我不认为它是ART运行时问题,因为该应用程序适用于Android 4.4.4,启用ART而不是Dalvik。 Anyone familiar with this issue? 有谁熟悉这个问题? ( this looks similar ) Can this be related to PIE? 看起来很相似)这可能与PIE有关吗?

Thank you. 谢谢。

I uploaded a solution that works. 我上传了一个有效的解决方案。 it's based on libusb 1.0.9 and working with Lollipop. 它基于libusb 1.0.9并与Lollipop合作。

https://github.com/Gritzman/libusb https://github.com/Gritzman/libusb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM