[Galaxy S5 Mini Android Development] DerpyDerp:
Thanks a lot!

I have two small issues with this ROM. I've never been on the stock ROM, because I bought this phone second hand and immediately flashed LineageOS:

Some apps somehow fail to do stuff with the (hardware) keystore. In the logcat it will look something like this:

TlcTeeKeyMaster: TEE_RSAGenerateKeyPair(): returning: 0x00000000TlcTeeKeyMaster: TEE_Open(): returning pointer to TCI buffer: 0xb6ecb000
TlcTeeKeyMaster: TEE_GetPubKey(): returning: 0x00000000
ExynosKeyMaster: OpenSSL error in i2d_PUBKEY 67109003: error:0400008b:RSA routines:OPENSSL_internal:VALUE_MISSING
Keymaster0Engine: Error -1 extracting public key

I have searched through the filesystem to trace the error with no success. It seems like, the hardware is not able to generate key material. This affects the EnBW mobility+ app (for EV charging) and the DKB banking app (at least for me). But there is a work around: By renaming the keystore library, the system will fall back to a software keystore. If your device is rooted, it might not be the best solution. Based on this posting, fire up an adb shell and rename the library:

mount /system -o remount,rw
mv /system/lib/hw/keystore.exynos3470.so /system/lib/hw/keystore.exynos3470.so_backup

Restart the phone

There seems to be a new camera API, which does not work with this ROM (at least for me). With some apps, there is a single preview frame, followed by a 4-5 seconds freeze. This repeats forever (single frame + freeze). Most apps that show this behavior need the camera for QR codes. Previous version of said apps will work.

Camera2CameraImpl: {Camera@6bd1cd9[id=0]} CameraDevice.onOpened()Camera2CameraImpl: {Camera@6bd1cd9[id=0]} Transitioning camera internal state: OPENING --> OPENED
CameraStateRegistry: Recalculating open cameras:
CameraStateRegistry: Camera State
CameraStateRegistry: -------------------------------------------------------------------
CameraStateRegistry: Camera@a59ea9b[id=1] UNKNOWN
CameraStateRegistry: Camera@6bd1cd9[id=0] OPEN
CameraStateRegistry: -------------------------------------------------------------------
CameraStateRegistry: Open count: 1 (Max allowed: 1)
CameraStateMachine: New public camera state CameraState{type=OPEN, error=null} from OPEN and null
CameraStateMachine: Publishing new public camera state CameraState{type=OPEN, error=null}
UseCaseAttachState: All use case: [androidx.camera.core.f-568ff20d-c7e4-444d-944e-e5b8f571ae67180755889, androidx.camera.core.s-ddbdd441-e8b8-487d-9b1a-f5275eab91db189579926] for camera: 0
SyncCaptureSessionBase: [androidx.camera.camera2.internal.o2@6ecbfe9] getSurface...done
Camera2CameraImpl: {Camera@6bd1cd9[id=0]} Posting surface closed
Camera2CameraImpl: java.lang.Throwable
Camera2CameraImpl: at androidx.camera.camera2.internal.j0.k0(SourceFile:24)
Camera2CameraImpl: at androidx.camera.camera2.internal.j0$b.onFailure(SourceFile:21)
Camera2CameraImpl: at z.f$e.run(SourceFile:37)
Camera2CameraImpl: at y.g$b.a(SourceFile:74)
Camera2CameraImpl: at y.g$b.run(SourceFile:1)
Camera2CameraImpl: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
Camera2CameraImpl: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
Camera2CameraImpl: at java.lang.Thread.run(Thread.java:764)
[...]
TextureViewImpl: SurfaceTexture available. Size: 960x720
TextureViewImpl: Surface set on Preview.
SyncCaptureSessionBase: [androidx.camera.camera2.internal.o2@d4088b8] getSurface...done
Camera2CameraImpl: {Camera@6bd1cd9[id=0]} Posting surface closed
Camera2CameraImpl: java.lang.Throwable
Camera2CameraImpl: at androidx.camera.camera2.internal.j0.k0(SourceFile:24)
Camera2CameraImpl: at androidx.camera.camera2.internal.j0$b.onFailure(SourceFile:21)
Camera2CameraImpl: at z.f$e.run(SourceFile:37)
Camera2CameraImpl: at y.g$b.a(SourceFile:74)
Camera2CameraImpl: at y.g$b.run(SourceFile:1)
Camera2CameraImpl: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
Camera2CameraImpl: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
Camera2CameraImpl: at java.lang.Thread.run(Thread.java:764)
[...]
CameraDeviceState: Legacy camera service transitioning to state CAPTURING
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 1 line
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 36 lines
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 1 line
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 2 lines
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 198 lines
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 1 line
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 2 lines
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 1 line
chatty : uid=1047(cameraserver) /vendor/bin/hw/android.hardware.camera.provider@2.4-service.universal3470 expire 1 line
gralloc : invalid yuv format 35
GraphicBufferAllocator: Failed to allocate (640 x 480) layerCount 1 format 35 usage 33: 3
BufferQueueProducer: [ImageReader-640x480f23m4-6036-38] dequeueBuffer: createGraphicBuffer failed
Legacy-CameraDevice-JNI: produceFrame: Failed to dequeue buffer, error Out of memory (-12).
Legacy-CameraDevice-JNI: LegacyCameraDevice_nativeProduceFrame: Error while producing frame Out of memory (-12).
CameraDeviceGLThread-0: Received exception on GL render thread:
CameraDeviceGLThread-0: java.lang.UnsupportedOperationException: Unknown error -12
CameraDeviceGLThread-0: at android.hardware.camera2.legacy.LegacyExceptionUtils.throwOnError(LegacyExceptionUtils.java:77)
CameraDeviceGLThread-0: at android.hardware.camera2.legacy.LegacyCameraDevice.produceFrame(LegacyCameraDevice.java:713)
CameraDeviceGLThread-0: at android.hardware.camera2.legacy.SurfaceTextureRenderer.drawIntoSurfaces(SurfaceTextureRenderer.java:839)
CameraDeviceGLThread-0: at android.hardware.camera2.legacy.GLThreadManager$1.handleMessage(GLThreadManager.java:105)
CameraDeviceGLThread-0: at android.os.Handler.dispatchMessage(Handler.java:102)
CameraDeviceGLThread-0: at android.os.Looper.loop(Looper.java:193)
CameraDeviceGLThread-0: at android.os.HandlerThread.run(HandlerThread.java:65)
CameraDeviceState: Legacy camera service transitioning to state ERROR
DeferrableSurface: use count-1, useCount=1 closed=false v.b1$b@1c2ad88
DeferrableSurface: use count-1, useCount=0 closed=false androidx.camera.core.impl.a1@a7a9f82
DeferrableSurface: Surface no longer in use[total_surfaces=3, used_surfaces=1](androidx.camera.core.impl.a1@a7a9f82}
Camera2CameraImpl: CameraDevice.onError(): 0 failed with ERROR_CAMERA_DEVICE while in OPENED state. Will attempt recovering from error.
Camera2CameraImpl: Attempt to reopen camera[0] after error[ERROR_CAMERA_DEVICE]
Camera2CameraImpl: {Camera@6bd1cd9[id=0]} Transitioning camera internal state: OPENED --> REOPENING
CameraStateRegistry: Recalculating open cameras:
CameraStateRegistry: Camera State
CameraStateRegistry: -------------------------------------------------------------------
CameraStateRegistry: Camera@a59ea9b[id=1] UNKNOWN
CameraStateRegistry: Camera@6bd1cd9[id=0] OPENING
CameraStateRegistry: -------------------------------------------------------------------
CameraStateRegistry: Open count: 1 (Max allowed: 1)
CameraStateMachine: New public camera state CameraState{type=OPENING, error=StateError{code=3, cause=null}} from OPENING and StateError{code=3, cause=null}
CameraStateMachine: Publishing new public camera state CameraState{type=OPENING, error=StateError{code=3, cause=null}}
Camera2CameraImpl: {Camera@6bd1cd9[id=0]} Resetting Capture Session
DeferrableSurface: surface closed, useCount=0 closed=true f0.h0$a@e1bf39c
DeferrableSurface: surface closed, useCount=1 closed=true v.b1$b@1c2ad88
DeferrableSurface: Surface terminated[total_surfaces=2, used_surfaces=1](f0.h0$a@e1bf39c}
DeferrableSurface: surface closed, useCount=0 closed=true androidx.camera.core.impl.a1@a7a9f82
DeferrableSurface: Surface terminated[total_surfaces=1, used_surfaces=1](androidx.camera.core.impl.a1@a7a9f82}
DeferrableSurface: use count-1, useCount=0 closed=true v.b1$b@1c2ad88
DeferrableSurface: Surface no longer in use[total_surfaces=1, used_surfaces=0](v.b1$b@1c2ad88}

I would say, the main problem is "produceFrame: Failed to dequeue buffer, error Out of memory (-12)." Do you know of any possible fix?