5

I own the LG G4 (Snapdragon 808 based device).

All files reference in my post are shared here.

I'm trying to get the camera working in Q, however, I get major issues with the camera daemon crashing. We get errors like: FORTIFY: pthread_mutex_destroy called on a destroyed mutex See the log file labelled "fortify - boot_lc_crash.txt" in the shared folder.

The lib at fault is : libmmcamera2_isp_modules.so

The issue is that the pthread_mutex_destroy is called within a loop. See the image labelled "mutex destroyed in loop.jpg" in the shared folder. You can see the loop in lines 88-97.

We initially imported the same lib from another device with a similar chipset (oneplus2 - Snapdragon 808, just like the LG G4) https://github.com/aoleary/vendor_lge/commit/72e3cb5fedd04e9daa99541d298037d81754daf0 But we had issues still after that.

So, instead, we tried modifying our own lib directly, to see if the outcome would be different.

We tried to reverse engineer the libmmcamera2_isp_modules binary. We tried fixing it by hexediting the binary so the loop only executes once.

But then we have these pthread join errors : invalid pthread_t 0xea776230 passed to pthread_join See the log file labelled "pthread - boot_lc_crash.txt" in the shared folder.

We tried to edit the beq, the b and making param = 1 initially, but that didnt work out. See the image labelled "modify pthread.jpg" in the shared folder.

Any ideas ?

ROM = https://github.com/AOSIP (ten branch)

https://github.com/aoleary/device_lge_h815/tree/aosip_Q https://github.com/aoleary/device_lge_g4-common/commits/q_aol3 https://github.com/aoleary/G4-Titan-Kernel/tree/pie_mergeQ https://github.com/aoleary/vendor_lge/tree/q_aol2

0

You must log in to answer this question.

Browse other questions tagged .