librealsense: Android, D415, rs2:backend_error, Permission Denied
Required Info | |
---|---|
Camera Model | D415 |
Firmware Version | 05.08.15.00 |
Operating System & Version | MacOS 10.14.1 / Android 7.1.1 |
Platform | PC/Android |
SDK Version | 2 |
Language | Java/C |
Segment | Tablet? |
Issue Description
I have a rooted Lenovo Tab 4 8" running Android 7.1.1
I have successfully compiled the Android version of the project.
I have connected the camera to my tablet using two cables:
- USB mini A to USB A (UGREEN Micro USB to USB, Micro USB 2.0 OTG Cable 2 Pack On The Go Adapter Micro USB Male to USB Female)
- USB A to USB C (supplied with D415)
When I launch “realsense_app”, it correctly detects the presence of the camera (ie. error if usb is not connected.) However, quickly after that, the application crashes:
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2018-12-13 13:26:11.563 12956-12956/? A/DEBUG: Abort message: '/Volumes/Android/buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type rs2::backend_error: Could not open device. Last Error: Permission denied" failed'
2018-12-13 13:26:11.563 12956-12956/? A/DEBUG: r0 00000000 r1 00003261 r2 00000006 r3 00000008
2018-12-13 13:26:11.563 12956-12956/? A/DEBUG: r4 d8460978 r5 00000006 r6 d8460920 r7 0000010c
2018-12-13 13:26:11.563 12956-12956/? A/DEBUG: r8 ffc3769c r9 f03db180 sl e9b06929 fp 0000000b
2018-12-13 13:26:11.563 12956-12956/? A/DEBUG: ip 0000000d sp d8460220 lr f25d6467 pc f25d8ce8 cpsr 200e0010
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: backtrace:
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #00 pc 00049ce8 /system/lib/libc.so (tgkill+12)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #01 pc 00047463 /system/lib/libc.so (pthread_kill+34)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #02 pc 0001d745 /system/lib/libc.so (raise+10)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #03 pc 00019281 /system/lib/libc.so (__libc_android_abort+34)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #04 pc 000172e8 /system/lib/libc.so (abort+4)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #05 pc 0001b73f /system/lib/libc.so (__libc_fatal+22)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #06 pc 0001947b /system/lib/libc.so (__assert2+18)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #07 pc 0082e6e9 /data/app/com.example.realsense_app-1/lib/arm/librealsense2.so
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #08 pc 0082e7f5 /data/app/com.example.realsense_app-1/lib/arm/librealsense2.so
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #09 pc 0082cb95 /data/app/com.example.realsense_app-1/lib/arm/librealsense2.so
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #10 pc 0082c7a7 /data/app/com.example.realsense_app-1/lib/arm/librealsense2.so (__cxa_rethrow+78)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #11 pc 0000adaf /data/app/com.example.realsense_app-1/lib/arm/libnative-lib.so
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #12 pc 0000a9e3 /data/app/com.example.realsense_app-1/lib/arm/libnative-lib.so
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #13 pc 00046f33 /system/lib/libc.so (_ZL15__pthread_startPv+22)
2018-12-13 13:26:11.573 12956-12956/? A/DEBUG: #14 pc 00019ccd /system/lib/libc.so (__start_thread+6)
With the primary error being the following exception:
rs2::backend_error: Could not open device. Last Error: Permission denied" failed'
I traced this error to the function power_D0()
inside of libuvc/libuvc.cpp
. It looks like uvc_find_device()
returns 0, so then it calls uvc_open2
with interface=0
and returns res=-3
causing the following exception to be thrown. Error -3
appears to be LIBUSB_ERROR_ACCESS
from libusb_open
which corresponds to “Access denied (insufficient permissions)”.
I’ve checked that the USB device permissions are okay: when my camera is connected, I see 2 USB devices, 001/001 and 001/002, and I’ve chmod -R 0777 the appropriate files.
Any ideas?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (2 by maintainers)
Commits related to this issue
- Merge PR #2891 from Arun-Prasad-V: revert PR2872 — committed to gwen2018/librealsense by SamerKhshiboun 9 months ago
Ah, thank you, the lagging camera firmware was the culprit.