[LG G6 ROMs, Kernels, Recoveries, & Other Developme] weiznich:
Hello,

thanks for this great work on this ROM. I'm currently facing some problems with the camera on the H870 using the last havoc build from 10th of August. My device is encrypted. The torch/flashlight does not work either (grayed out in the status bar).

I notice it says that there is no Camera API 2 support, and that no camera devices are connected. This happens independently from the camera app.

After searching a bit around I've found this post [1] from the lg v20 forum describing a similar issue. Maybe there solution is also usefull for the g6?

[1] https://xdaforums.com/showpost.php?p=79482228&postcount=1321

Logcat:

08-13 10:20:58.500 2646 2671 I ActivityManager: Start proc 1390:org.lineageos.snap/u0a17 for activity org.lineageos.snap/com.android.camera.CameraLauncher
08-13 10:20:58.509 1390 1390 E .lineageos.sna: Not starting debugger since process cannot load the jdwp agent.
08-13 10:20:58.549 1390 1390 W .lineageos.sna: Can't mmap dex file /system/framework/org.apache.http.legacy.boot.jar!classes.dex directly; please zipalign to 4 bytes. Falling back to extracting file.
08-13 10:20:58.592 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_VGA
08-13 10:20:58.592 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_VGA
08-13 10:20:58.593 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_4KDCI
08-13 10:20:58.593 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_4KDCI
08-13 10:20:58.593 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_TIME_LAPSE_VGA
08-13 10:20:58.593 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_TIME_LAPSE_VGA
08-13 10:20:58.593 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_TIME_LAPSE_4KDCI
08-13 10:20:58.594 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_TIME_LAPSE_4KDCI
08-13 10:20:58.596 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_HIGH_SPEED_CIF
08-13 10:20:58.596 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_HIGH_SPEED_CIF
08-13 10:20:58.596 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_HIGH_SPEED_VGA
08-13 10:20:58.596 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_HIGH_SPEED_VGA
08-13 10:20:58.597 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_HIGH_SPEED_4KDCI
08-13 10:20:58.597 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_HIGH_SPEED_4KDCI
08-13 10:20:58.597 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_QHD
08-13 10:20:58.597 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_QHD
08-13 10:20:58.597 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile field:QUALITY_2k
08-13 10:20:58.597 1390 1390 D Wrapper : getField:class android.media.CamcorderProfile QUALITY_2k
08-13 10:20:58.599 1390 1390 I CameraManagerGlobal: Connecting to camera service
08-13 10:20:58.627 1390 1390 D CAM_Activity: snapdragoncamera_version: 2.02.015 (eng.michae.20190810.140428-00)
08-13 10:20:58.684 1390 1390 D CAM_Activity: Camera API 2 supported: false
08-13 10:20:58.684 1390 1390 D CAM_Activity: Camera API 2 enabled: false
08-13 10:20:58.720 1390 1390 D OpenGLRenderer: Skia GL Pipeline
08-13 10:20:58.778 1390 1390 W SoundPool: Use of stream types is deprecated for operations other than volume control
08-13 10:20:58.778 1390 1390 W SoundPool: See the documentation of SoundPool() for what to use instead with android.media.AudioAttributes to qualify your playback use case
08-13 10:20:58.828 1390 1390 V CAM_UI : Using mdp_preview_content (MDP path)
08-13 10:20:58.833 1390 1414 V CAM_PhotoModule: Open camera device.
08-13 10:20:58.835 1390 1414 V CameraHolder: open camera 0
08-13 10:20:58.843 1390 1414 E CameraHolder: fail to connect Camera:-1, aborting.
08-13 10:20:58.844 1390 1414 E CAM_PhotoModule: Failed to open camera:0
08-13 10:20:58.862 1390 1413 I OMXClient: IOmx service obtained
08-13 10:20:58.867 1390 1390 V CAM_Activity: onResume: No camera devices connected.
08-13 10:20:58.874 2259 2364 I OMXMaster: makeComponentInstance(OMX.google.vorbis.decoder) in omx@1.0-service process
08-13 10:20:58.883 551 551 I sensors_hal_Ctx: flush: handle is 1
08-13 10:20:58.884 1390 1390 D AndroidRuntime: Shutting down VM
08-13 10:20:58.888 1390 1390 E AndroidRuntime: FATAL EXCEPTION: main
08-13 10:20:58.888 1390 1390 E AndroidRuntime: Process: org.lineageos.snap, PID: 1390
08-13 10:20:58.888 1390 1390 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {org.lineageos.snap/com.android.camera.CameraLauncher}: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3824)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3856)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1818)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.os.Handler.dispatchMessage(Handler.java:106)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.os.Looper.loop(Looper.java:193)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.ActivityThread.main(ActivityThread.java:6739)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at java.lang.reflect.Method.invoke(Native Method)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:859)
08-13 10:20:58.888 1390 1390 E AndroidRuntime: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at com.android.camera.PhotoModule.initializeFocusManager(PhotoModule.java:2825)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at com.android.camera.PhotoModule.onResumeBeforeSuper(PhotoModule.java:2599)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at com.android.camera.CameraActivity.onResume(CameraActivity.java:1862)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1413)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.Activity.performResume(Activity.java:7301)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3816)
08-13 10:20:58.888 1390 1390 E AndroidRuntime:	... 11 more