saki4510t / OpenCVwithUVC

250 stars 108 forks source link

APK getting crashed on Intel Android platform #11

Open deval-vekaria opened 6 years ago

deval-vekaria commented 6 years ago

The apk works fine with ARM devices but i am facing issue with x86 arch. Can anyone please help? My usb cam is working with playstore app but not working with this source build. Moreover, does this apk require /dev/video0 node to be present?

04-06 02:01:56.409 14766 14766 W BaseActivity: type=1400 audit(0.0:29212): avc: denied { read } for name="stat" dev="proc" ino=4026532036 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0 04-06 02:01:56.410 14766 14783 E CpuMonitor: Cannot open /proc/stat for reading 04-06 02:01:56.542 11855 14796 D audio_route: Apply path: speaker 04-06 02:01:56.542 11855 14796 D audio_route: Apply path: main-mic 04-06 02:01:56.542 11855 14796 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted 04-06 02:01:56.590 11859 12256 D PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (783 us) 04-06 02:01:56.619 11939 14795 D vndksupport: Loading /vendor/lib64/hw/gralloc.android_ia.so from current namespace instead of sphal namespace. 04-06 02:01:56.624 12072 12226 D OpenGLRenderer: endAllActiveAnimators on 0x739244b58c00 (RippleDrawable) with handle 0x739242bfff00 04-06 02:01:56.627 11939 14795 I zygote64: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 04-06 02:01:56.627 11939 14795 E libEGL : eglSetBlobCacheFuncsANDROID resulted in an error: 0x300c 04-06 02:01:56.627 11939 14795 I OpenGLRenderer: Initialized EGL, version 1.4 04-06 02:01:56.627 11939 14795 D OpenGLRenderer: Swap behavior 2 04-06 02:01:56.643 11939 11955 D AutofillUI: destroySaveUiUiThread(): already destroyed 04-06 02:01:56.652 14766 14784 D UsbDeviceConnectionJNI: close 04-06 02:01:56.657 14766 14784 I USBMonitor: name=/dev/bus/usb/001/010,desc=56,busnum=1,devnum=10,rawDesc=[B@1942437 04-06 02:01:56.658 14766 14784 V MainActivity: onConnect: 04-06 02:01:56.658 14766 14787 V CameraThread: handleOpen: 04-06 02:01:56.658 14766 14787 V CameraThread: handleClose: 04-06 02:01:56.658 14766 14787 V CameraThread: handleStopRecording:mMuxer=null 04-06 02:01:56.658 14766 14787 V UVCCameraTextureView: setVideoEncoder: 04-06 02:01:56.658 14766 14787 E linker : "/data/app/com.serenegiant.opencvwithuvc-yg-x-SV-u21mwvBvzqWnHQ==/lib/x86/libjpeg-turbo1500.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23) --------- beginning of crash 04-06 02:01:56.659 14766 14787 E AndroidRuntime: FATAL EXCEPTION: CameraThread 04-06 02:01:56.659 14766 14787 E AndroidRuntime: Process: com.serenegiant.opencvwithuvc, PID: 14766 04-06 02:01:56.659 14766 14787 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.serenegiant.opencvwithuvc-yg-x-SV-u21mwvBvzqWnHQ==/lib/x86/libjpeg-turbo1500.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1016) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1657) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at com.serenegiant.usb.UVCCamera.(UVCCamera.java:119) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at com.serenegiant.usbcameracommon.AbstractUVCCameraHandler$CameraThread.handleOpen(AbstractUVCCameraHandler.java:443) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at com.serenegiant.usbcameracommon.AbstractUVCCameraHandler.handleMessage(AbstractUVCCameraHandler.java:300) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at com.serenegiant.usbcameracommon.UVCCameraHandlerMultiSurface.handleMessage(UVCCameraHandlerMultiSurface.java:33) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164) 04-06 02:01:56.659 14766 14787 E AndroidRuntime: at com.serenegiant.usbcameracommon.AbstractUVCCameraHandler$CameraThread.run(AbstractUVCCameraHandler.java:747) 04-06 02:01:56.660 14766 14797 V UVCCameraTextureView: RenderThread#setEncoder:encoder=null 04-06 02:01:56.660 14766 14784 V MainActivity: startPreview: 04-06 02:01:56.660 14766 14766 V UVCCameraTextureView: getPreviewTexture: 04-06 02:01:56.660 14766 14797 I UVCCameraTextureView: RenderThread#updatePreviewSurface: 04-06 02:01:56.660 14766 14797 V UVCCameraTextureView: updatePreviewSurface:tex_id=1 04-06 02:01:56.661 11939 13332 W ActivityManager: Force finishing activity com.serenegiant.opencvwithuvc/.MainActivity 04-06 02:01:56.661 14766 14766 V MainActivity: startImageProcessor: 04-06 02:01:56.662 14766 14787 I Process : Sending signal. PID: 14766 SIG: 9 04-06 02:01:56.662 4237 4237 W logcat : type=1400 audit(0.0:29213): avc: denied { dac_read_search } for capability=2 scontext=u:r:logsvc:s0 tcontext=u:r:logsvc:s0 tclass=capability permissive=0 04-06 02:01:56.664 3173 3173 D CRASHLOG: sdcard_allowed : Current crashlog mode is NOMINAL MODE - SDCard storage disabled. 04-06 02:01:56.673 11939 11999 W InputDispatcher: channel '83ca2d6 com.serenegiant.opencvwithuvc/com.serenegiant.opencvwithuvc.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 04-06 02:01:56.673 11939 11999 E InputDispatcher: channel '83ca2d6 com.serenegiant.opencvwithuvc/com.serenegiant.opencvwithuvc.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 04-06 02:01:56.674 11939 13094 I ActivityManager: Process com.serenegiant.opencvwithuvc (pid 14766) has died: vis +99TOP 04-06 02:01:56.674 11939 13404 I WindowManager: WIN DEATH: Window{83ca2d6 u0 com.serenegiant.opencvwithuvc/com.serenegiant.opencvwithuvc.MainActivity} 04-06 02:01:56.674 11939 13404 W InputDispatcher: Attempted to unregister already unregistered input channel '83ca2d6 com.serenegiant.opencvwithuvc/com.serenegiant.opencvwithuvc.MainActivity (server)' 04-06 02:01:56.674 11939 11956 W zygote64: kill(-14766, 9) failed: No such process 04-06 02:01:56.676 11939 11961 W ActivityManager: setHasOverlayUi called on unknown pid: 14766 04-06 02:01:56.682 11939 11956 W zygote64: kill(-14766, 9) failed: No such process 04-06 02:01:56.682 11939 11956 I zygote64: Successfully killed process cgroup uid 10074 pid 14766 in 8ms 04-06 02:01:56.692 3173 3173 E CRASHLOG: CRASH 26ce6fbf414c3fe1e550 2018-04-06/02:01:56 JAVACRASH /data/logs/crashlog40_26ce6fbf414c3fe1e550 04-06 02:01:56.701 13589 13589 I PhoneDoctor: CrashReport: init of parser container 04-06 02:01:56.702 13589 13589 I crashparsing: reading : chaabi_wdt_parser.json 04-06 02:01:56.702 13589 13589 I crashparsing: reading : fabric_xml_parser.json 04-06 02:01:56.702 13589 13589 I crashparsing: reading : insterr_parser.json 04-06 02:01:56.702 13589 13589 I crashparsing: reading : kernel_hang_parser.json 04-06 02:01:56.703 13589 13589 I crashparsing: reading : mem_err_parser.json 04-06 02:01:56.703 13589 13589 I crashparsing: reading : northfuse_err_parser.json 04-06 02:01:56.703 13589 13589 I crashparsing: reading : pll_locker_parser.json 04-06 02:01:56.703 13589 13589 I crashparsing: reading : punit_mbb_timeout_parser.json 04-06 02:01:56.703 13589 13589 I crashparsing: reading : scu_wdt_parser.json 04-06 02:01:56.704 13589 13589 I crashparsing: reading : sram_ecc_err_parser.json 04-06 02:01:56.704 13589 13589 I crashparsing: reading : undefl1_err_parser.json 04-06 02:01:56.704 13589 13589 I crashparsing: reading : voltk_err_parser.json 04-06 02:01:56.704 13589 13589 I crashparsing: reading : voltsaiatk_err_parser.json 04-06 02:01:56.704 13589 13589 I crashparsing: reading post : gnss.json 04-06 02:01:56.705 13589 13589 I PhoneDoctor: CrashReport: 16 parser(s) found

deval-vekaria commented 6 years ago

Can anyone please have a look at this.. I am using x86 arch and probably issue is due to below (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23)

ArasiAsan commented 6 years ago

Change the targetAPI level to 22 from 23, It might work.