Here are unofficial builds LineageOS 14.1 (Android Nougat) and LineageOS 15.1 (Android Oreo) for Sony Xperia M2 (D2303 LTE, D2302 Dual, D2403 Aqua).
The firmware did not pass a long test, there may be a variety of new bugs…
Your warranty is now void! You use these firmware at your own risk, there are no guarantees. Theoretically, the phone can be damaged.
All questions and discussions write on the forum 4pda or forum XDA.
Known bugs, that have not yet been fixed
There is a very quiet sound on the videocamera (the mixer works in the sensitivity mode of a telephone conversation, it does not hear surrounding sounds). When recording a telephone conversation - the remote side is written with strong distortion.
Audio mixer's configs are not very correct (mixer_paths.xml, etc…).
Stabilizer and continuous shooting in the camera do not work.
The camera sometimes does not work from the first launch. After leaving the camera, clean recent apps and re-launching it, everything is fine. The problem is only in Oreo and Pie, in Nougat everything is fine.
Offline charging is not working properly, the phone freezes.
GPS-fix reset at the moment of switching 4G-3G data.
On some devices, a critical i2c bus error happens every few days - sensors stop working. The same problem was in the official firmware KitKat - the compass was hanging. In Lollipop everything was fine. But in custom firmware - the problem has returned, presumably this is due to the kernel.
The sound of connecting the charger is sometimes absent.
In some firmware (AICP, Recurrection Remix, Pixel), the storage capacity in the main menu is incorrectly displayed - a negative value and / or more than 100 percent.
Some memory leaks in the kernel, after a few days everything starts to slow down. It is treated simply by restarting. Although most of this problem is not observed, it probably depends on the applications used.
In builds based on Oreo and Pie, there is no SElinux (policies are not configured and permissive mode is enabled).
Resetting the settings from the menu does not work correctly (you must use the Factory Reset in TWRP). The problem is due to the fact that the reset of the settings should be performed from the android in recovery, but it is not clear how the firmware should indicate to the bootloader that the recovery is started (now the bootloader does not understand that it is waiting for the recovery to start and restart the system).
Problems with the use of root Magisk. We have an old kernel 3.4.113, for Magisk to work correctly need kernel 3.10.x.
Changelog, Downloads LineageOS for Sony M2
Work on LineageOS for Sony M2 is not stopped, the builds will be published as security updates are released (usually once a month, in middle of month).
Do Factory Reset in TWRP (necessarily, otherwise the installation over the old LineageOS inherits some errors of the old LineageOS).
Install the firmware.
You can install GApps immediately, I use OpenGApps, ARM - 8.1 - Nano.
The first run may take several minutes.
If you need root - SuperSU, install after initial setup.
What is the difference between different Android firmware?
I installed and compared many different firmware - LineageOS (ex CyanogenMod), AEX (AOSP Extended), Resurrection Remix, Pixel, AOKP, AICP, dotOS, crDroid, Candy, XenonHD, MoKee and others.
LineageOS is one of the most popular firmware, regularly updated, but there are almost no additional configuration options - almost pure Android.
dotOS, Pixel, MoKee - do not have additional settings, different pre-designed themes.
In other firmware (AEX, AOKP, AICP, Resurrection Remix, XenonHD, etc.) there is a section of advanced settings, their composition is about the same for all. For example, you can include the output of the date and day of the week in the status bar near the clock. Configure traffic indicator. Adjust the battery indicator. In the menu of the latest applications show the occupied RAM. Configure the lock screen, disable the quick settings there. Customize the quick settings panel (size and number of icons, captions). And much more, only about a hundred of these options.
From the compared firmware, the maximum number of additional settings in the AICP and Resurrection Remix.
But almost all custom firmwares (except LineageOS) have a short support period, and in the spring of 2019 the compilation AICP and Resurrection Remix based on Oreo became impossible. Because parts inherited from AOSP have changed and become incompatible with old versions of AICP and RR, but the authors of AICP and RR did not update their Oreo firmware for new AOSP sources (they make firmware only for the latest versions - Pie). So regular builds of AICP-Oreo and RR-Oreo for Sony M2 are not expected. Although, AICP-Oreo builds will probably still be.
Firmwares Carbon and Omni - very different from the others, build on existing source config for M2 - they don't work…
LineageOS has a long term support, even KitKat update (as of 2019).