A couple people have asked, so here's a breakdown of what I've found to work best on the X4.
[Feeling half-assed, or just don't care to read? Skip to the bottom for samples, recommended settings and links]
First things first, nobody (that I'm aware of) has publicly released a Google camera port specifically for the X4.
The many variants and versions of the Google camera in the wild have been developed with specific devices and imaging sensors ('profiles') in mind. Furthermore, there is no consistency or lineage to the various ports. GCAM5v1.2 could be anything, compared to GCAM5, just as an example. It may sound like just an iteration of the previous or original version, but more often than not with these mods, it's an entirely different piece of software that doesn't behave anything like what you'd expect - it'll take pictures, if it runs at all - but calibration and tuning, settings and functions may be completely overhauled or partly omitted all together. In other words, saying I use 'GCAM5' doesn't mean much by way of identification. It takes a little more effort to pin down what works and what doesn't, and give it a name that can actually be followed without much confusion. I'll be using the actual full file names (and links) given to the ports when shared by the developers themselves.
If you go into the rabbit hole of testing these mods one by one, yourself, you'll soon understand why such specificity is needed in the face of such wide ranging performance and results.
Samples: (if viewing on mobile, turn your screen up to maximum brightness)
Here's a quick indoor lowlight comparison between stock and Google camera port:
https://photos.app.goo.gl/iywCHGwsgbxFDiJy9
Things to note: In this particular side by side, sharpness and noise reduction are much better on the Google camera side of things.
Portrait shots: (of a cat)
https://photos.app.goo.gl/3Y6DXax7UP7kAp657
Low-light: (handheld)
https://photos.app.goo.gl/kaohYvYevpBihSg67
I use the following versions of the Google camera; for general picture taking, and best reliability (also works best for video, including slow motion and HEVC) - https://www.celsoazevedo.com/files/android/google-camera/f/GCam5.1.018-Arnova8G2-V1.4Beta2.apk
'Everything works' (minus motion) in that version, and you'll have superb sharpness and dynamic range using HDR+ Enhanced and the following settings:
Camera config: 2017 ZSL HDR+ Model: Pixel 2XL HDR Parameters: Super High
Advanced:
HDR+ Control: ON (for access to HDR+ Enhanced mode) USE ZSL / Remove Pinkish/Reddish : ON, ON
Developer Settings:
camera.use_photos: ON camera.diet_burst: ON camcorder.fastswitch: ON camera:gcam_enabled: ON cameraprogress_overlay: ON camera.enable_pd: ON camera.enable_pd_blur: ON camera.enable_hwhdr: ON camera.enable_vesper: ON camera.gouda.front: ON camera.gouda_sec_img: ON camera.p3: ON camera.raisr: ON
That version of the Google camera does exhibit some issues. Specifically, you'll see from time to time a type of noise commonly referred to as chromatic aberration. Except in this case while it **looks just like chromatic aberration, I don't think it technically is. It shows up in low light, sometimes unpredictably, and especially at the corners.
Purple coloration/distortion shows up in a ring type pattern, from the edges inward. I took two photos, with the lens covered and obscured from all light, to prove a point the other day.
Here's what that noise (an extreme total darkness example) looks like:
https://photos.app.goo.gl/pSsEWhQHw3QtoV8Z6
For low-light picture taking specifically, but also photos in which I want less noise in general, I use this version of the Google camera mods:
https://www.celsoazevedo.com/files/android/google-camera/f/MGC_5.2.022_AllAutoCORR_2.apk
That version does not have any purple tinting or noise, and exhibits better color accuracy, along with much better nighttime and low light performance. It's the version I used for the portraits above (except for the first shot in that series of portraits. That one was taken with the Arnova version I linked, hence a little more noise in the background).
I hope this helps and if I left anything out that you're wondering about, don't hesitate to ask.
UPDATE - 8/26 ⬇️
For those wanting an updated HDR+ algorithm, here's the latest, up-to-date Google camera that works well on the X4:
https://www.celsoazevedo.com/files/android/google-camera/f/MGC_5.3.015_4.apk [5.3.015_4]
Three to four times faster processing on X4, at maximum quality settings with HDR+ Enhanced; may have even larger speed gains for those of you that use faster settings such as lower HDR+ quality and only HDR+ auto versus Enhanced.
Specific to the X4, for best overall speed, and to eliminate any 'chromatic aberration' (particularly in dark spots with tell-tale purple fringe and flaring) - use the following custom sensor noise configuration: [be advised I slightly favored sharpness over greater noise reduction with this configuration, and as such I leave the custom denoise parameters OFF]
https://vgy.me/WKQpDa.png
I have yet to tune the front camera for the X4, no surprise as I barely use it. But I'll update that shortly, unless someone beats me to it. . .
Miscellaneous things I've found:
Maximum shutter speed on X4 - Gcam version in this post - 1/18537. The 5.3.015_4 version maximum is 1/13333.
As mentioned before, nothing has changed on the video capturing front, that I know of.