I have no responsibility whatsoever if this guideline causes any harm to your device. The intention of these posts are solely as personal notes for myself. Follow them at your own risk.
Through these steps I will unlock the phone’s bootloader, erasing all data. This includes the DRM keys stored in the Trim Area (TA) partition. I’ll attempt backing them up but, as of today, there is no way of restoring them to the previous state nor knowing if the actual backup is usable at all.
Without these DRM keys, several audio and video proprietary functionality provided by Sony won’t be available including some camera post-processing features, color gamut profiles, white balance, noise reduction, X-Reality Video Enhancement, DSEE HX, ClearAudio+, and Widevine L1 support for HD Netflix.
Bringing back the stock camera
First, the zip is called SemcCamera (SemcCamera-xz2c-52.1.A.2.1.zip at the moment of writing this) and it is, currently, the only add-on available for the Official LineageOS 17.1 image for the xz2c phone.
We download the file, reboot into Recovery Mode and plug the phone to the computer with the USB cable. Select Apply Update -> Apply from ADB:
root$ adb sideload SemcCamera-xz2c-52.1.A.2.1.zip Total xfer: 1.00x
Now, Go back -> Reboot system now.
Currently, the stock camera won’t work out of the box. It needs to disable SELinux or set as Permissive. Luckly, since we have Magisk installed and we can grant root privileges, we can install SELinuxModeChanger and do so.
That’s it, now you should be able to use Sony’s stock camera!
Extra treat: add Sony’s Bokeh app
Sony also provides a nice application for taking fancy photos: Bokeh (Background defocus).
Unfortunately, we cannot install it just from Google’s Play Store since it claims that the app is not compatible with this phone.
However, we can force the installation, for example, using the Aurora Store.
Finally, if you want to know about some bumps I got during the road, continue to the Appendixes.