大号的Android 5.0及放大器; libusb的1.0.9 - 没有权限? [英] Android L 5.0 & libusb 1.0.9 - no permissions?
问题描述
目前,我有一个Android应用程序通过USB OTG连接的设备。 通信是通过使用的libusb 1.0.9,它的工作pretty的以及其它设备与API级< 21。 (通信必须是本机由于性能问题) 当运行Android的下L时应用程序,我从libusb_init(NULL)以下错误:
I currently have an Android application connecting to a device via 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):
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)
我编译的libusb 1.0.9采用最新的NDK 10C在我的Nexus 5。 我不认为这是技术运行问题,因为该应用程序的工作原理在Android 4.4.4与ART启用替代的Dalvik。 任何人都熟悉这个问题? (<一href="http://stackoverflow.com/questions/25662307/android-libusb-init-returns-libusb-error-other-99/26034824#26034824">this类似于) 可这涉及到PIE?
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. Anyone familiar with this issue? (this looks similar ) Can this be related to PIE?
感谢你。
推荐答案
我上传了一个解决方案,工程。 它是基于libusb的1.0.9和棒棒堂的工作。
I uploaded a solution that works. it's based on libusb 1.0.9 and working with Lollipop.
https://github.com/Gritzman/libusb
这篇关于大号的Android 5.0及放大器; libusb的1.0.9 - 没有权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!