First of all, for people new to Google Camera, follow @dimi89 's guide as an introduction to all processes needed to achieve a working camera port.
To make it simple, you need to:
- Unlock bootloader
- Flash TWRP or boot it through fastboot (there are plenty of guides here)
- Install Magisk systemless root through TWRP recovery
- Flash my fixes module below to enable Camera 2 API and make front camera working as desired
- Install the best APK for you from https://www.celsoazevedo.com/files/a...google-camera/
- Be happy
Until now, we had it working but some features like Portrait mode, front camera HDR+ and portrait, plus front camera flash were missing.
With the help of @defcomg I managed to make a Magisk Module as a bundle that does both enabling Camera2API and adds necessary libs to fix the camera. You can download it below.
As per the apk of the GCam on your device, I recommend latest Arnova8G2 version. You can also find it at the bottom of this post. It is great and does not require any other settings after you apply the fix in Magisk.
-Camera2API, Portrait mode + HDR on front camera fix (MAGISK MODULE) - https://mega.nz/#!M5gjSQxJ!K5Q4XmdRi...klOV7SVhWWo9RE
-Stable and autoconfig GCam - https://www.celsoazevedo.com/files/a...eta-test-9.apk
For any other questions, feel free to ask me.
IMPORTANT!! The fix for front cam may not work with all ROMs. It was tested on the following:
- XIAOMI.EU Stable 220.127.116.11
- XIAOMI.EU Stable 9.2.x.x
- XIAOMI.EU Developer 8.3.22
- Lineage OS
- AOSP Extended
You can test it on your device on your own risk. If it does not work you can delete module from magisk.
Credits to @defcomg for the help with the library, @WebDingo for the magisk module and @Arnova8G2 for the amazing work with all GCam ports. Also crediting other developers for their great additions to this community.