Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TAMA][AOSP11] Google Camera doesn't work with latest OEMv5 #695

Closed
jevgenp opened this issue May 28, 2021 · 50 comments
Closed

[TAMA][AOSP11] Google Camera doesn't work with latest OEMv5 #695

jevgenp opened this issue May 28, 2021 · 50 comments
Labels

Comments

@jevgenp
Copy link

jevgenp commented May 28, 2021

Platform: TAMA
Device: XZ2 Compact
Kernel version: 4.14
Android version: 11 r36 (from actual sources at this moment)
Software binaries version: OEM v5

Previously working on
None (Worked only on A9)

Description
Google Cameras crashes on start (list of tried versions on screenshot), except that one worked on AOSP A9 (6.2.030).
This version starts, but viewfinder freezes (helps enabling of buffer fix in settings), and doesn't react on a capture button.

Symptoms
Crashes on start/Doesn't react on a capture button.

How to reproduce
Install any of versions from screenshot.

Additional context
119940683-39c3ce80-bf98-11eb-9d90-3ed0e216ed1b
119941085-ca9aaa00-bf98-11eb-8964-a7f078a38154
gcam.txt

@jevgenp jevgenp added the bug label May 28, 2021
@MartinX3
Copy link

After the fix in the new OEMv5 we catched the next bug on our way to gcam happiness:
java.lang.IllegalArgumentException: supportsCameraApi:2340: Unknown camera ID 2

@sraase
Copy link

sraase commented May 28, 2021

Akari only has two sensors, so only cameraId 0 and 1 are valid.
I don't know why the apps crash trying to access cameraId 2. They should not even try.
Can you post the output of "adb shell -n dumpsys media.camera"?

@jevgenp
Copy link
Author

jevgenp commented May 28, 2021

Here it is
log.txt

@sraase
Copy link

sraase commented May 28, 2021

Thank you.
Both camera HAL and MediaProfiles only list two cameraIds, which is correct.
I don't know why the apps try to open an additional camera. For now, I call "app bug", but that is probably too short.

@jevgenp
Copy link
Author

jevgenp commented May 28, 2021

Ok. I'll try to find some info how to change these id's (if problem here) in decompiled app. Thanks anyway.

@MartinX3
Copy link

MartinX3 commented May 28, 2021

Maybe the GCAM you tried is modified for 3 camers (2 on the back) and we need a specific gcam port, @jevgenp ?
If the problem is not caused by SODP.

@jevgenp
Copy link
Author

jevgenp commented May 28, 2021

@MartinX3 No idea, I'm just regular user,
Just found version where possible to set ID for Main/Front cameras - but no changes.
At least this version starts for few seconds (if settings not pressed) with black viewfinder then quits.

@jevgenp
Copy link
Author

jevgenp commented May 29, 2021

I tried few more apps that uses raw for capturing and processing (PhotonCam, GelioSoft Camera2), but they also crashes.
But raw capture over SnapCamera HDR is working fine.
Don't know is it related.
geliosoft.txt
photon.txt

@MartinX3
Copy link

MartinX3 commented May 29, 2021

@sraase Do you think that problem is in the OEM part or in the kernel? :)

TL;DR:

05-29 17:28:28.146   703  2287 E CHIUSECASE: [ERROR  ] chxextensionmodule.cpp:521 ExtendOpen() ExtendOpen failed! HW resource insufficient! openCameraCost=50CostOfAnyCurrentlyOpenLogicalCameras =100, m_totalResourceBudget = 100
11 E Camera3-Device: Camera 0: initialize: Could not open camera session: Function not implemented (-38)

Full Log Section:

05-29 17:28:28.117   819  7811 I CameraService: CameraService::connect call (PID -1 "com.geliosoft.geliosoftcamera2", camera ID 0) for HAL version default and Camera API version 2
05-29 17:28:28.123 17088 19744 D CCodecBufferChannel: [c2.android.vorbis.decoder#541] MediaCodec discarded an unknown buffer
05-29 17:28:28.124   819  7811 I Camera2ClientBase: Camera 0: Opened. Client: com.geliosoft.geliosoftcamera2 (PID 17088, UID 10102)
05-29 17:28:28.125 17088 19744 D CCodecBufferChannel: [c2.android.vorbis.decoder#541] MediaCodec discarded an unknown buffer
05-29 17:28:28.125   819  7811 I CameraDeviceClient: CameraDeviceClient 0: Opened
05-29 17:28:28.129 17088 19756 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
05-29 17:28:28.129   869  2239 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
05-29 17:28:28.132   869  2239 V C2Store : in ~ComponentModule
05-29 17:28:28.133   869  2239 V C2Store : unloading dll
05-29 17:28:28.143   819  7811 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0
05-29 17:28:28.144   819  7811 I CameraProviderManager: Camera device device@3.5/legacy/0 torch status is now NOT_AVAILABLE
05-29 17:28:28.144   819  7811 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0
05-29 17:28:28.144  1543  1585 D audio_hw_primary: adev_set_parameters: enter: cameraFacing=back
05-29 17:28:28.145   819  7811 I CameraProviderManager: Camera device device@3.5/legacy/1 torch status is now NOT_AVAILABLE
05-29 17:28:28.145   819  7811 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=1, newStatus=0
05-29 17:28:28.145   819  7811 E CameraService: onTorchStatusChangedLocked: cannot get torch status of camera 1: No such file or directory (-2)
05-29 17:28:28.146   703  2287 E CHIUSECASE: [ERROR  ] chxextensionmodule.cpp:521 ExtendOpen() ExtendOpen failed! HW resource insufficient! openCameraCost=50CostOfAnyCurrentlyOpenLogicalCameras =100, m_totalResourceBudget = 100
05-29 17:28:28.146   819  7811 I CameraProviderManager: Camera device device@3.5/legacy/0 torch status is now AVAILABLE_OFF
05-29 17:28:28.146   819  7811 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
05-29 17:28:28.147   819  7811 I CameraProviderManager: Camera device device@3.5/legacy/1 torch status is now AVAILABLE_OFF
05-29 17:28:28.147   819  7811 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=1, newStatus=1
05-29 17:28:28.148   819  7811 E CameraService: onTorchStatusChangedLocked: cannot get torch status of camera 1: No such file or directory (-2)
05-29 17:28:28.148   703  2287 E CamDev@3.2-impl: open: cannot open camera 0!
05-29 17:28:28.148   819  7811 E Camera3-Device: Camera 0: initialize: Could not open camera session: Function not implemented (-38)
05-29 17:28:28.149   819  7811 E Camera2ClientBase: initializeImpl: Camera 0: unable to initialize device: Function not implemented (-38)
05-29 17:28:28.149   819  7811 E CameraService: connectHelper: Could not initialize client from HAL.
05-29 17:28:28.149   819  7811 I Camera3-Device: disconnectImpl: E
05-29 17:28:28.151   819  7811 I CameraService: disconnect: Disconnected client for camera 0 for PID 17088
05-29 17:28:28.151   819  7811 I Camera2ClientBase: Closed Camera 0. Client was: com.geliosoft.geliosoftcamera2 (PID 17088, UID 10102)
05-29 17:28:28.153   819  7811 I Camera3-Device: disconnectImpl: E

Edit:
@jevgenp you ninja'd the entire log away. :)

@jevgenp
Copy link
Author

jevgenp commented May 29, 2021

@MartinX3 I think after camera crash in first app it became inaccessible for another. I'll upload now correct ones logs.
***Just updated post above.

@MartinX3
Copy link

05-29 17:53:32.546   812  1436 D CameraTraces: Process trace saved. Use dumpsys media.camera to view.
05-29 17:53:32.546   812  1436 E CameraDeviceClient: endConfigure: Camera 0: Error configuring streams: Function not implemented (-38)
05-29 17:53:32.547  6389  6599 E CameraCaptureSession: Session 1: Failed to create capture session; configuration failed
05-29 17:53:32.548  6389  6418 W vs.photoncamer: Long monitor contention with owner CameraBackground (6599) at void android.hardware.camera2.impl.CameraDeviceImpl.waitUntilIdle()(CameraDeviceImpl.java:1275) waiters=0 in void android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onResultReceived(android.hardware.camera2.impl.CameraMetadataNative, android.hardware.camera2.impl.CaptureResultExtras, android.hardware.camera2.impl.PhysicalCaptureResultInfo[]) for 717ms
05-29 17:53:32.549  3714  3714 V ClearcutMetricXmitter: Transmission is done.
05-29 17:53:32.550  6389  6599 W System.err: android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): endConfigure:510: Camera 0: Error configuring streams: Function not implemented (-38)
05-29 17:53:32.551  6389  6599 W System.err: 	at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1009)
05-29 17:53:32.551  6389  6599 W System.err: 	at android.hardware.camera2.impl.ICameraDeviceUserWrapper.endConfigure(ICameraDeviceUserWrapper.java:119)
05-29 17:53:32.551  6389  6599 W System.err: 	at android.hardware.camera2.impl.CameraDeviceImpl.configureStreamsChecked(CameraDeviceImpl.java:484)
05-29 17:53:32.551  6389  6599 W System.err: 	at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSessionInternal(CameraDeviceImpl.java:679)
05-29 17:53:32.552  6389  6599 W System.err: 	at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:527)
05-29 17:53:32.552  6389  6599 W System.err: 	at com.particlesdevs.photoncamera.capture.CaptureController.createCameraPreviewSession(CaptureController.java:1092)
05-29 17:53:32.553  6389  6599 W System.err: 	at com.particlesdevs.photoncamera.capture.CaptureController.captureStillPicture(CaptureController.java:1347)
05-29 17:53:32.553  6389  6599 W System.err: 	at com.particlesdevs.photoncamera.capture.CaptureController.access$300(CaptureController.java:118)
05-29 17:53:32.553  6389  6599 W System.err: 	at com.particlesdevs.photoncamera.capture.CaptureController$3.process(CaptureController.java:349)
05-29 17:53:32.553  6389  6599 W System.err: 	at com.particlesdevs.photoncamera.capture.CaptureController$3.onCaptureProgressed(CaptureController.java:394)
05-29 17:53:32.553  6389  6599 W System.err: 	at android.hardware.camera2.impl.CameraCaptureSessionImpl$1.lambda$onCaptureProgressed$2$CameraCaptureSessionImpl$1(CameraCaptureSessionImpl.java:678)
05-29 17:53:32.553  6920  6920 D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
05-29 17:53:32.554  6389  6599 W System.err: 	at android.hardware.camera2.impl.-$$Lambda$CameraCaptureSessionImpl$1$7mSdNTTAoYA0D3ITDxzDJKGykz0.run(Unknown Source:8)
05-29 17:53:32.554  6389  6599 W System.err: 	at android.os.Handler.handleCallback(Handler.java:938)
05-29 17:53:32.554  6389  6599 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:99)
05-29 17:53:32.554  6389  6599 W System.err: 	at android.os.Looper.loop(Looper.java:223)
05-29 17:53:32.555  6389  6599 W System.err: 	at android.os.HandlerThread.run(HandlerThread.java:67)
05-29 17:53:32.555  6389  6599 W System.err: Caused by: android.os.ServiceSpecificException: endConfigure:510: Camera 0: Error configuring streams: Function not implemented (-38) (code 10)
05-29 17:53:32.555  6389  6599 W System.err: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
05-29 17:53:32.555  6389  6599 W System.err: 	at android.os.Parcel.createException(Parcel.java:2357)
05-29 17:53:32.556  6389  6599 W System.err: 	at android.os.Parcel.readException(Parcel.java:2340)
05-29 17:53:32.556  6389  6599 W System.err: 	at android.os.Parcel.readException(Parcel.java:2282)
05-29 17:53:32.556  6389  6599 W System.err: 	at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.endConfigure(ICameraDeviceUser.java:799)
05-29 17:53:32.556  6389  6599 W System.err: 	at android.hardware.camera2.impl.ICameraDeviceUserWrapper.endConfigure(ICameraDeviceUserWrapper.java:116)
05-29 17:53:32.556  6389  6599 W System.err: 	... 14 more
05-29 17:53:32.559  1070  2165 I chatty  : uid=1000(system) Binder:1070_9 expire 10 lines
05-29 17:53:32.570     0     0 E binder_alloc: 3461: binder_alloc_buf size 1056768 failed, no address space
05-29 17:53:32.570     0     0 E binder_alloc: allocated: 584 (num: 8 largest: 192), free: 1039800 (num: 4 largest: 1038272)
05-29 17:53:32.571     0     0 I binder  : 6198:6331 transaction failed 29201/-28, size 1056768-0 line 3207
05-29 17:53:32.574   812  1436 I Camera3-Device: disconnectImpl: E
05-29 17:53:32.574   812  1436 E Camera3-Device: Camera 0: disconnectImpl: Shutting down in an error state
05-29 17:53:32.574   812  1436 I CameraLatencyHistogram: ProcessCaptureRequest latency histogram (48) samples:
05-29 17:53:32.574   812  1436 I CameraLatencyHistogram:        40     80    120    160    200    240    280    320    360    inf (max ms)
05-29 17:53:32.575   812  1436 I CameraLatencyHistogram:      97.92   0.00   2.08   0.00   0.00   0.00   0.00   0.00   0.00   0.00 (%)
05-29 17:53:32.575   812  1436 I CameraProviderManager: Camera device device@3.5/legacy/0 torch status is now AVAILABLE_OFF
05-29 17:53:32.575   812  1436 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
05-29 17:53:32.576   812  1436 I CameraProviderManager: Camera device device@3.5/legacy/1 torch status is now AVAILABLE_OFF
05-29 17:53:32.576   812  1436 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=1, newStatus=1
05-29 17:53:32.577  6920  6920 W le.android.kee: JIT profile information will not be recorded: profile file does not exist.
05-29 17:53:32.577   812  1436 E CameraService: onTorchStatusChangedLocked: cannot get torch status of camera 1: No such file or directory (-2)
05-29 17:53:32.577  6920  6920 W le.android.kee: JIT profile information will not be recorded: profile file does not exist.
05-29 17:53:32.578  6920  6920 W le.android.kee: JIT profile information will not be recorded: profile file does not exist.
05-29 17:53:32.582  6920  6920 D NetworkSecurityConfig: No Network Security Config specified, using platform default
05-29 17:53:32.583  6920  6920 D NetworkSecurityConfig: No Network Security Config specified, using platform default
05-29 17:53:32.598  6145  6168 I .android.diale: Waiting for a blocking GC ProfileSaver
05-29 17:53:32.605  6198  6335 I chatty  : uid=10167(com.google.android.gms) expire 22 lines
05-29 17:53:32.611     0     0 I CAM_INFO: CAM-SENSOR: cam_sensor_driver_cmd: 858 CAM_RELEASE_DEV Success, sensor_id:0x400,sensor_slave_addr:0x20
05-29 17:53:32.612     0     0 I CAM_INFO: CAM-SENSOR: msm_cam_sensor_handle_reg_gpio: 1466 Input Parameters are not proper
05-29 17:53:32.614     0     0 I CAM_INFO: CAM-SENSOR: cam_sensor_util_request_gpio_table: 792 No GPIO data
05-29 17:53:32.618   812  1436 I Camera3-Device: disconnectImpl: X
05-29 17:53:32.619   812  1436 I CameraService: disconnect: Disconnected client for camera 0 for PID 6389
05-29 17:53:32.619  6389  6599 E CameraEventsListener: onFatalError: CameraDevice.StateCallback : onError() : cameraDevice = [android.hardware.camera2.impl.CameraDeviceImpl@88078a9], error = [4]

@MartinX3
Copy link

@jevgenp
Please do a restart, let photon crash and run adb shell -n dumpsys media.camera for us. :)

@jevgenp
Copy link
Author

jevgenp commented May 29, 2021

@MartinX3
dumpsys.txt

@sraase
Copy link

sraase commented May 31, 2021

05-29 17:28:28.146 703 2287 E CHIUSECASE: [ERROR ] chxextensionmodule.cpp:521 ExtendOpen() ExtendOpen failed! HW resource insufficient! openCameraCost=50CostOfAnyCurrentlyOpenLogicalCameras =100, m_totalResourceBudget = 100

This usually happens after an error when switching between apps. Many apps do not handle this well and forget to close the camera device, blocking it for other apps even when sent to the background. Please make sure to always stop camera apps completely before starting a new one.

The logs above seem truncated. Try to run "adb logcat -c -G128m" before creating the log. To check platform behaviour, we need the CamX/CHI output.

@MartinX3
Copy link

@sraase am I allowed to share the CamX/CHI debugging instructions you gave me via email? :)

@sraase
Copy link

sraase commented May 31, 2021

Better not.

@MartinX3
Copy link

Okidoki, then I look the next time I can flash SODP on my phone and create the logs. :)
(At the moment busy with job and studies like always xD)

@jevgenp
Copy link
Author

jevgenp commented May 31, 2021

If still needed (don't know is that or not):
geliosoft.txt
photon.txt
gcam_8_2_viewfinder_freeze.txt
gcam_6_2_30_no_reaction.txt

@MartinX3
Copy link

Dear @sraase here is the special log
camera.log

I tested it with OpenGapps Pico and this GCam

@sraase
Copy link

sraase commented Jun 12, 2021

I don't get this application...

06-12 11:31:53.030 9094 9094 E ALL_TEST [ID = 0]: PASSED
06-12 11:31:53.034 9094 9094 E ALL_TEST [ID = 1]: PASSED
06-12 11:31:53.035 8975 8982 E CameraService: supportsCameraApi: Unknown camera ID 2
06-12 11:31:53.036 9094 9094 E LENS [ID = 2]: NOT_EXIST
[... trying to search for other devices by probing, which is bad...]
06-12 11:31:53.161 9094 9094 E FOUND_LENSES: [ 0 1 ]
06-12 11:31:53.162 9094 9094 E SORTS_LENSES: [ 0 1 ]
06-12 11:31:53.162 9094 9094 E AFTER_HIDING_LENSES: [ 1 ]
[... found back and front cameras, but rejects the back camera, which is weird ...]
06-12 11:31:54.007 9094 9094 E AndroidRuntime: FATAL EXCEPTION: main
06-12 11:31:54.007 9094 9094 E AndroidRuntime: Process: com.android.MGC, PID: 9094
06-12 11:31:54.007 9094 9094 E AndroidRuntime: java.lang.IllegalArgumentException: supportsCameraApi:2365: Unknown camera ID 2
[... then fails trying to open the camera which it already knows doesn't exist ...]

... it probes for all cameras (bad style, you can ask the system), then ignored the main camera (don't know any reason from the log), and then it fails trying to get the characteristics of a camera which it has already proven does not exist.

edit: The log you shared does not contain any platform information either, so no CamX/CHI stuff.

@jevgenp
Copy link
Author

jevgenp commented Jun 12, 2021

So it's google camera problem then? And any of apps that using raw?
If yes, why version that worked on AOSP9 doesn't work on AOSP11?

@MartinX3
Copy link

MartinX3 commented Jun 13, 2021

@sraase That's weird, I enabled the entire logging stuff.

@jevgenp I don't know if on Android 9 a gcam 8.1 (with this camera id hack) will work
I don't remember seeing this many camera IDs in the android 9 logs.

I try to get a gcam version without this weird camera id logic hack after speaking with some gcam developers.
Probably this will just work or we will be redirected to another error. I hope for the first one. :)

@jevgenp
Copy link
Author

jevgenp commented Jun 13, 2021

@MartinX3 I was talking about version that worked on A9 - Arnova's 1.6/2.2 (or San1ty 9.3/9.4).

@MartinX3
Copy link

@jevgenp according to their readme

GCam 6.2 for Android 9 or newer. See GCam 6.1 below for Android 8.
On some phones, GCam 6.x doesn't work on Android 10 or newer. Use GCam 7+.

@jevgenp
Copy link
Author

jevgenp commented Jun 13, 2021

@MartinX3 I know, but in this case the same version that worked on A9 (6.2.030) runs on A11, but when you press Capture button - processing message appears in notification area and doesn't disappear until you exit application.
Maybe there should be specific package name of google camera to use hdr+?
And most versions that at least runs on our phone has freezes in viewfinder after second (in 6.2.030 this issue solved enabling buffer fix in advanced settings). Is this not a system thing?

@MartinX3
Copy link

MartinX3 commented Jun 13, 2021

@jevgenp Ah I thought you get the same crash on starting the app.
Then this app doesn't have this weird camera ID logic implemented.
I'll search this app and try it with logs or you give me the link if I don't find it? :)

Edit: I think I found the app in the recommended section at 6.2/6.3 Gcam_6.2.030_Advanced_V2.2.190716.1800-Final.apk

@jevgenp
Copy link
Author

jevgenp commented Jun 13, 2021

@MartinX3 https://www.celsoazevedo.com/files/android/google-camera/f/changelog593/
Then go to Settings > About > Enable Advanced Mode and then HDR+ Control > find and enable Buffer fix.

There is a newest version (that doesn't have buffer fix in settings and viewfinder freezes) that at least starts, but you need fast press settings on startup and change setting "Level Camera2 API" to "JPEG level Full" under "Setting up the mod" to avoid crash:
https://drive.google.com/file/d/13FUye3lMS-08rd5l9_2t7aYolV-X1x8e/view?usp=sharing
image
image1

@MartinX3
Copy link

MartinX3 commented Jun 13, 2021

@sraase I was able to gather a log and receive a loop of errors.

https://f.celsoazevedo.com/file/cfiles/gcm1/Gcam_6.2.030_Advanced_V2.2.190716.1800-Final.apk
camera.log

06-13 15:09:52.758 10093 10115 E CamX    : [ERROR][FD     ] camxfdmanagernode.cpp:3598 PopulateGravityData() NCS Gravity handle is NULL
06-13 15:09:52.758 10736 10846 W CameraMetadataJV: Expect face scores and rectangles to be non-null
06-13 15:09:52.758 10736 10868 E OisListener: Null pointer for OIS data. OIS API version: 2
06-13 15:09:52.759 10736 10846 D CAM_RepeatingFRP: Processing fallback request
06-13 15:09:52.777 10093 10118 I CHIUSECASE: [REQMAP ] chxadvancedcamerausecase.cpp:6934 LogFeatureRequestMappings() frame: 357  <==>  chiOverrideFrameNum: 344  <==>  chiFrameNum: 344 -- RAW Jpeg Request
06-13 15:09:52.778 10093 10112 I CamX    : [REQMAP][CORE   ] camxsession.cpp:2744 ProcessRequest() chiFrameNum: 344  <==>  requestId: 345  <==>  sequenceId: 344  <==> CSLSyncId: 345  -- ZSLPreviewRaw_0
06-13 15:09:52.791 10093 10113 E CamX    : [ERROR][IQMod  ] camxipeica.cpp:1471 UpdatePerspectiveParamsToContext() Invalid warp data for path 0
06-13 15:09:52.792 10093 10111 I CHISENSORSONY: IMX400: set gain 3.07 (analog 3.07 digital 1.00 isp 1.00 lineCount 11602)

Or this

06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: Retrieving snapshot for com.google.android.apps.camera#org.codeaurora.snapcam failed
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: java.util.concurrent.TimeoutException: Timed out waiting for Task
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at lka.a(Unknown Source:58)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at ljg.a(Unknown Source:45)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at duv.run(Unknown Source:49)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at lqd.run(Unknown Source:2)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at java.lang.Thread.run(Thread.java:923)
06-13 15:08:24.456 10172 10211 E PhenotypeFlagCommitter: 	at loy.run(Unknown Source:5)
06-13 15:08:24.665 10172 10318 D CAM_WearMessageUtil: findBestNode failed!

@sraase
Copy link

sraase commented Jun 14, 2021

Are you using a stock Open Devices build, or did you change it in any way?

@MartinX3
Copy link

MartinX3 commented Jun 14, 2021

I just compiled AOSP 11 and use OEMv5 on my Xperia XZ2

@sraase
Copy link

sraase commented Jun 14, 2021

I built AOSP 11 using OEMv5 on Xperia XZ2, installed the APK you linked to and received the following error:

06-14 11:56:11.560 3962 3962 E AndroidRuntime: FATAL EXCEPTION: main
06-14 11:56:11.560 3962 3962 E AndroidRuntime: Process: org.codeaurora.snapcam, PID: 3962
06-14 11:56:11.560 3962 3962 E AndroidRuntime: java.lang.RuntimeException: Unable to create application com.google.android.apps.camera.legacy.app.app.CameraApp: java.lang.SecurityException: Failed to find provider com.google.android.gsf.gservices for user 0; expected to find a valid ContentProvider for this authority
06-14 11:56:11.560 3962 3962 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6724)

@MartinX3
Copy link

@sraase do you have GAPPS installed?
I use OpenGapps Pico (the smallest one)
https://sourceforge.net/projects/opengapps/files/arm64/test/20210130/open_gapps-arm64-11.0-pico-20210130-TEST.zip/download
flashed with TWRP
https://www.dhsfileserver.de/ftp/MartinX3/Xperia%20XZ2/android_11/twrp/sodp/2021-03-02_17-06-00_twrp_akari.tar.gz

GAPPS are needing a fullwipe, otherwise problems occur.

  • fastboot reboot bootloader or adb reboot bootloader
  • fastboot boot twrp.img

Sometimes if I use the hardware buttons to enter the bootloader, I just get a black screen using fastboot boot twrp.img
Probably a bootloader bug?

@sraase
Copy link

sraase commented Jun 18, 2021

Does the same issue happen with the front camera? If yes, then it is not a driver issue.

@jevgenp
Copy link
Author

jevgenp commented Jun 19, 2021

I'm far from programming, but you want to say that all of these apps that working with raw on a bunch of devices without problems doesn't work on sony and it is an apps issue? Sounds strange.

Added: https://drive.google.com/file/d/1SCiRWItXovHaCfHxHjdH3piFr5bjRnMW/view?usp=sharing
Image taken on XQ-AT51 (X 1II) with this app: https://drive.google.com/file/d/1kYzCMq5sNbDm5IfvHiW9fn0Z5w1tAKX7/view?usp=sharing
It using RAW. On AOSP it not even starts.

@sraase
Copy link

sraase commented Jun 19, 2021

No, this is not what I want to say. The drivers are one part of the camera system. If a problem happens for both the front and back cameras, then the drivers are unlikely to be at fault (different drivers).

Thanks for the APK. Issue looks similar to #544 but caused by the app requesting RAW16 format.

@jevgenp
Copy link
Author

jevgenp commented Jun 21, 2021

Maybe some more info needed? As I see Martin didn't answer your question about front camera :)
I'm ready to flash again AOSP to collect any log.

And few questions off topic but related to camera:
Is ISO 100 a minimum? according to datasheet our module supports ISO 50.
And what about vignetting and manual exposure?

@MartinX3
Copy link

I just need some free time because of job, studies and a dataloss (ssd damage, but i have an older backup and was able to recover data from the failed ssd)

On the front camera the gcam did freeze too.

And i need to analyse why i can't record and send videos in telegram anynore since I use SODP (wrong video codec it says), but that's stuff for a new ticket.

@sraase
Copy link

sraase commented Jun 21, 2021

I'm ready to flash again AOSP to collect any log.

Currently not needed. I was able to reproduce the problem, but did not look into it yet.

Is ISO 100 a minimum?

The ISO values shown are very likely wrong.

And what about vignetting and manual exposure?

Please clarify your question.

@jevgenp
Copy link
Author

jevgenp commented Jun 22, 2021

The ISO values shown are very likely wrong.

Ah ok, but in this case calculated exposure value is correct?
https://drive.google.com/drive/folders/1AAjCIUx6SnhtRFPQu19BQlKE4t5rT2eS?usp=sharing
Same app settings: Stock ISO40 @ 1/898, AOSP ISO100 @ 1/2705.
Maybe it's subjective but jpeg from AOSP more noisy for me (or it caused by underexposure)

Please clarify your question.

Me bad, talked about shutter speed.
For example in SnapCamera HDR when I try to move SS slider then this happens
Screenshot_20210622-110240
As I remember on AOSP9 manual SS worked, but minimal value was only 1/9.

What about vignetting - darkening of image corners when compared to the center.
https://drive.google.com/drive/folders/1hq3kKHhKvV0DJsZeKHtoIWrFCQMwa9zg?usp=sharing
Screenshot_4
Screenshot_3
These images from google camera on AOSP9.
As I understand phone should store info about lens and apps can use it to correct this thing.
Or it can be corrected in RAW?

@sraase
Copy link

sraase commented Jun 22, 2021

The actual exposure time (lineCount) and ISO (gain values) are shown in logcat.

CHISENSORSONY: IMX400: set gain 2.03 (analog 2.03 digital 1.00 isp 1.00 lineCount 11602)

Camera output on AOSP will have increased noise compared to Xperia, especially in darkness. This is known and cannot be fixed.

About the vignetting, please remove /odm/lib64/camera/com.sony.eeprom.blakiston.so (this will disable LSC) and see if the situation improves. Restart your device after removing.

@jevgenp
Copy link
Author

jevgenp commented Jun 22, 2021

About the vignetting, please remove /odm/lib64/camera/com.sony.eeprom.blakiston.so (this will disable LSC) and see if the situation improves

Seems yes, thanks!

Camera output on AOSP will have increased noise compared to Xperia, especially in darkness. This is known and cannot be fixed.

Noted.

And what about manual SS control?

@jevgenp
Copy link
Author

jevgenp commented Jun 22, 2021

About the vignetting, please remove /odm/lib64/camera/com.sony.eeprom.blakiston.so (this will disable LSC) and see if the situation improves.

Seems yes, thanks!

To early I made conclusion...
Screenshot_9
Screenshot_12
A little better but it still there (1st raw, 2nd jpeg).

@jevgenp
Copy link
Author

jevgenp commented Aug 17, 2021

Just tried august release with OEMv6, and now I'm unable to take raw even with SnapCamera HDR (that worked with previous build and OEMv5).
raw.txt

@sraase
Copy link

sraase commented Aug 19, 2021

Not sure what's going on. The HAL appears to open the camera correctly, then Gcam (APK linked above) throws java.lang.IllegalStateException: Unable to access OneCamera. a few times and hangs on any Photo mode; Video seems fine. Can you confirm?

@jevgenp
Copy link
Author

jevgenp commented Aug 19, 2021

Are you talking about 6.2.030 version?

@sraase
Copy link

sraase commented Aug 19, 2021

Gcam_6.2.030_Advanced_V2.2.190716.1800-Final.apk

@jevgenp
Copy link
Author

jevgenp commented Aug 19, 2021

@sraase same behavior. Only video mode working. In other modes just black screen for a while and app quits.
On previous build at least viewfinder worked :)
And as I said before SnapCamera unable to take raw anymore using c2api.
gcam.txt

@mikkorantalainen
Copy link

Vignetting is caused by actual lens optics so RAW should always show it. Software can remove/hide it, of course, so JPEG may not show any vignetting.

@jevgenp
Copy link
Author

jevgenp commented Sep 23, 2021

Do you need any new log from latest r43+oemv7? Because situation didn't change. Gapps installed.

Crashes on startup:
MGC_8.1.101_A9_GV1r_snap.apk.txt
MGC_8.3.252_V0c_MGC.apk.txt
geliosoftcamera2v4.8test3.apk.txt

Starts but not taking a photo (needs buffer fix to be enabled in advanced settings):
Gcam_6.2.030_Advanced_V2.2.190716.1800-Final.apk.txt

Viewfinder freezes in photo modes (Photo, Portrait, Night), not taking a photo:
GCam8.2_Pit-Zo-Def_mod_v1.apk.txt
GCam+8.2.204_P-Z-D.v.3.1.Snap.apk.txt

All apps here: https://drive.google.com/drive/folders/1EbpnzCUlEHxWCSnmvt8S8kawPTmeeOM-?usp=sharing

@jerpelea
Copy link
Collaborator

Discontinued Android version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants