MRA58k CameraLib Mod

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
Attached below is a zip containing two folders AFG and BFG each contains a modded libmmcamera_imx179.so each modified to increase maximum exposure time to 64secs test each see which one increases max expo time
 

Attachments

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
Some instructions and results would be awesome.
Kindly explain the mod in detail and how to use it.
Copy the lib to /system/vendor/lib/ set rw-r-r permission

Open some camera 2 app check if max exposure time is now 64sec

As I said there are two libs see which one works I do not have a nexus 5 so I did not test it
 

Tagtag123

Senior Member
Sep 26, 2010
380
123
0
None work.
I copied and set the permissions rw-r-r
Tried L camera and camera fv5, max exposure is still 0.8s.
Would be super cool, if you could make it work.
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
Hmmm need to find the line count value.

The Maximum Exposure Times is Calculated (Frame Length * 1000000000 / pixel Clock) * Maximum Line Count .

The Maximum Line Count value is what they limit when searching for this value its supposed to be after the maximum analog iso value . I tested this on the nexus 6p LG G4 and one plus 2.

So in Nexus 5 Case it's 3440 x 1000000000 / 260000000 resulting in 13230.76923076923 this number is rounded up to 13231 giving the minimum exposure time

Given we know the Max Exposure time is 866975130 we div it with 13231 it gives us 65526.04716196811 so round down the value to just 65526 so the value range we looking for is between 65525 and 65535 its a 32 bit int hex value .

The two libs I had modified where values just after max analog gain and before . Attached 200mhz zip with pixel clock clocked down from 260 MHz to 200mhz to make sure there are no decimals to see what value.

You can run dumpsys media.camera > /sdcard/dump.text after typing su command in terminal to see if max exposure changed as well as min
 

Attachments

Tagtag123

Senior Member
Sep 26, 2010
380
123
0
Copy the lib to /system/vendor/lib/ set rw-r-r permission

Open some camera 2 app check if max exposure time is now 64sec

As I said there are two libs see which one works I do not have a nexus 5 so I did not test it
Hmmm need to find the line count value.

The Maximum Exposure Times is Calculated (Frame Length * 1000000000 / pixel Clock) * Maximum Line Count .

The Maximum Line Count value is what they limit when searching for this value its supposed to be after the maximum analog iso value . I tested this on the nexus 6p LG G4 and one plus 2.

So in Nexus 5 Case it's 3440 x 1000000000 / 260000000 resulting in 13230.76923076923 this number is rounded up to 13231 giving the minimum exposure time

Given we know the Max Exposure time is 866975130 we div it with 13231 it gives us 65526.04716196811 so round down the value to just 65526 so the value range we looking for is between 65525 and 65535 its a 32 bit int hex value .

The two libs I had modified where values just after max analog gain and before . Attached 200mhz zip with pixel clock clocked down from 260 MHz to 200mhz to make sure there are no decimals to see what value.

You can run dumpsys media.camera > /sdcard/dump.text after typing su command in terminal to see if max exposure changed as well as min
None of the camera apps work with the 200mhz lib.
 

Tagtag123

Senior Member
Sep 26, 2010
380
123
0
Try this one
Doesn't work, I get a green line on the bottom of the viewfinder. The viewfinder preview moves from left to right in the form of two images. Images clicked are bands of what seems to be corrupted data.
The exposure is still 0.8s in l camera and camera fv5
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
Doesn't work, I get a green line on the bottom of the viewfinder. The viewfinder preview moves from left to right in the form of two images. Images clicked are bands of what seems to be corrupted data.
The exposure is still 0.8s in l camera and camera fv5
Screenshot also make a dumpsys it could be that the 0.8s is hardcoded in the apps
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
There are two res arrays in the preview res I set the clock to 50mhz and the other folder two both res if max expo is still 0.8 its hardcoded in libmmcamera_sensor_modules.so I will need that lib
 

Attachments

Tagtag123

Senior Member
Sep 26, 2010
380
123
0
There are two res arrays in the preview res I set the clock to 50mhz and the other folder two both res if max expo is still 0.8 its hardcoded in libmmcamera_sensor_modules.so I will need that lib


Trying both libs, will revert asap.
utkarshnarain at gmail dot com, for live testing