yashsingh1/xdaforums huggingface dataset:
[X Style (Pure) General] lmulli:
Doesn't appear to work with Stock 6.01 Rom, resulting in a black screen when booting the device. Now to find the original files that I overwrote.....
[X Style (Pure) General] ilovemeow:
always rename the original one with.bak

just in case
[X Style (Pure) General] defcomg:
Try rename this to camera.msm8992.so and overwrite http://xdaforums.com/moto-x-style/general/cameramod-t3420739/post67806940
[X Style (Pure) General] lmulli:
Normally do, but did this whilst out and about Mountain Biking during a break.
[X Style (Pure) General] lucianogm:
Can you please share the file? Because I'm also stuck in a black screen, but mine is on ''Starting apps.'' and never finishes.
[X Style (Pure) General] lmulli:
I used the file as mentioned above, and although it didn't allow the camera to work, it did allow me to boot. I ended up dirty flashing the rom which didn't wipe anything in any case.
[X Style (Pure) General] lucianogm:
I ended up backing up everything except system, flashed the 6.0.1 zip again and restored. Now it boots just fine, but it's a pain in the ass to redo all the changes I made before. oh well, that happens because of not making a backup.
[X Style (Pure) General] defcomg:
Share the stock lib from your ROM I can patch that
[X Style (Pure) General] lucianogm:
There you go!
[X Style (Pure) General] defcomg:
Done
[X Style (Pure) General] lucianogm:
Same steps, right? (replace the original file in system/lib/hw/)
[X Style (Pure) General] defcomg:
Yup
[X Style (Pure) General] lucianogm:
Worked! Thank you.
[X Style (Pure) General] defcomg:
No problem
[X Style (Pure) General] ilovemeow:
quick question

Should I select camera 1or 2ftom menu?

coz when I select camera2, those advance setting will be gone
[X Style (Pure) General] vandal4e:
so the file from the 1st post is intended for stock rom 6.0.1 or 5.1.1 stock aswell?
[X Style (Pure) General] lykos:
I think it was intended for stock 6.0.0; I think the one posted earlier was for 6.0.1 and the one he did for me was for CM13 based roms. I don't think we have one for CAF roms yet tho. I believe they use some different libs from CM for camera.

OP: Now that you've went through so much trouble for us I think it would be a great idea to update the main post with the new files for each rom you've already done. That way people don't just read the MT and say "it doesn't work for me".

Also do you have a guide on how/what your editing? I'd love to learn how to do it myself.
[X Style (Pure) General] faris:
Or make a recovery installable for us noobs
[X Style (Pure) General] defcomg:
Made an app to make it easier

Libchanger 1.0 [Enable 60fps Video Recording][ROOT]

http://xdaforums.com/nexus-6p/themes-apps/enable-60fps-video-recording-libchanger-t3424621

Install The App Tap on Select Mod then other list select either Enable_Raw if it causes camera to have black preview or not work select ALT_Enable_Raw if your on a cm ROM select CM_Enable_Raw then it will ask to reboot and that's it
[X Style (Pure) General] lykos:
For some reason this app didn't actually do anything for me. I tried it when I flashed Mokee (CM), AICP (CM), and Orion (AOSPB/CAF). I tried all the options; it would say that it flashed and asked me to reboot but when I did there was no option for raw. There wasn't any black screen like before either. Just seemed like nothing had changed at all. So I went back to swapping the files myself
[X Style (Pure) General] defcomg:
Seems like the app was an epic fail I tested plenty before making the post however I tested it on a kit kat device I think it may have todo with marshmallow permissions.

It saves the binary to SD/Libchanger then executes dd command to write it to system I think its probably unable to write to SD card/internal SD breaking the whole operation should have added a check to see If temp file exists before continuing but glad you managed .

https://m.youtube.com/watch?v=48r5hSKefoc&client=mv-google&gl=ZA&hl=en
[X Style (Pure) General] lykos:
Ah, that sucks M8. At least the edits are good and can be manually pushed.

I noticed that the app was to enable 60FPS on other phones. I know the IMX230 can do 60FPS @ FHD but moto locked it down for some reason--I think they were saying it was due to processing power but the Nexus 5x has the same processor and can do it--do you think you'd be able to enable that in the future?

I know clark isn't really a super dev heavy device so it's alright if you're busy with other devices.
[X Style (Pure) General] defcomg:
Sure 60fps shouldn't be that hard to activate pretty much the same process on all the device identify the res configs and registers the rest is simple.

attach libmmcamera_mot_imx230.so i have the file but not sure from what ROM version its from should be in vendor folder
[X Style (Pure) General] lykos:
This is from the latest CM13. I'm hoping someone on stock can try the first mot lib you posted because I believe it was just stock 6.0.0

Q: Is Bayer supposed to be in the menu? I notice whenever I try to take a picture in that mode that it just end up being black and undeletable in the freed gallery. I also notice this same effect when switching the format to any of the qcom (from midi) while in dng.
[X Style (Pure) General] defcomg:
Yeah Bayer is straight from the camera sensor this is what is repacked into a dng container the reason the other qcom formats seem to fail is because the raw sample we had from moto x was in mipi format .

there is no difference in final image as they are all raw the only difference is how the data is packed on the qcom formats data for pixel is packed in a 64bit word for the mipi format each pixel is packed in 5bytes reason for this it was so that some devices could drop the fifth byte leaving the device with 8bits of image data.

The reason there is an option for Bayer format is some devices have mipi formats disabled ie HTC one m8 android L + only qcom worked. Packing mipi to dng takes a couple of seconds so if you need to shoot rapid shots switching to Bayer would allow faster shots in the freedcam image viewer there is a manual convertor to pack Bayer into dng that's the reason Bayer still shows in the menu even when dng is supported.
[X Style (Pure) General] lykos:
Ah, that makes sense on why changing to qcom breaks the camera but you said "if you need to shoot rapid shots switching to bayer would allow..." but as I mentioned above switching to bayer even in midi format results in pure black picture that are undeletable in the freed gallery.

I'm not really planning on using it anyway, but I thought I'd report it to you. DNG is fine as I already pay for adobe's photography plan.

Just so I get the gist of it tho; Bayer is like the ORF from my E-M10? Like the sensors core format but DNG is, ofcourse, the more standard/highly used adobe format.
[X Style (Pure) General] defcomg:
Bayer is raw in its purest form, raw in it's purest form contains no context its pretty abstract orf cr2 rw2 dng nef are all containers they add context to the raw file they add information such as width height bit depth black level white level Lens info and the standard exif metadata this is what they call the header the header + raw data makes the file readable without the header the lightroom Photoshop does not know what todo with these files .

So freedcam dumps raw from the sensor generates header adds the raw data and produces the dng.
[X Style (Pure) General] defcomg:
Bayer is raw in its purest form, raw in it's purest form contains no context its pretty abstract orf cr2 rw2 dng nef are all containers they add context to the raw file they add information such as width height bit depth black level white level Lens info and the standard exif metadata this is what they call the header the header + raw data makes the file readable without the header the lightroom Photoshop does not know what todo with these files .

So freedcam dumps raw from the sensor generates header adds the raw data and produces the dng.

Oh yeah attached 60fps test lib process should be the same as I posted on the 6p thread. The imx230 has some huge registers so I just increased output data rate if fps does not reach 60 I can increase the data rate some more
[X Style (Pure) General] lykos:
Nice, I'm learning more from you than I learned from high school photography elective. Thanks for the information! :highfive:
[X Style (Pure) General] defcomg:
Cool:highfive:
[X Style (Pure) General] lykos:
No luck with the mot lib. It ended up crashing FreeD and just showed black screens in every other camera app I have on my phone. I first just copied the rw-r-r file and rebooted. After that didn't work I tried with rw-rw-r permissions however that also resulted in nothing but crashes and black screens.
[X Style (Pure) General] defcomg:
Wait it crashed all the camera apps that doesn't sound right I will recheck I may have accidentally typed on the hex editor will report back asap
[X Style (Pure) General] kcipopnevets:
This doesn't work on stock Lollipop, right? I have to step up to at least stock Marshmallow to append these changes?

If nobody's tried yet, I'm willing to try myself.
[X Style (Pure) General] defcomg:
I dunno if the hal is the same but if not upload the camera.msm8992.so from the lollipop rom
[X Style (Pure) General] kcipopnevets:
Yes sir! Here you go.
[X Style (Pure) General] defcomg:
Here you go
[X Style (Pure) General] lykos:
I wouldn't say it crashes; it really only crashes FreeD. It's more that the camera apps open but it's like the camera can't be contacted because nothing is displayed.
[X Style (Pure) General] defcomg:
You can test both libs start with xstyle 60fps remember to set permission to rw-r-r
[X Style (Pure) General] lmulli:
FreeDCam appears to be working fine when JPEG is selected, however, when Bayer or DNG are selected it appears to take a photo,and seemingly creates a file, but nothing can be viewed in the FreeDCam Gallery app. I note that the Bayer files are around 19mb each and the DNG ones 0 bytes (so clearly not working).

Using Stock 6.01

Ta
[X Style (Pure) General] defcomg:
The Bayer file should be 25.6mb and that size should be the same for all images captured in freedcam menu save camera parameters attach the .txt file here
[X Style (Pure) General] lykos:
Camera (s) is working on the first lib. No crashing in FreeD, nor any other camera. The second lib displayed no video in FreeD but video still worked in CameraMX and Google Camera.

I noticed in your 6P thread you mentioned a video profile. What settings should I use when testing 60fps or is changing it from 30 to 60 enough?
[X Style (Pure) General] defcomg:
If you copied the CustomMediaProfile txt file to DCIM/FreeDcam/config select 1080pHFR
[X Style (Pure) General] lykos:
Copied the CustomMediaProfile from the post in the 6p thread where you said "if you're experiencing any issues with step 6 .... "

Now we get to the meat of it. Suddenly things got very wonky on me. It was like the camera zoomed in super heavily, green scanlines ran up and down the video, when I went back to the camera (from video) it was still stuck in zoom even manually zooming did nothing; actually manual zooming seemed to break it more causing a kind-of b&w Andy Warhol. I tried to snap a picture of it but the camera app crashed. It crashed again when I tried to open it back up and I had to clear data. Once I cleared the data everything went back to normal. I can record in the "4k, 1080p, etc etc etc" profiles but when I tried the 1080pHFR it just did the same things again.

This does not seem to be affecting other applications. So that is a plus.
[X Style (Pure) General] defcomg:
I gotcha the problem is in the registers will send another test lib later 5.18am here
[X Style (Pure) General] defcomg:
Try these
[X Style (Pure) General] lykos:
These, both, are having the crashing/black screen issue. I've tried full reboot, soft reboot, rwrr, rwrwr but nothing is working. Reverting back to org mot

EDIT: noticed a couple of my other cameras weren't functioning correctly after rebooting with the orgmot so I went into recovery and wiped cache there. I then tried the pdafon mot and it works.

Still have that blown up problem for the zoom and the video is super pixelated

Trying pdaf off with the same method
[X Style (Pure) General] defcomg:
Blown up?
[X Style (Pure) General] lykos:
Like super zoomed in even after switching back from video to camera. The only way to fix it is to switch to the front facing camera and back.

Just tried pdaf off mot and it's acting the same as pdaf on. The weird thing is I downloaded the moto g4 cam from the camera 2 thread and there is a 60fps option there now with no pixelation could it be a profile problem ?

Both the moto cam and freed have the zoomed in issue tho. Idk how to explain it. I've tested it against 720p, 720p 120fps, and regular 1080p to make sure my eyes weren't broken and none of those zoom in like fhd 60fps
[X Style (Pure) General] defcomg:
Upload 60fps sample and a normal 1080p to youtube I think it maybe a scaling parameter
[X Style (Pure) General] lykos:
Alright, I'll do that sometime tomorrow morning. I have a meeting very early tomorrow so I don't really have time atm. I'll upload a video sample of freed 60fps, freed 30 fps, and moto 60fps. Moto so you can see what I mean by image quality compared to freed; which I think is probably a profile thing.
[X Style (Pure) General] defcomg:
Cool
[X Style (Pure) General] lykos:
https://www.youtube.com/watch?v=5rExjvvlbJ0 - Regular 30fps FHD. No zoomed in issue.

https://www.youtube.com/watch?v=J22TFSKnxXQ - "60fps" FHD. Super zoomed in. Actually didn't register as 60fps in youtube. I think 60fps actually isn't working at all here.

https://www.youtube.com/watch?v=uI7sM95XOdY - Data's Moto Cam V3; registered as 60FPS. Slight zoom but less than FreeD. Refuses to focus for me tho lolol

Data's Camera didn't have the 60FPS option before your lib tho. So it's weird that it works but freed doesn't.
[X Style (Pure) General] defcomg:
Try these see if its less zoomed in I think 60fps not working because of missing video-HSR parameter seems only moto and xiaomi actually uses this all qcom devices have it but video-hfr is usually enough
[X Style (Pure) General] defcomg:
Try these .
[X Style (Pure) General] lykos:
Sadly these did nothing for the problem.

edit: just wanna say thanks for your work btw. I hope we can figure this out but if you can't I still managed to take a great 60 FPS (using moto camera) video of my wife feeding ducks. Even zoomed in I worked with the camera to get an ok shot. I switched back to my original lib mot to see if the 60 FPS option was there in the moto camera with it and it wasn't. So that is entirely due to your work!
[X Style (Pure) General] defcomg:
I see I will attach a lib with binning disabled not sure if it will affect fps but should give a wider fov .

As for freedcam not being able to set 60fps i encountered this on the moto x 2014 I think its due to missing HSR parameter the solution was to break slow mo feature by disabling it in libstagefright.so so it returns maximum fps .

To make sure install logact app run moto app record 60fps then exit save log clear log repeat process with freedcam it should show what's going p
[X Style (Pure) General] lykos:
No zoom fix. I think it might have even made the moto camera worse, but I did get those logs for you.

Uploaded the moto camera below; freed was to big probably because it keep crashing on me when I didn't switch to and from the front facing camera so I uploaded that here:

https://mega.nz/#!odMXGIyB
[X Style (Pure) General] lykos:
Hey, I just wanted to let you know that I did notice slow mo crashing the moto camera a few times right after I recorded 60FPS. It happened sporadically (like 1/10 videos) but it might be related or maybe it's the last libs binning thing?
[X Style (Pure) General] defcomg:
Probably I would revert to the previous lib since it didn't improve fov .

Is the 120fps slow mo FOV wider than 60fps?
[X Style (Pure) General] lykos:
Yeah, I just tested it in both moto and freed and it has the normal FoV
[X Style (Pure) General] lykos:
I just realized that shutter speed isn't working on the moto x pure edition. I wasn't sure if I should put that here or in the main freed thread. I swear I thought I used it before on a moto based rom. :eek:

Edit: Yeah some weird stuff going on with the app now. Raw is saving like this: https://imgur.com/LhhSHwW
[X Style (Pure) General] defcomg:
Hmmm weird indeed logcat for both manual shutter and weird raw output reply in the main freedcam thread or freedcam github in issues section
[X Style (Pure) General] kundason:
can you sum it up then please?

hey ..a bit late on this thread but after reading it all i do have a few questions please.

1.what is the most current version to download for the modified *.so file

(running xposed framework here on the mxpe ..24.221.4 is the current system version .

2.will i be able to use raw and change iso and shutter speed or do i need that other lib as well ?

3.will this work just on freedcam or can i also use it on other camera apps ? ..snap camera HDR also has controls and options for allowing camera2 api control.

and also would like to add my voice to say thanks for all the hard work.
[X Style (Pure) General] kundason:
bugger me

quick update in the meantime ...crashing events sadly ..

i have put the camera.msm8992.so file as described and with root explorer gave it the permissions .

installed the freed from the link ..and at the beginning the app opened ..but then crashed while browsing it ( didnt even made it to take pictures ) ..and it won't open..nor any other camera app now and they give me the message "camera unable to start ..if this repeats please power off your phone and restart" .

freed app just "stopped working"

..i think i was on the API section at that time trying to see if there is a camera2 in there .

tried erasing cache and dalvik and restore the original file instead..but nothing works...so going to make a nand restore (lucky i did it ) .

adding both the original file in my phone and the logcat.

btw

i am on stock rooted with xposed framework and gravity box installed

please help obi one :)
[X Style (Pure) General] kundason:
ok ..this time it run !! yay and thanks!

however..it is still every ...hmm odd.

i have put the "libmmcamera_mot_imx230.so" file in the correct location and gave it the same permissions.

i did not see any camera2 api on the options in the menu

but the dng works...

i saw dng output indeed (huge file btw) ...

but..the manual iso does not work , and no shutter sound

is this normal ?
[X Style (Pure) General] defcomg:
By does not work you mean in preview it does not seem to change when iso value changed or when say setting iso 100 and shooting jpeg exif has another iso value ?

Camera 2 mode requires a flag in build.prop

By the way there are two iso the one to the left of the ui and the other in the manual menu when you swipe up
[X Style (Pure) General] LARMYV:
Works great. Thanks
[X Style (Pure) General] kundason:
no iso change nor any other in the regular mode ....

found how to change the build.prop ( neat trick btw..will probably do with that build some future stuff ) ...changed it ..rebooted

erased the app data and activated the api 2..and well..all hell broke loose :confused::confused: :

1.pictures that did came out were 1 tiny square and a lot of gree.

2.zoom decided to go invisible.

3.eventually at some point the cam went to an entire blue tint .

4.focus kept on losing the focus just slightly after aquired.

tried turning options off and on ..erasing the data...it froze even at times.

on the bright side..i could for the the first time ever actually play with the iso on shutter speed..

not sure what i should add this time to this reply ? ..also a question ? ..if i dump xposed and go back to plain old rooted on the stock 6 with may update...

on that case will everything run smoothly with non of these issues ? ..or will i need to enable the api to get control of the iso etc?

waiting on your orders ..oh bringer or usable RAW :P
[X Style (Pure) General] defcomg:
I think prior to android 6 cam2 api was more functional I don't know what Motorola did to it with android M.

Does the stock camera have functional iso ?

In Freedcam menu enable zsl and try adjust iso see if that works .

This is a Qualcomm bug there are two actually

When ZSL is disabled as in the case of raw capture iso does not update the preview why I have no idea but in every Qualcomm device I've seen this is always the case

The second is iso seems to have absolutely no effect when recording video . on my device if I need base iso when recording video I disable the iso i2c register at driver level.

Try this set iso to 100 with zsl off and picture format set to jpeg take a shot then set it to auto compare the exifs preferably with camera lens blocked off.

If iso100 image says anything other than iso 100 then it's totally broken
[X Style (Pure) General] kundason:
OK. Adding a log if it will help.

So long as zsl was on ..jpg was good but stayed on auto what ever combo I tried on both ISO setting's.

When zsl off ..manual iso 100 froze the entire app ,for this and other cam apps...had to reboot.

Adding the log on that.

Also.. it appears the focus is odd a bit..can I tweak it somehow?
[X Style (Pure) General] chinmoy32:
How did you do it man ??

Have you had the source for that SO or you edited it somehow ???

Can you please share / elaborate on the procedures , if you have no problem - of course .

I want to do he same for Sony Xperia Z5 series
[X Style (Pure) General] defcomg:
I used IDA disassembler then look around the hal part is open sourced so I just compared compiled lib with open sourced code found an extra method in the camera initialization its named ModifiyCapabilities so I replaced its BLX Asm invocation with a NOP.W arm opcode basically telling the lib do nothing when it got to that part.

Sony's hal is different it's completly recoded its not simple bypasses like Motorola the camera stack is different to so getting raw from it not possible atleast from the z3 z2 it was You can attach the camera hal found in /system/lib/hw/ any file with the word named camera
[X Style (Pure) General] sanjaybaidya:
Will it work on my moto g4 plus??
[X Style (Pure) General] ilovemeow:
doesnt g4Plus come with pro mode by default?
[X Style (Pure) General] sanjaybaidya:
Yes it does. Bt i want raw image capture feature
[X Style (Pure) General] defcomg:
http://telegram.me/freedcam send the camera.msm8***.so found in /system/lib/hw/ will see if anything can be done about the capturing raw
[X Style (Pure) General] sanjaybaidya:
I tried to upload here it says Android failure grabbing
[X Style (Pure) General] ilovemeow:
:D i see, thanks great for Raw capturing

i need that too
[X Style (Pure) General] defcomg:
Use root explorer or equivalent app without that file I can't do much
[X Style (Pure) General] mechanicalensign433:
can you give me step by step method of how to do it
[X Style (Pure) General] lighteater12:
My camera does not work very well with these mods.

Before I get FLAC'd on, I want to ensure the others that I was using a MMXP ROM, which I'm half-certain that was the issue. I had extracted and applied permissions, but I forgot to back up my camera's .so file. Luckily, I had taken the ROM I used and extracted it's .so file as to have you hopefully fix up a mod for me? I really want to capture in RAW, but it's been no good and I almost gave up and decided on my camera being bricked. Then I found another .so file which I am currently using, but am unsure of it's working condition. Here is the .so file that's in the ROM. puu.sh/sjPbF/6a218b6c13.zip
[X Style (Pure) General] defcomg:
try this
[X Style (Pure) General] lighteater12:
Unfortunately, my DNG files aren't being read and Adobe Lightroom doesn't recognize my camera being g able to shoot in RAW. It does, however, work. I tried with FreeDom Cam and Lightroom.
[X Style (Pure) General] defcomg:
Not sure I follow:confused:
[X Style (Pure) General] lighteater12:
The camera is functioning, but the RAW capture does not work.
[X Style (Pure) General] defcomg:
do you see a bayer dng option in the picture format selection ?