• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Galaxy A72] Small fix for GCam : Ultra-wide cam not shooting (libgcastartup.so)

Search This thread

txx1219

Senior Member
Jan 29, 2011
211
1,159
Hi everyone,

I found out a bug for Samsung Galaxy A72 with the ultra-wide camera. So, when the scene was bright light and the ISO was low (< 60 more or less), I was not able to take a picture with HDR+. This was the error:

Code:
E/libgcam: [validate.cc:63]: ErrorIfLess: Invalid condition: actual_analog_gain (0.982143) < 1.000000
E/libgcam: [ae_runner_impl.cc:454]: RunAe: FrameMetadata check for AE failed.
E/libgcam: [shot.cc:2301]: FatalError: BuildPayloadBurstSpec failed because ae_results was invalid.
E/CAM_HdrPlusShot: HDR+ pipeline reported error for shotId 0: BuildPayloadBurstSpec failed because ae_results was invalid.
W/MvAppController: Can't cancel session camera_session://google.com/ae1b96d8-5f02-4297-a155-8a5c6f376381 as no Camera session was found for it
W/CAM_UsageStats: onCaptureCanceled-API2_HDR_PLUS 11037614063425
W/CAM_ShotFailureHdlr: Shot Exception!
    csw: csw
        at ije.a(Unknown Source:254)
        at iir.b(Unknown Source:355)
        at hqp.b(Unknown Source:49)
        at hrv.g(Unknown Source:232)
        at gil.run(Unknown Source:34)
        at bom.run(Unknown Source:225)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:246)
        at android.app.ActivityThread.main(ActivityThread.java:8506)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

So I guess the actual_analog_gain is not properly rounded to 1 (as we can see the value to be 0.982143) and the libgcastartup.so makes a validation (in FrameMetadata check) to verify if the value is valid (throw an error when the value is under 1.000000). So I decided to modify libgcastartup.so in order to replace this 1.000000 value. The value is stored at this moment :
08 10 2E 1E 00 A8 11 91
I decided to replace 1.0 by 0.0, which makes it become :
E8 03 27 1E 00 A8 11 91

And it works. Now I able to shoot with my phone even when the scene is really bright and that actual_analog_gain is not returning properly the value. It's a very naive fix and I guess we could do things better. I don't know if this comparison is very important or not, but it's possible now to shoot.

I'm posting the .apk attached (it's based on GCam_7.3.018_Urnyx05-v2.1_Wichaya_V3.1.1_samsung.apk). The only difference is libgcastartup.so and libgcastartuppatched.so have now this change.

I hope that Urnyx05, Arnova, BSG or/and others could take this in count in the future if it doesn't make the app unusable. If someone was experimenting a similar bug, please test the apk and see if it unblocks you too.
 

Attachments

  • modified_gcam.apk.zip
    73.5 MB · Views: 347

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Hi everyone,

    I found out a bug for Samsung Galaxy A72 with the ultra-wide camera. So, when the scene was bright light and the ISO was low (< 60 more or less), I was not able to take a picture with HDR+. This was the error:

    Code:
    E/libgcam: [validate.cc:63]: ErrorIfLess: Invalid condition: actual_analog_gain (0.982143) < 1.000000
    E/libgcam: [ae_runner_impl.cc:454]: RunAe: FrameMetadata check for AE failed.
    E/libgcam: [shot.cc:2301]: FatalError: BuildPayloadBurstSpec failed because ae_results was invalid.
    E/CAM_HdrPlusShot: HDR+ pipeline reported error for shotId 0: BuildPayloadBurstSpec failed because ae_results was invalid.
    W/MvAppController: Can't cancel session camera_session://google.com/ae1b96d8-5f02-4297-a155-8a5c6f376381 as no Camera session was found for it
    W/CAM_UsageStats: onCaptureCanceled-API2_HDR_PLUS 11037614063425
    W/CAM_ShotFailureHdlr: Shot Exception!
        csw: csw
            at ije.a(Unknown Source:254)
            at iir.b(Unknown Source:355)
            at hqp.b(Unknown Source:49)
            at hrv.g(Unknown Source:232)
            at gil.run(Unknown Source:34)
            at bom.run(Unknown Source:225)
            at android.os.Handler.handleCallback(Handler.java:938)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:246)
            at android.app.ActivityThread.main(ActivityThread.java:8506)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

    So I guess the actual_analog_gain is not properly rounded to 1 (as we can see the value to be 0.982143) and the libgcastartup.so makes a validation (in FrameMetadata check) to verify if the value is valid (throw an error when the value is under 1.000000). So I decided to modify libgcastartup.so in order to replace this 1.000000 value. The value is stored at this moment :
    08 10 2E 1E 00 A8 11 91
    I decided to replace 1.0 by 0.0, which makes it become :
    E8 03 27 1E 00 A8 11 91

    And it works. Now I able to shoot with my phone even when the scene is really bright and that actual_analog_gain is not returning properly the value. It's a very naive fix and I guess we could do things better. I don't know if this comparison is very important or not, but it's possible now to shoot.

    I'm posting the .apk attached (it's based on GCam_7.3.018_Urnyx05-v2.1_Wichaya_V3.1.1_samsung.apk). The only difference is libgcastartup.so and libgcastartuppatched.so have now this change.

    I hope that Urnyx05, Arnova, BSG or/and others could take this in count in the future if it doesn't make the app unusable. If someone was experimenting a similar bug, please test the apk and see if it unblocks you too.
    1
    Does it work without xml modules? Are there any xmls for this port?
    The xml configs can be found on the telegram group Link