yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Weird. I've never heard of anyone's camera stop working from replacing the lib files. Were you replacing them from a root explorer, or via TWRP?

I personally found that with the stock rom, I wasn't able to use TWRP to replace files. The forced encryption made everything nuts. Like, at one point I could have sworn there were two file systems... I could use adb or TWRP to mount and push/pull files from system, then when I rebooted into the phone the original files were there again. And if I went back into TWRP, the ones I had edited were there. I was scratching my head for hours until I reformatted and used the twrp flashable rom because it turns off forced encryption from the getgo so we don't have to deal with that. Then TWRP and the booted-system files seemed to line up. I still don't fully understand what was going on before, but I wonder if you tried to use the flashable zip to apply the chromatix mod and that messed things up? If you are rooted and using a root explorer to replace the files, it should be fine. Also if you are running the TWRP flashable stock and use the zip for chromatix, it should work as that's what I did in the end as well.

Also, between you and me, don't bother with the Libmm. It lowers your resolution to get less noise grain in low light photos (by combining and averaging together pixels). Savitar said it works better than just doing that in post because it is on lower level (hardware level as opposed to software in post), but I don't think it is worth it. In good light you want the full resolution off your camera, and if the pic has too much noise due to low light pushing the gain too high, there are ways to reduce the effects of it in post (including re-sampling down to lower resolution). I don't think it made enough of a difference personally. The chromatix mod is gold and highly recommended though. As is camera2 enabling and installing Gcam.
[Moto G5 Plus Guides, News, & Discussion] Siddhartha9964:
Yes, i didn't know there was a flashable chromatix mod then, i used solid file explorer and pasted the files. Then rebooted and tried the cam,and voila "can't connect to camera" came up.

Anyways will try the flashable chromatix mod and fingers crossed. Yes i use the Gcam, OnePlus cam, and Nokia cam. Personally i feel, nokia cam gets very good pics compared to stock,also the portrait in it works good. I use normal gcam though. Because the hdr+ is a hit n miss, it works once then, it doesn't, so gotta restart the cam.

Anyways thanks for the help.
[Moto G5 Plus Guides, News, & Discussion] .czarodziej:
I see that our Moto G5 Plus has the same camera sensor (IMX362) as in the HTC U11 or Asus Zenfone 4 which take great photos. Motorola's photos are quite worse. I know that G5 Plus don't have OIS, but is it possible to get any features, drivers, algorithms, etc., from Asus or HTC to our phones? One camera sensor model and huge difference in photos quality.
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Honestly, after flashing the chromatix mod and especially when using gcam, we're getting better photos on this than those phones imo.

The issue with driver porting is that there's a lot more than just the sensor that would be different regarding the camera hardware between this and those. The focusing system, for example is unique on the Moto and why gcam doesn't autofocus out of the box the way other phones do. The lens is different, etc... likely a lot of other differences.
[Moto G5 Plus Guides, News, & Discussion] eemgee:
Before I read the whole thread I'm using gcam so would I gain anything with chromatix?
[Moto G5 Plus Guides, News, & Discussion] Jrhotrod:
Does the Cjromatix mod work on custom ROMs (e.g. Lineage 14.1?)
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Not in Google cam so much, but yes definitely elsewhere in apps that use camera (AR apps, video chat apps, Snapchat, photo scanning apps, etc). Google Camera is great as long as you're only using Google camera to take your shot.

Chromatix is system-wide.

Sorta. It depends on what the rom chef cooked in already. In some cases it might not be needed, in others it might. I don't know the details of every rom so you'd have to ask for yourself.
[Moto G5 Plus Guides, News, & Discussion] nihal28:
Thanks for this!

I also wanted to know if there is any way to bring back any of the Moto Cam features like Panorama, Slow Motion, 1080p60fps rear cam video on 64bit custom roms like Oreo 8.1? Thanks in advance.
[Moto G5 Plus Guides, News, & Discussion] Dishe:
I think gcam has its own panorama (camera sphere) option. The rest I've heard is problematic, and likely won't have a fix until official Oreo is released for the phone. The custom Oreo firmwares won't support the original Moto app as far as I can tell.

Until Oreo rolls out officially, I'm sticking with nougat based roms personally.
[Moto G5 Plus Guides, News, & Discussion] sevenape:
Hi, sorry for being totally clueless, but I'm having huge problems with setting this up. I'm using Dr Techie's Moto g5 plus toolkit but I'm running into 2 persistent problems.

Either: when I don't root And try to stop things on after the TWRP flashing step, I somehow lose TWRP and recovery gives me a 'no command' error

Or: I manage install custom boot ROM, WLAN fix and Super Su and root, but then the camera app is always 'busy'.

I'm pretty desperate to at the very least fix the oversharpening and noiuse reduction and at best also complete all steps you mentioned.

Please can someone help an idiot out?

Thanks
[Moto G5 Plus Guides, News, & Discussion] kamikazi_t0m:
I've followed this as closely as I can however I haven't successful in enabling Camera2 Api. I've extracted build.prop while using TWRP and an unlocked bootloader. No string of "persist.camera.HAL3.enabled=x" was there so I added it as "persist.camera.HAL3.enabled=1". I then used command "chmod 644 /system/build.prop" in Minimal ABD and Fasboot to set permissions. If I go into FreeDCam there is no option for camera 2. I also cannot us Gcam, which I imagine is due to the same issue. I don't know what I'm doing wrong, any help is GREATLY appreciated. I hate the pictures this phone takes, it ruins the whole phone in my opinion.
[Moto G5 Plus Guides, News, & Discussion] sevenape:
Is there a way of flashing the zip with ADB?

Hi I think I've flashed the chromatix zip linked in op. Without TWRP I booted into stock recovery then sideloaded the zip using ADB. I think it took, is there a way of checking that's it's there?

EDIT: No it didn't take, got message:

E: footer is wrong

E: signature verification failed
[Moto G5 Plus Guides, News, & Discussion] sevenape:
If anyone else is having problems with 'camera busy messages'

So I finally fixed everything by doing a full root, flashing this zip, then the chromatix zip, then build pro editing then gcam. All working very happy. :)
[Moto G5 Plus Guides, News, & Discussion] Dishe:
I actually had a similar issue when I first got the phone. It seems that there is an "alternative" file system being shown to twrp when the stock rom is encrypted by default. If you boot into the system and then pull build.prop, you'll see it's the original one without your edits. If you go back to TWRP, and pull it there, you'll find the one you edited. I had to flash one of Q9nap's TWRP flashable stock roms which have encryption disabled to get it to work this way.

Now, I just recommend people root and do it that way. Seems a lot easier and more straight forward to the twrp way. I still don't understand how I had two file systems but it sounds like you also did so it wasn't just me. :)

Awesome, glad it worked!
[Moto G5 Plus Guides, News, & Discussion] sevenape:
Thank you for all your hard work!
[Moto G5 Plus Guides, News, & Discussion] mercuryprobe:
[MENTION=349165]Dishe[/MENTION] What kind of performance impact is there on the camera? I suppose that if GCam takes 10 shots together, then the pictures will come blurry (if handheld)?
[Moto G5 Plus Guides, News, & Discussion] Dishe:
It seems to defy all logic, but the opposite is true. Google's algorithm is so good, it manages to be consistently sharper than non HDR+ photos. I think what it is doing is capturing frozen contrast in the first frame, then the others are for color data which gets processed in post. For accurate color I think you should hold as still as you can, but I've captured what should have been relaitively blurry photos in low light (I'd expect a slow shutter speed) that blew me away in sharpness. I can't sing it's praises enough.
[Moto G5 Plus Guides, News, & Discussion] jafro77:
So - I went with option #3 with AICP but it is quite unstable. I manage to use for hdr+, but it needs constant setup and resetting settings.

Does this work better on some roms?

OPTIONAL #3) Install a 64-bit custom Rom and use the latest Google Camera HDR+ app floating around (v4.4). The recent versions B-S-G released based on the Pixel camera has options to change camera modes in settings, some combination of which supposedly focus properly. You will likely get a more stable camera app experience with this as it requires less modification to work, but you'll have to be committed enough to go off stock.

Check out the app and suggested settings to try here:

https://xdaforums.com/showpost.php?p=74999182&postcount=19

Thanks [MENTION=4993049]shanks125[/MENTION] for the info!
[Moto G5 Plus Guides, News, & Discussion] YungBreezy:
Hey I read through all the replies and couldn't find an answer to my question. My g5 plus is having the camera issue were it constantly crashes upon opening it and it takes about 5-10 times before it finally works. Would flashing a different Rom solve this problem and installing gcam?
[Moto G5 Plus Guides, News, & Discussion] :
does rooting + installing rr remix 8.1 will install api2 and rest of camera mods automatically or what to do? I'm on stock right now and want to improve camera basically!
[Moto G5 Plus Guides, News, & Discussion] benleonheart:
Can you please link me to the version you got working? a friend of mine is wanting to use GCAM

btw, is there a noticeable difference from the completely stock G5 plus camera and the 2.7 version you got working?

thanks!
[Moto G5 Plus Guides, News, & Discussion] Dishe:
As I said earlier in the thread, I can't vouch for what custom roms are/are not doing. But I do think most of the popular ones by now have at least the chromatix mod and cam2 API enabled. But I don't know for certain- I'm still running a lightly modified stock here.

Links to gcam versions are in the thread. There are actually some new ones from Savitar that have been floating around his telegram groups, including some new ones that support both autofocus and manual focus in the photo side of the app! Still working out the kinks before I share a link here, but exciting stuff is coming.
[Moto G5 Plus Guides, News, & Discussion] ditoparlo:
How to undo the mod? To me quality is worse than before...
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Examples?

I find that extremely hard to believe, you'd be the first person to feel this way about it. Did something go wrong?

How did you apply the mod? Really all it is, is swapping some system files. So switching back would just mean putting the originals back. But if you used the flashable zip in twrp and didn't make a backup first, you'd have to pull the originals from a stock rom I guess.
[Moto G5 Plus Guides, News, & Discussion] sevenape:
Very exciting! I've got quite good at guessing distance but autofocus would be great!!
[Moto G5 Plus Guides, News, & Discussion] marcol87:
I can't set resolutions higher than 2MP for rear camera (look attachment).

I'm on G5+ stock rom 7.0 (magisk+xposed)

Could it be related to Chromatix mod by [MENTION=377973]defcomg[/MENTION] (since it is the only mod I applied)?
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Oh- did you install his LIBMM/Binning files from there? I wrote that I don't recommend that for a good reason. Binning is how the system takes data from the sensor and processes it into larger pixels by combining data from multiple photosites. In other words, you can get better low light performance by combining data into larger pixels (and therefore less overall resolution). If you do that, you'd end up with resolution limitations like that, however your low light photos should look really clean! LOL

I've actually been sitting on some updates to chromatix and a new Gcam that Savitar/Defcomg shared with me on Telegram that I've been too busy to update here. Spoiler: AUTOFOCUS WORKS NOW. No workarounds needed. And you can still use manual focus to dial in for macro or landscape or just artistic shooting. Its pretty great. I'll try to update all that shortly.
[Moto G5 Plus Guides, News, & Discussion] Dishe:
New google camera version

Sorry I haven't updated this in a while, Savitar/Defcomg has come up with some pretty amazing updates to the Gcam app for our hardware.

If you are using an older version of Gcam, you're going to want this update. A few reasons why:

AUTOFOCUS IS NOW WORKING BY SIMPLY PRESSING ON THE SCREEN (This is huge and something I didn't think we'd ever get)

Fixed the color tint issue when shooting into a light source

RAW capture is enabled (saves industry standard DNG files along with your jpg)

Manual focus slider and ISO slider so you have more control (If manual slider for focus is used, AF won't work until you restart camera)

without further ado, here's the link to gcam32bit version 06

http://www.mediafire.com/file/zta3e2ob5ofc7ui/GoogleCamera32bit_06.apk/file

Some notes to keep in mind:

Manual focus sliding is amazingly useful for landscape, macro, and maybe even some artistic photography. But after using the slider, if you try to autofocus it might go a little bit crazy (focus starts pulsing). You'll need to restart the app to make that go away.

The selfie camera works, however it doesn't get ISO information from the system properly, so you might want to use the ISO slider to set the value to something manually. Indoors, for example, the HDR+ algorithm always underexposes the front-camera photo unless I set it to something like 400-600. The flipside is that the pictures come out better than I've ever seen the selfie camera on this phone look (as in, I didn't consider it usable for anything other than a video chat before, whereas these are actually nice).

You may have to still tap on the screen to get it to "arm the shutter". I found that just opening the app and pressing the shutter isn't good enough. If you tap somewhere (which is anyway useful for focus and exposure), the picture gets recorded fine.

Video recording is still a mystery to me. I've heard people say it works on other corners of the internet, but I personally find it says recording, then there's no file afterwards. I just use stock moto cam or footej for standard video recording.
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Lib files

Here's the latest Chromatix Libs and misc things that Savitar/Defcomg recommends replacing the stock system files with:

http://www.mediafire.com/file/vwsgackjtql8u6x/chromatix_mot5plus.zip/file

I haven't personally used these yet, but I've heard they will improve autofocus and low light capabilities, not to mention have all the processing ugliness turned off that were mentioned in the first post. Make sure you back up the originals first.
[Moto G5 Plus Guides, News, & Discussion] yourSAS:
Is this is useful for 64 bit ROMs? More specifically, does it improve the image quality if I'm using Google camera?
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Depends on the rom. The amount of bits don't make a difference regarding chromatix as far as I know, however many custom rom cooks are basing their camera tweaks on Savitar's. So some of them might already have this. Or an older version. Once you go custom rom it gets kind of uncertain. Only the dev who made your rom would know.
[Moto G5 Plus Guides, News, & Discussion] pradsngh523:
Can you list out some oreo custom roms that use savitar's chromatix mod
[Moto G5 Plus Guides, News, & Discussion] yourSAS:
If the zip you posted is the latest one, doesn't it mean that even if a ROM is already using it, it'd be having either this or older version? In such case, is there any harm in using it, if I'm using gcam?
[Moto G5 Plus Guides, News, & Discussion] kjjjnob:
Great news [MENTION=349165]Dishe[/MENTION]! Tomorrow i'll take some shots on G5s+. Maybe you can create a telegram channel to share info about gcam port for arm?
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Sorry, I don't keep tabs on what they are doing. Personally I'm sticking with a lightly modified stock until Moto releases proper 64-bit drivers officially. With custom roms, you're on your own for now!

I would think so. It couldn't hurt to try, just back up your originals just in case. There are likely more up to date than whatever the rom dev used.

Savitar himself is on Telegram and he's the one doing these awesome things and sharing the info there. He keeps me in the loop so I can update the thread here on XDA (he's too busy), but once you're poking around telegram you might as well find the g5+ camera group he's an admin of.
[Moto G5 Plus Guides, News, & Discussion] marcol87:
so do you know how to get back to stock files? I didn't take a backup :crying:

EDIT: I tried restoring these files but nothing changed
[Moto G5 Plus Guides, News, & Discussion] yourSAS:
I tried the latest zip - replaced all except a libmm file.

No issues with the camera app so far but WhatsApp gets stuck when trying to take a photo through its finder, finally exiting the viewfinder with a "Can't start camera, please restart your phone". It shows the preview in view finder just fine, however. (This issue doesn't occur in low light conditions)

How to fix this issue? (Not that I issue the view finder often but it's good to have it work reliably)

Does it have something to do with the untouched libmm file? Also, what's the use of that .json file? (I have replaced it in /system/etc/zaf/ hoping I wasn't wrong)
[Moto G5 Plus Guides, News, & Discussion] Frawgg:
I'm on stock Rom, unlocked bootloader, rooted, and I can't get GCAM to work. I flashed the Defcomg_chromatix_mod and I used Terminal for Camera 2 API. I then installed GoogleCamera32bit_06.apk and it will just force close right away. Is the Camera 2 API not sticking? I'm lost.
[Moto G5 Plus Guides, News, & Discussion] yourSAS:
Make sure you've set the property to 1 and also set the build.prop file permission as rw-r-r
[Moto G5 Plus Guides, News, & Discussion] marcol87:
identical situation for me

made but nothing changes
[Moto G5 Plus Guides, News, & Discussion] Frawgg:
I think what I'm going to do is a clean install of the stock rom and then just flash Defcomg_chromatix_mod.zip and just use stock camera. I definitely notice a difference just by doing that. So I can live with that lol. This phone is fantastic on just the stock rom to begin with. It seems like when I start messing with root or any custom roms I have nothing but issues.
[Moto G5 Plus Guides, News, & Discussion] dzidexx:
[MENTION=349165]Dishe[/MENTION]

Hi, here someone solved camera libs problems:

https://xdaforums.com/mi-note-2/development/fix-mi-note-2-camera-blobs-t3794443

Maybe g5+ has wrong libs too?
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Weird. Gcam doesn't need or rely on the chromatix changes, it just needs camera2 to be enabled. It will do better with chromatix and everything else applied, but that it won't work at all is strange. Did you check that the build.prop changes stuck? Download a camera2 api tester app (there's dozens on the play store) and it will tell you in detail what camera functions are enabled. If camera2 full isn't enabled, we know what the problem is. Try it and report back what it says?

I don't think we have the same problem. That seems unique to their manufacturer and while there was some talk about blobs for the camera on the MotoG5+, Savitar is pretty convinced its a placebo effect for us. I mean, it says he was inspired because Gcam didn't work on the Note2, but it clearly does work on our Potter devices. Not sure if there's any applicable info there.
[Moto G5 Plus Guides, News, & Discussion] marcol87:
I tried "Manual Camera Compatibility" and this is what I got :crying: :crying:
[Moto G5 Plus Guides, News, & Discussion] marcol87:
wait, I just changed

persist.camera.hal3.enabled=1

with

persist.camera.HAL3.enabled=1

and now I pass the test.

anyway gcam is still fc
[Moto G5 Plus Guides, News, & Discussion] Houndy2:
Nice work!

I definitely recommend rooting your device just to do these mods, I only had one problem, I was using ES File Explorer to copy the files and it kept corrupting my camera eventually I used Solid File Explorer and it worked wonderful; Also I used both the first chromantix, and the latest that are in post eighty something I think and I figured the first ones are better then the latest (latest make preview and after image look much much more grainy). And I also took some before after shots also took some screenshots of the preview... https://m.imgur.com/a/Dyrzfa4
[Moto G5 Plus Guides, News, & Discussion] celoxocis:
[MENTION=349165]Dishe[/MENTION] I came across your GCam mod and since the G5 Plus has the same front camera as my device (Lenovo P2) i gave it a try. Everyting actually works on the front camera.

Of course the back camera is different therefore it crashes but im more interested in the Potter blobs. Can you confirm that your GCam Mod app works on the G5 Plus Camera without actually editing the camera blobs from stock?
[Moto G5 Plus Guides, News, & Discussion] Dishe:
Yes, I can confirm. I never touched the blobs.
[Moto G5 Plus Guides, News, & Discussion] Tateh:
Hello there! I tried to follow your instructions OP but without root it was too painful, so I eventually had to root. However the camera now keeps crashing. I'll elaborate: I initially unlocked bootloader and got TWRP installed, used adb push and pull to edit the build.prop on desktop , then I rooted because I just couldn't get the chrom mod or the gcam installed without doing so aaand I really wanted the gcam. Gcam would lag like hell and failed to capture videos, so I uninstalled it and kept the stock which I've been using anyway. The pictures were just amazing, I would use the phone to see when in low light. Damn it was satisfying. Great job!

However, after a while, the stock camera started crashing. It's been 2 days and a LOT of factory resets later and I still can't get it to work properly. Sometimes it crashes, other times it can capture a pic but not a video or vise versa, popping messages such as "unable to capture media" and it's generally really slow. I just reset everything from TWRP (data, cache, system and internal memory), I didn't even log on google on the phone to avoid downloading any app data, i'm on stock ROM and I've downloaded zero apps. Stock camera is still crashing!

I may have royally messed up at some point, not very savvy with these things. Thank you for your help!

edit: I just tried opening the stock app once more to test it and I heard the hardware (cam) making clicking sounds while the screen was still dark (but the camera UI was there)

edit2: after rebooting a few times and disabling almost every non essential app the camera now crashes only when simply clicking on video mode ("please restart application" message appears). Phone doesn't even have a browser or the calendar on. I'm downloading a stock rom to completely wipe everything
[Moto G5 Plus Guides, News, & Discussion] sanamrajneesh:
When you enable the cam2 api, you lose most of the functions in the stock camera app as it uses the api1, iirc (you're left with just the basic point and shoot- no manual controls, HDR or videos). The GCam ver 3.2.045 was the most stable on the stock rom in my experience. You're better off staying away from the stock cam and instead use something like open camera.

Better yet, if you've rooted your phone, you might as well upgrade to a custom ROM.
[Moto G5 Plus Guides, News, & Discussion] wastedige:
Once Oreo comes out for G5+, do we still need to go through these steps to enable HDR+?
[Moto G5 Plus Guides, News, & Discussion] Mrkblo:
Yes. CameraApi2 is still disabled, and the rom is 32bits.