Android 9+ for S7 with camera and fingerprint working properly

Search This thread

Kootee83

Senior Member
Jun 25, 2012
94
37
Samsung Galaxy S7
I've tested already many S7 (herolte) ROMs and couldn't find any that would have both working properly: camera and fingerprint.
  • For camera: all of the AOSP based ROMs stop working after about 20 minutes of video chat (sometimes even earlier). Then you have to reboot telephone to make camera working again. I have tried PixelExperience, LineageOS 17-19 and others I don't really remember names now. You can try it yourself by starting WhatsApp or Messenger video chat and waiting bout 20 minutes.
    Quite irritating is the fact, that they never mention this issue in ROM summary page, you can only test it yourself or sometimes find reports from ROM users comments, that there's this issue, and it seems quite old and known issue.
  • For fingerprint: all the stock kernel based ROMs support for fingerprint functionality is partial. Some applications will work with it, but some will crash or just refuse to work like Keepass2Android. Sad thing to say is, that great ROMs like for example FloydQ and Lightheart have no issue with camera but they do with fingerprint.
    For this one at least I've found some explanation by @ananjaser1211 why it's not compatible with the stock kernel:
    "The 3rd party fingerprint bug is not related to safetynet. It's an incompatibility between the oreo auth tz server we use and the pie+ fingerprint hidl. We can't use the lineage fingerprint hidl. I've tried but it's not compatible with oneui. And we need such custom hidls in order to have working fp"
It seems that it's impossible at the moment to have both fixed. I believe it's a kernel-related thing.
Or maybe someone has found a ROM or a way to make both working correctly?
 

ananjaser1211

Recognized Developer / Recognized Contributor
I think fingerprint was resolved in recent lineage builds, as they found a way to make a compatible hidl that resolves the mismatch we faced, however i had no luck implementing it in my ROM, AOSP components dont really love oneui much.

regarding the camera not working, this is due to a patch made in the camera HAL to bypass FDSAN issues, it does bypass the issue, but after a while of usage it will have issues with FD's and stop working (either not loading entirely or showing a green screen)

we faced this issue in FloydQ v4 or V5 i do not recall when i implemented that patch, however due to it being unstable i resorted to a different method of disabling FDSAN in the ROM itself, rather than fixing it in the camera driver, which is a hack, not really something lineage peeps are interested in.

in lineage this is done in source by setting FDSAN error level to "ANDROID_FDSAN_ERROR_LEVEL_DISABLED"

in OneUI Q it is done by setting "debug.fdsan=0" in prop, which samsung left exposed, however it is not the case for lineage and it needs to be done in the source
 

Kootee83

Senior Member
Jun 25, 2012
94
37
Samsung Galaxy S7
I've tested most of the available Android 9+ custom ROMs for S7 (herolte) just to be sure no one made one that would have fixed both camera and fingerprint. Here is my result:

ROMs with camera issue (camera stops working after 20 minutes of uninterrupted usage like in video chat):
ROMs with fingerprint issue (fingerprint in some apps like Keepass2Android and some banking apps won't work):
So to have both working correctly there is only one option: Stock / Android 8- ROMs.

Thank you @ananjaser1211 for the explanation. So the temporary fix for Lineage (and I guess other AOSP ones too) seems quite easy. I'll give it a try as it seems easier than fixing the fingerprint issue.

For me personally faulty video/camera makes ROM unusable in these days when video chats are so common. I can live without fingerprint in some apps, it is definitely less irritating than very unreliable camera. But it is of course a personal preference in the end.
 
Last edited:

Makowal

Member
Dec 29, 2014
13
15
in lineage this is done in source by setting FDSAN error level to "ANDROID_FDSAN_ERROR_LEVEL_DISABLED"
I've tried disabling FDSAN on PixelExperience. It made camera work longer (like 30 minutes instead of 20 minutes) but still camera crashes after that. Here are logs that appear when camera crashes:
Code:
01-16 10:24:06.278 13467 14324 E SnapCam_CaptureModule: onError 1 4
01-16 10:24:06.280 13467 14324 D CompatibilityChangeReporter: Compat change id reported: 147798919; UID 10187; state: DISABLED
01-16 10:24:06.291  3682 13614 I chatty  : uid=1047(cameraserver) HwBinder:3682_3 expire 5 lines
01-16 10:24:06.295  3621 14862 I chatty  : uid=1047(cameraserver) [email protected] expire 22 lines
01-16 10:24:06.365  3608  3785 I nanohub : mergeDirectReportRequest - enable = 0 activate = 1 direct.rate = 0 normal.rate = 66667000
01-16 10:24:06.366  3608  3785 I nanohub : mergeDirectReportRequest - activate = 1 normal.rate = 66667000
01-16 10:24:06.366  3608  3785 I Sensors : batch(0) - accelerometer_sensor try to batching with 66667000
01-16 10:24:06.375  3682  3740 I chatty  : uid=1047(cameraserver) HwBinder:3682_2 expire 7 lines
01-16 10:24:06.387 13467 13467 W System.err: android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error
01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2267)
01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.submitCaptureRequest(CameraDeviceImpl.java:1161)
01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.setRepeatingRequest(CameraDeviceImpl.java:1234)
01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:327)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.setAFModeToPreview(CaptureModule.java:2287)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.cancelTouchFocus(CaptureModule.java:8107)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.cancelTouchFocus(CaptureModule.java:4366)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.onPauseBeforeSuper(CaptureModule.java:4249)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CameraActivity.onPause(CameraActivity.java:1784)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.Activity.performPause(Activity.java:8168)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1516)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4733)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4694)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4645)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:46)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
01-16 10:24:06.388 13467 13467 W System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
01-16 10:24:06.388 13467 13467 W System.err:     at android.os.Looper.loop(Looper.java:223)
01-16 10:24:06.389 13467 13467 W System.err:     at android.app.ActivityThread.main(ActivityThread.java:7664)
01-16 10:24:06.389 13467 13467 W System.err:     at java.lang.reflect.Method.invoke(Native Method)
01-16 10:24:06.389 13467 13467 W System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-16 10:24:06.389 13467 13467 W System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
01-16 10:24:06.390  3797  3839 W LocalDisplayAdapter: Unable to find color mode 0, ignoring request.
01-16 10:24:06.391 13467 13467 D SnapCam_CaptureModule: onPause exit camera
01-16 10:24:06.392  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.395  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.398  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.399  3797  3907 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.400  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.401  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.402  3797  8733 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.406  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.409  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.410 13467 13467 D SnapCam_CaptureModule: closeCamera
Maybe it's also matter of camera software. @ananjaser1211 Do you know if it's possible to use stock camera on AOSP based ROMS and if it is, how much effort might that take?
 

ananjaser1211

Recognized Developer / Recognized Contributor
I've tried disabling FDSAN on PixelExperience. It made camera work longer (like 30 minutes instead of 20 minutes) but still camera crashes after that. Here are logs that appear when camera crashes:
Code:
01-16 10:24:06.278 13467 14324 E SnapCam_CaptureModule: onError 1 4
01-16 10:24:06.280 13467 14324 D CompatibilityChangeReporter: Compat change id reported: 147798919; UID 10187; state: DISABLED
01-16 10:24:06.291  3682 13614 I chatty  : uid=1047(cameraserver) HwBinder:3682_3 expire 5 lines
01-16 10:24:06.295  3621 14862 I chatty  : uid=1047(cameraserver) [email protected] expire 22 lines
01-16 10:24:06.365  3608  3785 I nanohub : mergeDirectReportRequest - enable = 0 activate = 1 direct.rate = 0 normal.rate = 66667000
01-16 10:24:06.366  3608  3785 I nanohub : mergeDirectReportRequest - activate = 1 normal.rate = 66667000
01-16 10:24:06.366  3608  3785 I Sensors : batch(0) - accelerometer_sensor try to batching with 66667000
01-16 10:24:06.375  3682  3740 I chatty  : uid=1047(cameraserver) HwBinder:3682_2 expire 7 lines
01-16 10:24:06.387 13467 13467 W System.err: android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error
01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2267)
01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.submitCaptureRequest(CameraDeviceImpl.java:1161)
01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.setRepeatingRequest(CameraDeviceImpl.java:1234)
01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:327)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.setAFModeToPreview(CaptureModule.java:2287)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.cancelTouchFocus(CaptureModule.java:8107)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.cancelTouchFocus(CaptureModule.java:4366)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.onPauseBeforeSuper(CaptureModule.java:4249)
01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CameraActivity.onPause(CameraActivity.java:1784)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.Activity.performPause(Activity.java:8168)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1516)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4733)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4694)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4645)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:46)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
01-16 10:24:06.388 13467 13467 W System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
01-16 10:24:06.388 13467 13467 W System.err:     at android.os.Looper.loop(Looper.java:223)
01-16 10:24:06.389 13467 13467 W System.err:     at android.app.ActivityThread.main(ActivityThread.java:7664)
01-16 10:24:06.389 13467 13467 W System.err:     at java.lang.reflect.Method.invoke(Native Method)
01-16 10:24:06.389 13467 13467 W System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-16 10:24:06.389 13467 13467 W System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
01-16 10:24:06.390  3797  3839 W LocalDisplayAdapter: Unable to find color mode 0, ignoring request.
01-16 10:24:06.391 13467 13467 D SnapCam_CaptureModule: onPause exit camera
01-16 10:24:06.392  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.395  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.398  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.399  3797  3907 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.400  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.401  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.402  3797  8733 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.406  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.409  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
01-16 10:24:06.410 13467 13467 D SnapCam_CaptureModule: closeCamera
Maybe it's also matter of camera software. @ananjaser1211 Do you know if it's possible to use stock camera on AOSP based ROMS and if it is, how much effort might that take?

Regarding the error, this is a bit generic, the actual hal crash would be in data/tombstones probably, you have disabled fdsan, but did you revert the libexynoscamera "fdsan" patches, i.e the hacks that causes the green issue in the first place. since you disabled fdsan in the rom, you dont need these patches, you should check them in the vendor tree of the rom you are compiling, (generally speaking, using unmodified Note 7 fe libexynoscamera should be fine), after that, test the camera further and keep an eye on HAL crashes (not app crashes) , in theory there should be none. since as far as i know fdsan is the only fatal error on our hal

on the topic of using stock camera on AOSP, no it is not doable, samsung camera (and apps in general) have deep SEM/SEP hooks everywhere , in frameworks / helpers / libs, without having oneui source i dont see how someone can do it without losing half their hair.
 
  • Like
Reactions: Makowal

Makowal

Member
Dec 29, 2014
13
15
Thank you so much @ananjaser1211 for the information. In this situation I'm seriously considering trying my best with your FloydQ compliation for herolte to help fixing fingerprint issue. Personally the cameras used in AOSP are not only faulty but also slow, and herolte is already old so I'm afraid there will be only less effort in future to do anything special for this device.
About the fingerprint I know you have already done some research in the matter. In FloydQ do you think that fixing existing fingerprint software would be easier or rather porting the one from AOSP? Do you have any hints for me where to start?
 

ananjaser1211

Recognized Developer / Recognized Contributor
Thank you so much @ananjaser1211 for the information. In this situation I'm seriously considering trying my best with your FloydQ compliation for herolte to help fixing fingerprint issue. Personally the cameras used in AOSP are not only faulty but also slow, and herolte is already old so I'm afraid there will be only less effort in future to do anything special for this device.
About the fingerprint I know you have already done some research in the matter. In FloydQ do you think that fixing existing fingerprint software would be easier or rather porting the one from AOSP? Do you have any hints for me where to start?
I did not dive into the fingerprint issue on floyd significantly (from testing fixes perspective) so there might be ways to fix it outside the hidl, but to summarize,

we use hero mcDriverDaemon / libmcregistry / libmcclient and vendor/app/mcRegistry,

these are only designed to work properly with OREO libbauth/libauth server (the blobs responsible for fingerprint), however, we dont use oreo bauth, we use the ones from pie (gracerlte) because the oreo ones does not load properly with pie and higher fingerprint HAL, in our case it is `[email protected]`

To test some fixes, i would first start by replacing the hidl used in floyd with latest compiled one from AOSP (making sure it is being compiled with android Q dependencies) and debug why it does not exec, because it "should" work, as this is more or less a generic hidl

once the hal executes, i put back oreo libbauth/libauth servers and try my luck.

i am working on V7 of that rom, so i might give the FP another shot, maybe i missed something when i tackled it last time.
 
  • Like
Reactions: Makowal

Makowal

Member
Dec 29, 2014
13
15
@ananjaser1211 I've tried again with an official PixelExperience ROM and this time I did exactly as you said. I'm happy to say that it worked! I've tested it for over an hour. I finally have a ROM with both working Camera and Fingerprint 😊
I suspect that the reason lays in this commit from git log:
Git:
commit 77e12d12a0c9659aed776332c0f1511c54d2b906
Date:   Thu Aug 6 09:32:35 2020 +0200

    universal8890: pin hexedited libexynoscamera3
  
     * some fd close in loop causes android Q fdsan go mad
     * binary patching them as nop fixes the issue
  
    Change-Id: I56f409fde5902b5340291bb5d454a619cdd7d0a0
What I think happens here is after the binary was hexedited it doesn't close fds, so after some time there are too many open and the app crashes (even if fdsan is disabled).
Of course it is some workaround because fdsan is disabled now but well, good enough for me :)
 
  • Like
Reactions: ananjaser1211

ananjaser1211

Recognized Developer / Recognized Contributor
@ananjaser1211 I've tried again with an official PixelExperience ROM and this time I did exactly as you said. I'm happy to say that it worked! I've tested it for over an hour. I finally have a ROM with both working Camera and Fingerprint 😊
I suspect that the reason lays in this commit from git log:
Git:
commit 77e12d12a0c9659aed776332c0f1511c54d2b906
Date:   Thu Aug 6 09:32:35 2020 +0200

    universal8890: pin hexedited libexynoscamera3
 
     * some fd close in loop causes android Q fdsan go mad
     * binary patching them as nop fixes the issue
 
    Change-Id: I56f409fde5902b5340291bb5d454a619cdd7d0a0
What I think happens here is after the binary was hexedited it doesn't close fds, so after some time there are too many open and the app crashes (even if fdsan is disabled).
Of course it is some workaround because fdsan is disabled now but well, good enough for me :)
Fantastic to hear! and yes indeed the patch used to prevent fdsan from breaking camera also allows for FDs to say open i believe and after a while the camera breaks, Glad the workaround is working for you
 

Kootee83

Senior Member
Jun 25, 2012
94
37
Samsung Galaxy S7
Recently I started using this newly updated ROM of @Exodusnick . It is a Lineage 16.0 (Android 9) and has both camera and fingerprint working without issues so it meets my criteria (as in this topic title). Unfortunately higher Android versions of the same microG compilation do have camera crash issue after 20m usage, but Pie is ok and works for me.

Personally I'd definitely prefer some Android 9 with OneUI. I don't care about newest Android versions, just the ROM to be daily-usable (stable). Android 9 is required by one of my must-have applications this is the only reason why I put it as a minimum version. Unfortunately I don't think any Android 9 OneUI ROM for S7 exists with working fingerprint. @ananjaser1211 did your compilations of Android 9 had this fingerprint issue?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    I think fingerprint was resolved in recent lineage builds, as they found a way to make a compatible hidl that resolves the mismatch we faced, however i had no luck implementing it in my ROM, AOSP components dont really love oneui much.

    regarding the camera not working, this is due to a patch made in the camera HAL to bypass FDSAN issues, it does bypass the issue, but after a while of usage it will have issues with FD's and stop working (either not loading entirely or showing a green screen)

    we faced this issue in FloydQ v4 or V5 i do not recall when i implemented that patch, however due to it being unstable i resorted to a different method of disabling FDSAN in the ROM itself, rather than fixing it in the camera driver, which is a hack, not really something lineage peeps are interested in.

    in lineage this is done in source by setting FDSAN error level to "ANDROID_FDSAN_ERROR_LEVEL_DISABLED"

    in OneUI Q it is done by setting "debug.fdsan=0" in prop, which samsung left exposed, however it is not the case for lineage and it needs to be done in the source
    2
    I've tested already many S7 (herolte) ROMs and couldn't find any that would have both working properly: camera and fingerprint.
    • For camera: all of the AOSP based ROMs stop working after about 20 minutes of video chat (sometimes even earlier). Then you have to reboot telephone to make camera working again. I have tried PixelExperience, LineageOS 17-19 and others I don't really remember names now. You can try it yourself by starting WhatsApp or Messenger video chat and waiting bout 20 minutes.
      Quite irritating is the fact, that they never mention this issue in ROM summary page, you can only test it yourself or sometimes find reports from ROM users comments, that there's this issue, and it seems quite old and known issue.
    • For fingerprint: all the stock kernel based ROMs support for fingerprint functionality is partial. Some applications will work with it, but some will crash or just refuse to work like Keepass2Android. Sad thing to say is, that great ROMs like for example FloydQ and Lightheart have no issue with camera but they do with fingerprint.
      For this one at least I've found some explanation by @ananjaser1211 why it's not compatible with the stock kernel:
      "The 3rd party fingerprint bug is not related to safetynet. It's an incompatibility between the oreo auth tz server we use and the pie+ fingerprint hidl. We can't use the lineage fingerprint hidl. I've tried but it's not compatible with oneui. And we need such custom hidls in order to have working fp"
    It seems that it's impossible at the moment to have both fixed. I believe it's a kernel-related thing.
    Or maybe someone has found a ROM or a way to make both working correctly?
    2
    I've tested most of the available Android 9+ custom ROMs for S7 (herolte) just to be sure no one made one that would have fixed both camera and fingerprint. Here is my result:

    ROMs with camera issue (camera stops working after 20 minutes of uninterrupted usage like in video chat):
    ROMs with fingerprint issue (fingerprint in some apps like Keepass2Android and some banking apps won't work):
    So to have both working correctly there is only one option: Stock / Android 8- ROMs.

    Thank you @ananjaser1211 for the explanation. So the temporary fix for Lineage (and I guess other AOSP ones too) seems quite easy. I'll give it a try as it seems easier than fixing the fingerprint issue.

    For me personally faulty video/camera makes ROM unusable in these days when video chats are so common. I can live without fingerprint in some apps, it is definitely less irritating than very unreliable camera. But it is of course a personal preference in the end.
    1
    I've tried disabling FDSAN on PixelExperience. It made camera work longer (like 30 minutes instead of 20 minutes) but still camera crashes after that. Here are logs that appear when camera crashes:
    Code:
    01-16 10:24:06.278 13467 14324 E SnapCam_CaptureModule: onError 1 4
    01-16 10:24:06.280 13467 14324 D CompatibilityChangeReporter: Compat change id reported: 147798919; UID 10187; state: DISABLED
    01-16 10:24:06.291  3682 13614 I chatty  : uid=1047(cameraserver) HwBinder:3682_3 expire 5 lines
    01-16 10:24:06.295  3621 14862 I chatty  : uid=1047(cameraserver) [email protected] expire 22 lines
    01-16 10:24:06.365  3608  3785 I nanohub : mergeDirectReportRequest - enable = 0 activate = 1 direct.rate = 0 normal.rate = 66667000
    01-16 10:24:06.366  3608  3785 I nanohub : mergeDirectReportRequest - activate = 1 normal.rate = 66667000
    01-16 10:24:06.366  3608  3785 I Sensors : batch(0) - accelerometer_sensor try to batching with 66667000
    01-16 10:24:06.375  3682  3740 I chatty  : uid=1047(cameraserver) HwBinder:3682_2 expire 7 lines
    01-16 10:24:06.387 13467 13467 W System.err: android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error
    01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2267)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.submitCaptureRequest(CameraDeviceImpl.java:1161)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraDeviceImpl.setRepeatingRequest(CameraDeviceImpl.java:1234)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:327)
    01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.setAFModeToPreview(CaptureModule.java:2287)
    01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.cancelTouchFocus(CaptureModule.java:8107)
    01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.cancelTouchFocus(CaptureModule.java:4366)
    01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CaptureModule.onPauseBeforeSuper(CaptureModule.java:4249)
    01-16 10:24:06.388 13467 13467 W System.err:     at com.android.camera.CameraActivity.onPause(CameraActivity.java:1784)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.Activity.performPause(Activity.java:8168)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1516)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4733)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.performPauseActivity(ActivityThread.java:4694)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:4645)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:46)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
    01-16 10:24:06.388 13467 13467 W System.err:     at android.os.Looper.loop(Looper.java:223)
    01-16 10:24:06.389 13467 13467 W System.err:     at android.app.ActivityThread.main(ActivityThread.java:7664)
    01-16 10:24:06.389 13467 13467 W System.err:     at java.lang.reflect.Method.invoke(Native Method)
    01-16 10:24:06.389 13467 13467 W System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    01-16 10:24:06.389 13467 13467 W System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
    01-16 10:24:06.390  3797  3839 W LocalDisplayAdapter: Unable to find color mode 0, ignoring request.
    01-16 10:24:06.391 13467 13467 D SnapCam_CaptureModule: onPause exit camera
    01-16 10:24:06.392  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.395  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.398  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.399  3797  3907 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.400  3797  8295 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.401  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.402  3797  8733 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.406  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.409  3797  4390 W BackupManagerService: [UserID:0] dataChanged but no participant pkg='org.lineageos.snap' uid=10187
    01-16 10:24:06.410 13467 13467 D SnapCam_CaptureModule: closeCamera
    Maybe it's also matter of camera software. @ananjaser1211 Do you know if it's possible to use stock camera on AOSP based ROMS and if it is, how much effort might that take?

    Regarding the error, this is a bit generic, the actual hal crash would be in data/tombstones probably, you have disabled fdsan, but did you revert the libexynoscamera "fdsan" patches, i.e the hacks that causes the green issue in the first place. since you disabled fdsan in the rom, you dont need these patches, you should check them in the vendor tree of the rom you are compiling, (generally speaking, using unmodified Note 7 fe libexynoscamera should be fine), after that, test the camera further and keep an eye on HAL crashes (not app crashes) , in theory there should be none. since as far as i know fdsan is the only fatal error on our hal

    on the topic of using stock camera on AOSP, no it is not doable, samsung camera (and apps in general) have deep SEM/SEP hooks everywhere , in frameworks / helpers / libs, without having oneui source i dont see how someone can do it without losing half their hair.
    1
    Thank you so much @ananjaser1211 for the information. In this situation I'm seriously considering trying my best with your FloydQ compliation for herolte to help fixing fingerprint issue. Personally the cameras used in AOSP are not only faulty but also slow, and herolte is already old so I'm afraid there will be only less effort in future to do anything special for this device.
    About the fingerprint I know you have already done some research in the matter. In FloydQ do you think that fixing existing fingerprint software would be easier or rather porting the one from AOSP? Do you have any hints for me where to start?
    I did not dive into the fingerprint issue on floyd significantly (from testing fixes perspective) so there might be ways to fix it outside the hidl, but to summarize,

    we use hero mcDriverDaemon / libmcregistry / libmcclient and vendor/app/mcRegistry,

    these are only designed to work properly with OREO libbauth/libauth server (the blobs responsible for fingerprint), however, we dont use oreo bauth, we use the ones from pie (gracerlte) because the oreo ones does not load properly with pie and higher fingerprint HAL, in our case it is `[email protected]`

    To test some fixes, i would first start by replacing the hidl used in floyd with latest compiled one from AOSP (making sure it is being compiled with android Q dependencies) and debug why it does not exec, because it "should" work, as this is more or less a generic hidl

    once the hal executes, i put back oreo libbauth/libauth servers and try my luck.

    i am working on V7 of that rom, so i might give the FP another shot, maybe i missed something when i tackled it last time.