yashsingh1/xdaforums huggingface dataset:
[X Style (Pure) General] defcomg:
in Camera 1 do you mean the other sliders do not show or they show but have no effect on the image.

*Note Due to focus peaking that was added preview is not restarted after moving shutter slider some devices require this to update preview. So shutter value then press button to take the image see if exposure changes.

XT1575 was not added to supported device for HFR so slowmo / 120fps video will not show in the menu

also you could try the alcatel idol 3 camera app it has the newer qualcom implimentation for manual mode will try get a copy and decompile it to see the inner workings.

My main concern is the missing options in focus and whitebalance there should be value manual

XT1575

whitebalance-values=auto,incandescent,fluorescent,daylight,cloudy-daylight
focus-mode-values=auto,infinity,continuous-video,continuous-picture

Alcatel Idol 3

whitebalance-values=auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight,twilight,shade,manual
focus-mode-values=auto,infinity,macro,continuous-video,continuous-picture,manual

Not Sure why

My Calculations may have been wrong the parameters say max-exposure-time=657.770600 before the value was in seconds but i think qualcomm switched it to deciseconds in newer camera framework so its about 65.77706 seconds making it third after the alcatel idol 3 693.863262.

The Nubia Z7max Z7mini Z7 has a maximum exposure time of 21 min
[X Style (Pure) General] zittorb:
sliders_camera1

touch for focus works...in slider "window" too.... peaking focus works but has to be set on after every pic.....

i was very surprise about the "macro"u can get.... maby the torch icon on the slider "window" too and it could became the macro king. i have tryed other specific macro apps and this one makes the sharpest focus!

i can see this slides in camera1:

exposure _ works - livewview/pic

brightness _ not

contrast _ not

saturation _ not

sharpness _ not

zoom _ works - ivewview/pic

_/\_
[X Style (Pure) General] defcomg:
That's very strange shutter does not show up on the manual menu sliders will have a look at the code later maybe I messed up somewhere. By the way you can turn on focus peak .

Everything with yellow highlight is the area in focus areas in blue show shadow detail clipping areas in red highlights clipping.

---------- Post added at 08:06 AM ---------- Previous post was at 08:03 AM ----------

By the way when in camera2 does it say limited legacy or full
[X Style (Pure) General] knince:
Thanks for all the hard works. If you could post some pics it would be great
[X Style (Pure) General] dudaka:
Is slow motion video working on google camera app?
[X Style (Pure) General] schaggo:
Probably due to me having XT1572 (EU/Intl Moto X Style) and you probably hardcoded XT1575 but Camera2 doesn't say anything. See screenshots attached for your convenience.

Thanks for looking into this by the way.
[X Style (Pure) General] defcomg:
hmm okay test the apk below also if you could give stock camera apk and entire /framework/folder. I think motorola maybe using an alternate framework than all the other apps have access to .

ive hardcoded all the xplay x pure x play models so the manual exposure time should show up its in its basic form so it will show time value as it gets from the hardware therefor it will not show 1/5 1/8000 etc but rather 66.111112 etc.
[X Style (Pure) General] mademan420:
Since they have the same hardware on paper, maybe a software update will get it to where the Droid Turbo 2 is according to DXOmark
[X Style (Pure) General] benjamminh:
Fwiw, not exactly the same hardware as the turbo 2 has the SD810 and the Pure/Style has the 808, but they have the same camera sensor. Hopefully a software update will give the Pure some improvement.
[X Style (Pure) General] schaggo:
Will do ASAP and report back.

Sure. You'll find it here, let me know if the upload is sh** and I'll mirror it elsewhere: xt1572_framework.7z
[X Style (Pure) General] Bobby060:
Manual exposure doesn't show up. In fact, there are less options now than in the older one. Trying to change focus mode causes a force close.
[X Style (Pure) General] defcomg:
create a folder named DEBUG inside /DCIM/FreeDcam/ it will log freedcam after FC it should produce an output

Below are the device it should detect so i wonder why shutter slider not showing up

[HIDE]+ <string-array name="isX_Style_Pure_Play">
+ <item>XT1560</item>
+ <item>XT1561</item>
+ <item>XT1562</item>
+ <item>XT1563</item>
+ <item>XT1564</item>
+ <item>XT1565</item>
+ <item>XT1566</item>
+ <item>XT1567</item>
+ <item>XT1568</item>
+ <item>XT1570</item>
+ <item>XT1571</item>
+ <item>XT1572</item>
+ <item>XT1573</item>
+ <item>XT1574</item>
+ <item>XT1575</item>
+ <item>XT1576</item>
+ <item>XT1577</item>
+ <item>XT1578</item>
+ </string-array>[/HIDE]

https://github.com/defcomk/FreeDcam/commit/c0f693c1c2d308d5d465cc970eb0746ad8067e80
[X Style (Pure) General] Bobby060:
It also isn't taking pictures. I'll set up a folder and test more exhaustively later.
[X Style (Pure) General] btoledob:
I just created the DEBUG folder inside DCIM/FreeDcam but after FC event, the debug file is on DCIM folder, not on DEBUG folder.

DEBUG FILE

https://titanpad.com/7NqQdVtJYq

Some prints.

https://s02-cdn.anonfiles.com/f5e64186b1e7c8f30b330a5ef0d45b5c.jpg

https://s01-cdn.anonfiles.com/dce5b8572c62bf47905c7d2eead31e02.jpg

https://s02-cdn.anonfiles.com/45a3bc1e53de25b060db054740c7405c.jpg

https://s02-cdn.anonfiles.com/ee8845c8e911d6df7ea126b9bf0021c3.jpg

https://s03-cdn.anonfiles.com/6888e1f3305bb0acaf5076f257e6a2fa.jpg

https://s01-cdn.anonfiles.com/511eedbb12dd55d52228e7f05764e2a6.jpg

https://s01-cdn.anonfiles.com/6ba5d11cf67444e69dc6c7ed4804e6df.jpg

https://s02-cdn.anonfiles.com/3ba9ec8bdaf341be8e476f48feea4b8d.jpg

Thank you, sir.
[X Style (Pure) General] amathophobia:
[MENTION=377973]defcomg[/MENTION] Thank so very much for looking into this for us. I believe that motrola provided us with a good camera module but then backed it up with awful software. Any progress that you make will be extremely appreciated.
[X Style (Pure) General] Bobby060:
Also, is RAW image capture a possibility? How much could we feasibly do if Motorola doesn't open it up themselves?
[X Style (Pure) General] defcomg:
Could somehow figure the motCtrl built into the hal and command it to dump raw

- Figure out exactly what they did to criple camera2 api

- Build New Hal from source probably need camera folder from 5x device tree

- This option has worked on many devices changing picture format to bayer then encoding it as dng but Motorola seems to have cripled this with supported picture formats perhaps it may accept another format other than jpeg

- im not sure but there is a rdi param found in the hal rdi is short for raw dump interface perhaps enabling this will allow the use of the android rawCallback api.

:good:

Attached new test apk hardcoded shutter values 1/4000 - 1/1.5

by the way if rooted goto terminal and type su getprop look for persist.camera.HAL3.enabled and the value next to it
[X Style (Pure) General] btoledob:
I now see the hardcoded values on the slider, but I don't know if it is working because I can't take any picture. When I move it all the way down, FC.

I'm not rooted, but opening a ADB shell gives me this: [persist.camera.HAL3.enabled]: [0]
[X Style (Pure) General] defcomg:
also this

add this to build.prop

persist.camera.raw.dump=1

persist.camera.raw.debug.dump=1

Goto Freedcam > Settings > Zero SHutter Lag turn it off

it should dump raw files to /data/ after each normal jpeg snapshot there should be a file with extension .raw if this works could redirect path to sdcard and have freedcam convert it to dng

---------- Post added at 11:38 PM ---------- Previous post was at 11:32 PM ----------

[MENTION=2397928]btoledob[/MENTION]

at which value ?

also if you have the crash log from DCIM/FreeDcam/ that would help

interesting this is the line that determines if camera2api is used will need someone who is rooted to add persist.camera.HAL3.enabled=1 to build.prop and see what happens.

also another way to check if shutter value set is to set for example 1/2000 then in settings save camera paramters and look at cur-exosure-time value is its 0.5 its set same goes for iso and cct
[X Style (Pure) General] btoledob:
OK, just one minute

---------- Post added at 10:50 PM ---------- Previous post was at 10:40 PM ----------

1/1.5

DEBUG:

https://titanpad.com/PTangoUmTm
[X Style (Pure) General] defcomg:
thats the camera parameters not the debug but i see why its crashing i think it is working because it crashes on 1/1.5 because it exceeds 657.770600, 1/1.5 = 666

will correct can you try turn off zero shutter lag and take a picture need the debug log to see whats happening
[X Style (Pure) General] btoledob:
Ops! sorry! my bad

Wait a minute.

update: it is working :) now I'm trying to get the log file.

---------- Post added at 11:12 PM ---------- Previous post was at 10:59 PM ----------

The log file is not showing up, even after the FC...
[X Style (Pure) General] Bobby060:
So, that new build doesn't quite work. I'm rooted so I'll try the terminal thing when I get home using adb. Mobile terminal didn't seem to do anything. I'm not a developer, so I can't do much more than test and look, sadly...
[X Style (Pure) General] defcomg:
is the folder named DEBUG still in freedcam dir ?
[X Style (Pure) General] btoledob:
Now it is, hehehe :D

http://s000.tinyupload.com/index.php?file_id=42317183127622274859
[X Style (Pure) General] Bobby060:
Ok, changing that build prop value caused FreeDCam to crash. BUT it caused some amazing things otherwise.

https://drive.google.com/folder/d/0BzC2cX71stOzZzJ0QndaTHVwLTg/edit

EDIT: not there yet. Actual manual cam just shows a black screen for camera preview and won't take photo.

EDIT 2: I didn't add the first two build prop values, so I'll try that later. My phone is almost dead now. ;)
[X Style (Pure) General] Bobby060:
Here is the output from the manual camera test: Device: motorola, XT1575 (clark_retus), Android 5.1.1 LPH23.116-18

Rear camera:

Manual Focus: YES, Manual WB: NO, Manual ISO: YES, Manual Speed: YES, RAW: YES, Hardware level: FULL, Capabilities: BACKWARD_COMPATIBLE, MANUAL_SENSOR, MANUAL_POST_PROCESSING, RAW, , Focus distance: 10.000000, ISO range: 50-6339, Speed range: 16733-657770600, JPEG sizes: [5344x4008,5344x3006,4160x3120,4320x2432,4160x2340,3840x2160,3264x2448,3264x1836,2592x1944,2592x1458,1920x1080,1440x1080,1280x960,1280x720,640x480,352x288,] 5344x4008, RAW sizes: [5344x4016,], Preview sizes: [5344x4008,5344x3006,4160x3120,4320x2432,4160x2340,3840x2160,3264x2448,3264x1836,2592x1944,2592x1458,1920x1080,1440x1080,1280x960,1280x720,640x480,352x288,]

Front camera:

Manual Focus: NO, Manual WB: NO, Manual ISO: YES, Manual Speed: YES, RAW: YES, Hardware level: FULL, Capabilities: BACKWARD_COMPATIBLE, MANUAL_SENSOR, MANUAL_POST_PROCESSING, RAW, , Focus distance: 0.000000, ISO range: 50-1300, Speed range: 16800-524633088, JPEG sizes: [2592x1944,2592x1458,1920x1080,1440x1080,1280x960,1280x720,640x480,352x288,] 2592x1944, RAW sizes: [2592x1944,], Preview sizes [2592x1944,2592x1458,1920x1080,1440x1080,1280x960,1280x720,640x480,352x288,]
[X Style (Pure) General] defcomg:
Somehow the preview does not seem to wanna start not sure if something has to be done android side for camera2 to work the fc is caused by camera not returning parameter while in camera2 mode
[X Style (Pure) General] Bobby060:
So the same bug probably caused the other manual cameras to not work. Perhaps the preview is the only issue, that would be nice. Any ideas how to fix that with system mods?
[X Style (Pure) General] Bobby060:
Here are camera related build prop, what would changing the preview one do?
[X Style (Pure) General] defcomg:
need to enable hal debug then run camera2 app on Xstyle enable same hal debug on a 5x then compare the outputs it maybe libcamera_client or libcamera_service that has issue starting preview need a rom dev to chime in because the HTC One M9 has same issue it returns it camera2 compliant but also black preview

---------- Post added at 01:02 AM ---------- Previous post was at 12:57 AM ----------

It's because of focus peak is on i will foward it to [MENTION=5128617]troopii[/MENTION] he will know whats up with it
[X Style (Pure) General] defcomg:
does this crash ?
[X Style (Pure) General] Bobby060:
Works, sorta. It opened, allowed me to switch to raw mode, captured one raw photo (except no raw editor I have will read it, says file is corrupted), then started crashing. Now it force closes on opening.

Error output: https://drive.google.com/file/d/0BzC2cX71stOzRmVBSVdDbmNoMkE/view?usp=sharing
[X Style (Pure) General] defcomg:
can you share the raw file it outputed
[X Style (Pure) General] Bobby060:
It's uploading to that same Google drive folder where the bug reports are.

EDIT: it's 41mb and my Internet is slow, so it might be a while.
[X Style (Pure) General] defcomg:
seems about right size for the sensor from the log the crash is exposure time related
[X Style (Pure) General] Bobby060:
I still couldn't see exposure settings in there.

---------- Post added at 11:55 PM ---------- Previous post was at 11:51 PM ----------

And once they upload, there will be another folder with three reports that I think happened while I was messing with it taking the dng
[X Style (Pure) General] defcomg:
See if this starts on start up

Downloading the raw file but from the preview on Gdrive the endianess seems switched around something went wrong in the conversion but atleast it got to stage of capturing it
[X Style (Pure) General] Bobby060:
Negative. Crashes on start. Log in g drive.
[X Style (Pure) General] defcomg:
try clear app cache
[X Style (Pure) General] Bobby060:
Cache and data cleared. And it was a clean install: no luck.
[X Style (Pure) General] defcomg:
how did you get it to start the first time having a look at the raw when opened as bayer structure is the same as m9 output

https://imgur.com/a/JmPYv

so the error is in packing

below are meta from the dng

ExifTool Version Number : 9.69
File Name : IMG_2015.10.29_18.25.39.dng
Directory : C:/Users/GeorgeKiarie/Downloads
File Size : 41 MB
File Modification Date/Time : 2015:10:30 02:25:15+02:00
File Access Date/Time : 2015:10:30 02:08:40+02:00
File Creation Date/Time : 2015:10:30 02:08:40+02:00
File Permissions : rw-rw-rw-
File Type : DNG
MIME Type : image/x-adobe-dng
Exif Byte Order : Little-endian (Intel, II)
Subfile Type : Full-resolution Image
Image Width : 5344
Image Height : 4016
Bits Per Sample : 16
Compression : Uncompressed
Photometric Interpretation : Color Filter Array
Image Description :
Make : motorola
Camera Model Name : XT1575
Strip Offsets : (Binary data 35113 bytes, use -b option to extract)
Orientation : Horizontal (normal)
Samples Per Pixel : 1
Rows Per Strip : 1
Strip Byte Counts : (Binary data 24095 bytes, use -b option to extract)
X Resolution : 72
Y Resolution : 72
Planar Configuration : Chunky
Resolution Unit : inches
Software : motorola/clark_retus/clark:5.1.1/LPH23.116-18/18:user/release-keys
Modify Date : 2015:10:29 23:25:39
CFA Repeat Pattern Dim : 2 2
CFA Pattern 2 : 0 1 1 2
Copyright :
Exposure Time : 1/30
F Number : 2.0
ISO : 95
Date/Time Original : 2015:10:29 23:25:39
Focal Length : 4.7 mm
TIFF-EP Standard ID : 1 0 0 0
DNG Version : 1.4.0.0
DNG Backward Version : 1.1.0.0
Unique Camera Model : XT1575-motorola-motorola
CFA Plane Color : Red,Green,Blue
CFA Layout : Rectangular
Black Level Repeat Dim : 2 2
Black Level : 64 64 64 64
White Level : 1023
Default Scale : 1 1
Default Crop Origin : 8 8
Default Crop Size : 5336 4008
Color Matrix 1 : 0.609375 0.015625 -0.1328125 -0.9296875 1.828125 0.0546875 -0.4375 0.6015625 0.5
Color Matrix 2 : 0.875 -0.0390625 -0.421875 -0.890625 2.1328125 -0.4140625 -0.1875 0.421875 0.453125
Camera Calibration 1 : 0 0 0 0 1 0 0 0 0
Camera Calibration 2 : 0 0 0 0 1 0 0 0 0
As Shot Neutral : 0 0 0
Calibration Illuminant 1 : D65
Calibration Illuminant 2 : Standard Light A
Forward Matrix 1 : 0.8046875 -0.140625 0.296875 0.3984375 0.484375 0.1171875 0.15625 -0.5390625 1.2109375
Forward Matrix 2 : 0.765625 -0.2734375 0.46875 0.3203125 0.34375 0.3359375 0.0546875 -0.9375 1.703125
Opcode List 2 : (Binary data 3908 bytes, use -b option to extract)
Noise Profile : 0.00072030654 0 0.00072030654 0 0.00072030654 0
Aperture : 2.0
CFA Pattern : [Red,Green][Green,Blue]
Image Size : 5344x4016
Shutter Speed : 1/30
Focal Length : 4.7 mm
Light Value : 7.0

Raw Digger can read it
[X Style (Pure) General] Bobby060:
I'm guessing the m9 problem isn't resolved either? So we are probably in around the same spot?

Ok, so I restarted it and it worked(ish). I was able to take several more of our flawed raw images. Manual iso/shutterspeed don't show up. jpeg still works fine.
[X Style (Pure) General] defcomg:
this is missing data

As Shot Neutral : 0 0 0

Dcraw Can read it

i ran dng_validate from adobe

seem calibration data is missing

C:\Users\GeorgeKiarie\Downloads\Compressed\AdobeDNGValidatorUI-0.2beta>dng_validate -v C:\Users\GeorgeKiarie\Downloads\IMG_2015.10.29_18.25.39.dng > XplaY_validate.txt
*** Error: Matrix math error ***
*** Error: CameraCalibration1 is not invertable ***

if you pass another matrix to dng writter dng should open fine on all programs
[X Style (Pure) General] Bobby060:
I really don't understand much of what you just said. :)

What I got was that the phone doesn't give any calibration data to the raw file it outputs to apps looking for a raw file, so we need to add that. Which I don't know how to do. But it is capturing a raw file, so that's good. Now to refine it and get the other manual settings working.

---------- Post added at 01:16 AM ---------- Previous post was at 01:16 AM ----------

Thanks so much for helping with this. You don't even own this phone, do you?
[X Style (Pure) General] defcomg:
[MENTION=5128617]troopii[/MENTION] will know whats up with those manual controls i haven't really messed around with camera2 api

To be continued i'm out ....
[X Style (Pure) General] defcomg:
nope i don't own the phone and yup about needing to add the camera profile/matrix

below is dcraw you can play with the raws in the mean time

its command line app

put it in the same folder as the raw files these commands will give 16bit tiff

Raw Color Space

dcraw.exe - v -T -6 -o 0 -a rawfilename.dng

Srgb Color Space

dcraw.exe - v -T -6 -o 1 -a rawfilename.dng

Adobe RGB Color Space

dcraw.exe - v -T -6 -a -o 2 rawfilename.dng

ProPhoto Colorspace

dcraw.exe - v -T -6 -a -o 2 rawfilename.dng

where rawfilename.dng replace with your filename
[X Style (Pure) General] Bobby060:
Oh sweet. I'll mess with that if I have time. Thanks!
[X Style (Pure) General] Bobby060:
On another note, all other camera apps on my phone are broken now. So random reader, beware!
[X Style (Pure) General] troopii:
when you set the flag for camera2 it gets forced to use it. if the app now expect camera1 as api the app will crash!

some notes to freedcam and activating manual modes.

to have manual shutter and iso you must turn ae off

to have manual wb you must turn off wb and set colorcorretion mode to transform_matrix.

to have contrast and brightness you must set tonemap to contrast_curve
[X Style (Pure) General] defcomg:
[MENTION=5713005]Bobby060[/MENTION]

Attached below is freedcam with an alternate DngWritter to try fix corrupt dng
[X Style (Pure) General] Bobby060:
Sweet. I'll test it. :)

---------- Post added at 07:32 PM ---------- Previous post was at 07:22 PM ----------

That's another negative. Still corrupt. And I still can't get the manual shutter to show up by disabling ae.

---------- Post added at 07:35 PM ---------- Previous post was at 07:32 PM ----------

Never mind. Shutter speed works, I just didn't know where to look..
[X Style (Pure) General] defcomg:
can you compare the size with your previous dng files is manual focus working ?
[X Style (Pure) General] Bobby060:
Focus, iso, and shutter speed all work. Dng size is 0 bytes. I'm going to try setting those persist raw flags and see if it does anything.
[X Style (Pure) General] defcomg:
thats fine give me the debug log
[X Style (Pure) General] Bobby060:
The debug folder is empty. Even after trying to take several raws and some jpegs
[X Style (Pure) General] defcomg:
see if this saves raw files with the extension .raw
[X Style (Pure) General] Bobby060:
It does. 40mb
[X Style (Pure) General] defcomg:
could you give me the size in bytes ie my device size is 16,424,960
[X Style (Pure) General] Bobby060:
Here. You can even have an MD5...
[X Style (Pure) General] defcomg:
lets see what happens with this
[X Style (Pure) General] Bobby060:
Nothing. Doesn't even output a raw.
[X Style (Pure) General] defcomg:
i didn't add the mediascan code so it might not show in some file exolorer until reboot because i added the delete .raw file after dng has saved :o
[X Style (Pure) General] Bobby060:
Still couldn't find it after reboot.

---------- Post added at 08:57 PM ---------- Previous post was at 08:43 PM ----------

To what extent could a custom rom show more potential? I know it doesn't work out of the box on AICP, but maybe with mods?
[X Style (Pure) General] defcomg:
the error is on freedcam side at the moment the phone is fine stock rom is fine.

What i'm trying todo is save the bayer data as dng with freedcam dng writer since the android one has issue with metadata coming from camera2.

This way we can add custom metadata to dng freedcam's dng writter is the same one used in camera1 devices to save dng's so i have to save the bayer raw file to device then send that file path to dng writer after which it erases the .raw file leaving you with a working dng.

[MENTION=5128617]troopii[/MENTION] knows more about the camera2 side of freedcam than i do so im just winging it atm :silly:

Git: https://github.com/defcomk/FreeDcam/commits/master

Uploading .....

Edit ---------

Attached below are two apk's

Freedcam - Test see if it saves dngs

DngParser - Open Navigate to where *.raw files are saved select them then start conversion it output dng's a temp method till [MENTION=5128617]troopii[/MENTION] can figure out where i messed up lol
[X Style (Pure) General] Bobby060:
Cool. I'm going to see if AICP will let me use other manual cameras by switching the flag on build prop. It would be great to have more camera apps than just freedcam working at once. ?
[X Style (Pure) General] defcomg:
Upload complete.

In theory all camera2 apps should work with the build.prop flag but dng might be problematic
[X Style (Pure) General] Bobby060:
Right now, manual cam doesn't start a preview and neither does any other camera I've tried (not that I know of many). Open Camera gave a "see if another device is using your camera" error when I tried to use it on camera 2 mode. I'll try a few more things once I try something AOSP based. So I'll test your apps in a while. 13gb nandroids take foreeevveeerr
[X Style (Pure) General] defcomg:
theres also this https://github.com/PkmX/lcamera and this https://play.google.com/store/apps/details?id=com.almalence.opencam&hl=en Happy Testing
[X Style (Pure) General] Bobby060:
Thanks!

---------- Post added at 10:18 PM ---------- Previous post was at 09:37 PM ----------

The converter works like a charm. The new camera still doesn't output though. I reverted to an older one to test.

---------- Post added at 10:23 PM ---------- Previous post was at 10:18 PM ----------

Ok, manual focus kind of works. It works in preview, but goes haywire when actually taking the picture.
[X Style (Pure) General] defcomg:
haywire ?
[X Style (Pure) General] Bobby060:
It defocuses when you hit the shutter button. Picture comes out blurry
[X Style (Pure) General] defcomg:
i see will let troop know i do not have a camera2 device not sure if this is standard behavior or just an issue on moto x but the issue is noted :good:
[X Style (Pure) General] troopii:
[MENTION=5713005]Bobby060[/MENTION]

pls try this

should fix mf problems and save a dng
[X Style (Pure) General] cronoc:
Glad you guys are working on this!
[X Style (Pure) General] droider007:
Will this work on moto x play?

Both have 21 mp sensor
[X Style (Pure) General] defcomg:
It should give it

a try just add the flag to build.prop