[ONE Android Development] iso2k:
I have problem with my camera. The error message is "Can not connect to camera". Neither the preinstalled camera app nor for example QR scanner are working.

I tried:

- clean dalvik/cache

- TWRP -> advanced -> selinux contexts

- dirty flash rom again

- change SELinux state with "Magisk SELinux Manager"

Nothing worked.

Im using TWRP 3.2.2-0. Cache and Data are F2FS. Device is encrypted. Omni is the recent "8.1.0-20180708-find7op-WEEKLY"

Here is the log from MatLog when i start the camera:

07-12 00:09:11.339 D/OpenGLRenderer(10343): endAllActiveAnimators on 0x8c88f780 (MenuPopupWindow$MenuDropDownListView) with handle 0x9f9e08f0
07-12 00:09:14.943 I/ActivityManager(3036): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher3/.Launcher (has extras)} from uid 1000
07-12 00:09:15.054 W/Adreno-EGL(5641): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:15.056 D/vndksupport(5641): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:15.534 I/OpenGLRenderer(3036): Initialized EGL, version 1.4
07-12 00:09:15.535 D/OpenGLRenderer(3036): Swap behavior 1
07-12 00:09:15.539 W/Adreno-EGL(3036): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:15.578 W/OpenGLRenderer(5641): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
07-12 00:09:15.578 W/OpenGLRenderer(5641): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
07-12 00:09:15.657 I/zygote (3036): NativeAlloc concurrent copying GC freed 63305(3MB) AllocSpace objects, 28(800KB) LOS objects, 42% free, 10MB/18MB, paused 635us total 124.027ms
07-12 00:09:16.310 I/ActivityManager(3036): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.omnirom.snap/com.android.camera.CameraLauncher bnds=[450,1708][657,1946]} from uid 10040
07-12 00:09:16.347 I/ActivityManager(3036): Start proc 10437:org.omnirom.snap/u0a97 for activity org.omnirom.snap/com.android.camera.CameraLauncher
07-12 00:09:16.465 I/zygote (10437): The ClassLoaderContext is a special shared library.
07-12 00:09:16.496 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_VGA
07-12 00:09:16.496 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_VGA
07-12 00:09:16.496 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_4KDCI
07-12 00:09:16.496 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_4KDCI
07-12 00:09:16.496 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_TIME_LAPSE_VGA
07-12 00:09:16.496 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_TIME_LAPSE_VGA
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_TIME_LAPSE_4KDCI
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_TIME_LAPSE_4KDCI
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_HIGH_SPEED_CIF
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_HIGH_SPEED_CIF
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_HIGH_SPEED_VGA
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_HIGH_SPEED_VGA
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_HIGH_SPEED_4KDCI
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_HIGH_SPEED_4KDCI
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_QHD
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_QHD
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile field:QUALITY_2k
07-12 00:09:16.497 D/Wrapper (10437): getField:class android.media.CamcorderProfile QUALITY_2k
07-12 00:09:16.502 I/CameraManagerGlobal(10437): Connecting to camera service
07-12 00:09:16.554 D/CAM_Activity(10437): Camera API 2 supported: false
07-12 00:09:16.554 D/CAM_Activity(10437): Camera API 2 enabled: false
07-12 00:09:16.649 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:FACE_DETECTION_ON
07-12 00:09:16.646 I/rg.omnirom.snap(10437): type=1400 audit(0.0:397): avc: denied { read } for name="u:object_r:camera_prop:s0" dev="tmpfs" ino=6943 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:camera_prop:s0 tclass=file permissive=1
07-12 00:09:16.646 I/rg.omnirom.snap(10437): type=1400 audit(0.0:398): avc: denied { open } for name="u:object_r:camera_prop:s0" dev="tmpfs" ino=6943 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:camera_prop:s0 tclass=file permissive=1
07-12 00:09:16.650 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters FACE_DETECTION_ON
07-12 00:09:16.651 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:FACE_DETECTION_OFF
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters FACE_DETECTION_OFF
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:ZSL_OFF
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters ZSL_OFF
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:TOUCH_AF_AEC_ON
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters TOUCH_AF_AEC_ON
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:TOUCH_AF_AEC_OFF
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters TOUCH_AF_AEC_OFF
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:DENOISE_OFF
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters DENOISE_OFF
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:DENOISE_ON
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters DENOISE_ON
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:ISO_AUTO
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters ISO_AUTO
07-12 00:09:16.652 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters field:FOCUS_MODE_MANUAL_POSITION
07-12 00:09:16.653 D/Wrapper (10437): getField:class android.hardware.Camera$Parameters FOCUS_MODE_MANUAL_POSITION
07-12 00:09:16.646 I/rg.omnirom.snap(10437): type=1400 audit(0.0:399): avc: denied { getattr } for path="/dev/__properties__/u:object_r:camera_prop:s0" dev="tmpfs" ino=6943 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:camera_prop:s0 tclass=file permissive=1
07-12 00:09:16.665 W/SoundPool(10437): Use of stream types is deprecated for operations other than volume control
07-12 00:09:16.665 W/SoundPool(10437): See the documentation of SoundPool() for what to use instead with android.media.AudioAttributes to qualify your playback use case
07-12 00:09:16.666 V/NuMediaExtractor(10437): setDataSource fd=37 (/system/app/SnapdragonCamera2/SnapdragonCamera2.apk), offset=3370284, length=6656
07-12 00:09:16.674 V/NuMediaExtractor(10437): track of type 'audio/vorbis' does not publish bitrate
07-12 00:09:16.686 I/OMXMaster(2988): makeComponentInstance(OMX.google.vorbis.decoder) in android.hardwar process
07-12 00:09:16.690 E/OMXNodeInstance(2988): getConfig(0xb4aaac00:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
07-12 00:09:16.740 V/CAM_UI (10437): Using mdp_preview_content (MDP path)
07-12 00:09:16.745 V/CAM_PhotoModule(10437): Open camera device.
07-12 00:09:16.748 V/CameraHolder(10437): open camera 0
07-12 00:09:16.750 V/CAM_AndroidCameraManagerImpl(10437): openLegacy failed. Using open instead
07-12 00:09:16.751 E/CameraHolder(10437): fail to connect Camera:-1, aborting.
07-12 00:09:16.752 E/CAM_PhotoModule(10437): Failed to open camera:0
07-12 00:09:16.778 V/NuMediaExtractor(10437): setDataSource fd=39 (/system/app/SnapdragonCamera2/SnapdragonCamera2.apk), offset=3377000, length=6979
07-12 00:09:16.779 V/CAM_PhotoModule(10437): On resume.
07-12 00:09:16.779 V/CAM_PhotoModule(10437): Executing onResumeTasks.
07-12 00:09:16.781 I/qti_sensors_hal(3036): AK8963 Magnetometer: batch 5.00 inf
07-12 00:09:16.781 I/qti_sensors_hal(3036): AK8963 Magnetometer: activate=1
07-12 00:09:16.784 V/NuMediaExtractor(10437): track of type 'audio/vorbis' does not publish bitrate
07-12 00:09:16.796 W/SoundPool(10437): Use of stream types is deprecated for operations other than volume control
07-12 00:09:16.796 W/SoundPool(10437): See the documentation of SoundPool() for what to use instead with android.media.AudioAttributes to qualify your playback use case
07-12 00:09:16.796 I/OMXMaster(2988): makeComponentInstance(OMX.google.vorbis.decoder) in android.hardwar process
07-12 00:09:16.796 D/CAM_Activity(10437): send the turn off Flashlight broadcast
07-12 00:09:16.800 V/NuMediaExtractor(10437): setDataSource fd=46 (/system/app/SnapdragonCamera2/SnapdragonCamera2.apk), offset=3386052, length=21306
07-12 00:09:16.800 E/OMXNodeInstance(2988): getConfig(0xb4aaa7e0:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
07-12 00:09:16.815 D/OpenGLRenderer(10437): HWUI GL Pipeline
07-12 00:09:16.821 V/NuMediaExtractor(10437): track of type 'audio/vorbis' does not publish bitrate
07-12 00:09:16.832 I/OMXMaster(2988): makeComponentInstance(OMX.google.vorbis.decoder) in android.hardwar process
07-12 00:09:16.834 E/OMXNodeInstance(2988): getConfig(0xb4aab260:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
07-12 00:09:16.859 D/CAM_PhotoModule(10437): addIdleHandler in first time initialization
07-12 00:09:16.865 D/CameraStorage(10437): External storage state=mounted
07-12 00:09:16.868 I/chatty (10437): uid=10097(org.omnirom.snap) identical 1 line
07-12 00:09:16.871 D/CameraStorage(10437): External storage state=mounted
07-12 00:09:16.893 V/CAM_UI (10437): setTransformMatrix: scaledTextureWidth = 1080.0, scaledTextureHeight = 1440.0
07-12 00:09:16.893 D/CAM_UI (10437): mSurfaceTextureUncroppedWidth=1080.0mSurfaceTextureUncroppedHeight=1440.0
07-12 00:09:16.897 I/Adreno-EGL(10437): <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca)
07-12 00:09:16.897 I/Adreno-EGL(10437): OpenGL ES Shader Compiler Version: E031.29.00.00
07-12 00:09:16.897 I/Adreno-EGL(10437): Build Date: 04/04/16 Mon
07-12 00:09:16.897 I/Adreno-EGL(10437): Local Branch: mybranch19053788
07-12 00:09:16.897 I/Adreno-EGL(10437): Remote Branch: quic/LA.BF.1.1.3_rb1.12
07-12 00:09:16.897 I/Adreno-EGL(10437): Local Patches: NONE
07-12 00:09:16.897 I/Adreno-EGL(10437): Reconstruct Branch: NOTHING
07-12 00:09:16.903 I/org.omnirom.snap(10437): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
07-12 00:09:16.903 I/OpenGLRenderer(10437): Initialized EGL, version 1.4
07-12 00:09:16.903 D/OpenGLRenderer(10437): Swap behavior 1
07-12 00:09:16.910 W/Adreno-EGL(10437): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:16.913 W/Adreno-EGL(10437): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:16.915 D/vndksupport(10437): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:16.922 V/CAM_UI (10437): surfaceCreated
07-12 00:09:16.922 V/CAM_UI (10437): surfaceChanged: width =1080, height = 1920
07-12 00:09:16.928 D/SurfaceFlinger(262): duplicate layer name: changing org.omnirom.snap/com.android.camera.CameraLauncher to org.omnirom.snap/com.android.camera.CameraLauncher#1
07-12 00:09:16.942 W/Adreno-EGL(10437): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:16.943 D/vndksupport(10437): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:16.946 D/SurfaceFlinger(262): duplicate layer name: changing org.omnirom.snap/com.android.camera.CameraLauncher to org.omnirom.snap/com.android.camera.CameraLauncher#2
07-12 00:09:16.959 W/Adreno-EGL(10437): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:16.961 D/vndksupport(10437): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:16.998 W//system/bin/hwservicemanager(211): getTransport: Cannot find entry android.hardware.graphics.mapper@2.0::IMapper/default in either framework or device manifest.
07-12 00:09:16.999 D/vndksupport(10437): Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
07-12 00:09:17.000 D/vndksupport(10437): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:17.046 I/ActivityManager(3036): Displayed org.omnirom.snap/com.android.camera.CameraLauncher: +700ms
07-12 00:09:19.094 I/qti_sensors_hal(3036): LIS3DH Accelerometer: batch 15.00 10.00
07-12 00:09:19.097 V/CAM_UI (10437): surfaceDestroyed
07-12 00:09:19.098 E/SurfaceFlinger(262): Failed to find layer (SurfaceView - org.omnirom.snap/com.android.camera.CameraLauncher#0) in layer parent (no-parent).
07-12 00:09:19.098 E/SurfaceFlinger(262): Failed to find layer (Background for - SurfaceView - org.omnirom.snap/com.android.camera.CameraLauncher#0) in layer parent (no-parent).
07-12 00:09:19.098 I/qti_sensors_hal(3036): LIS3DH Accelerometer: batch 15.00 10.00
07-12 00:09:19.099 I/qti_sensors_hal(3036): AK8963 Magnetometer: activate=0
07-12 00:09:19.103 D/CAM_PhotoModule(10437): remove idle handleer in onPause
07-12 00:09:19.103 V/CAM_PhotoModule(10437): On pause.
07-12 00:09:19.107 V/CAM_PhotoModule(10437): Close camera device.
07-12 00:09:19.236 W/Adreno-EGL(5641): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:19.238 D/vndksupport(5641): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:19.569 E/WindowManager(10437):
07-12 00:09:19.569 E/WindowManager(10437): android.view.WindowLeaked: Activity com.android.camera.CameraActivity has leaked window DecorView@ff80a12[] that was originally added here
07-12 00:09:19.569 E/WindowManager(10437):	at android.view.ViewRootImpl.<init>(ViewRootImpl.java:485)
07-12 00:09:19.569 E/WindowManager(10437):	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:346)
07-12 00:09:19.569 E/WindowManager(10437):	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
07-12 00:09:19.569 E/WindowManager(10437):	at android.app.Dialog.show(Dialog.java:330)
07-12 00:09:19.569 E/WindowManager(10437):	at android.app.AlertDialog$Builder.show(AlertDialog.java:1114)
07-12 00:09:19.569 E/WindowManager(10437):	at com.android.camera.util.CameraUtil.showErrorAndFinish(CameraUtil.java:446)
07-12 00:09:19.569 E/WindowManager(10437):	at com.android.camera.CameraActivity.showOpenCameraErrorDialog(CameraActivity.java:2412)
07-12 00:09:19.569 E/WindowManager(10437):	at com.android.camera.CameraActivity.access$300(CameraActivity.java:127)
07-12 00:09:19.569 E/WindowManager(10437):	at com.android.camera.CameraActivity$2.onDeviceOpenFailure(CameraActivity.java:324)
07-12 00:09:19.569 E/WindowManager(10437):	at com.android.camera.AndroidCameraManagerImpl$CameraOpenErrorCallbackForward$2.run(AndroidCameraManagerImpl.java:1007)
07-12 00:09:19.569 E/WindowManager(10437):	at android.os.Handler.handleCallback(Handler.java:790)
07-12 00:09:19.569 E/WindowManager(10437):	at android.os.Handler.dispatchMessage(Handler.java:99)
07-12 00:09:19.569 E/WindowManager(10437):	at android.os.Looper.loop(Looper.java:164)
07-12 00:09:19.569 E/WindowManager(10437):	at android.app.ActivityThread.main(ActivityThread.java:6499)
07-12 00:09:19.569 E/WindowManager(10437):	at java.lang.reflect.Method.invoke(Native Method)
07-12 00:09:19.569 E/WindowManager(10437):	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
07-12 00:09:19.569 E/WindowManager(10437):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
07-12 00:09:19.753 I/OpenGLRenderer(3036): Initialized EGL, version 1.4
07-12 00:09:19.753 D/OpenGLRenderer(3036): Swap behavior 1
07-12 00:09:19.755 W/Adreno-EGL(3036): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:19.769 W/OpenGLRenderer(5641): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
07-12 00:09:20.876 I/ActivityManager(3036): START u0 {flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10054
07-12 00:09:19.769 W/OpenGLRenderer(5641): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
07-12 00:09:20.932 W/Adreno-EGL(6531): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:20.937 D/vndksupport(6531): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:21.066 I//system/vendor/bin/mpdecision(5543): type=1400 audit(0.0:400): avc: denied { write } for comm=504F5349582074696D65722032 name="mpctl" dev="dm-0" ino=22734 scontext=u:r:mpdecision:s0 tcontext=u:object_r:system_data_file:s0 tclass=sock_file permissive=1
07-12 00:09:21.101 I/zygote (3036): NativeAlloc concurrent copying GC freed 6995(739KB) AllocSpace objects, 9(372KB) LOS objects, 42% free, 10MB/18MB, paused 1.441ms total 121.766ms
07-12 00:09:22.227 W/Adreno-EGL(6531): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:22.228 D/vndksupport(6531): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:22.236 D/vndksupport(6531): Loading /vendor/lib/hw/android.hardware.graphics.allocator@2.0-impl.so from current namespace instead of sphal namespace.
07-12 00:09:22.239 D/vndksupport(6531): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:22.253 E/BufferItemConsumer(6531): [unnamed-6531-0] Failed to release buffer: Unknown error -1 (1)
07-12 00:09:22.303 W/Adreno-EGL(10343): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:22.306 D/vndksupport(10343): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:22.320 W/Adreno-EGL(6531): <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
07-12 00:09:22.321 D/vndksupport(6531): Loading /vendor/lib/hw/gralloc.msm8974.so from current namespace instead of sphal namespace.
07-12 00:09:22.335 E/BufferItemConsumer(6531): [unnamed-6531-1] Failed to release buffer: Unknown error -1 (1)
07-12 00:09:22.722 I/zygote (6531): Explicit concurrent copying GC freed 5913(343KB) AllocSpace objects, 0(0B) LOS objects, 54% free, 4MB/10MB, paused 737us total 81.715ms

Any suiggestions what else i can try?

Thanks. :cool: