New firmware for Sony Xperia M2 LTE, M2 Aqua, M2 Dual

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

  • Auto brightness adjustment sometimes stops working.
  • 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

Logo LineageOSLogo AICPLogo Resurrection Remix
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).

Changelog LineageOS 15.1 (Android 8.1 Oreo)
2019.08.15

Download “lineage-15.1-20190815-UNOFFICIAL-eagle.zip” – 343 MB2019-08-15

Download “lineage-15.1-20190815-UNOFFICIAL-eagle-Go.zip” – 329 MB2019-08-15

Download “aicp_eagle_o-13.1-UNOFFICIAL-20190815.zip” – 347 MB2019-08-15

Download “aicp_eagle_o-13.1-UNOFFICIAL-20190815-Go.zip” – 333 MB2019-08-15

  • Sources AICP and LineageOS updated to 2019-08-15, security update from 5 August 2019.
2019.07.10

Download “aicp_eagle_o-13.1-UNOFFICIAL-20190710-Go.zip” – 333 MB2019-07-10

Download “lineage-15.1-20190710-UNOFFICIAL-eagle-Go.zip” – 330 MB2019-07-10

  • Experimental build – Android Go configuration (faster and more responsive, but less beautiful, and some have problems with notifications from the messengers).
2019.07.10

Download “aicp_eagle_o-13.1-UNOFFICIAL-20190710.zip” – 347 MB2019-07-10

Download “lineage-15.1-20190710-UNOFFICIAL-eagle.zip” – 344 MB2019-07-10

  • Sources AICP and LineageOS updated to 2019-07-10, security update from 5 Jule 2019.
2019.06.16

Download “lineage-15.1-20190616-UNOFFICIAL-eagle.zip” – 343 MB2019-06-16

  • Adaptive LMK.
  • Several hundred kernel commits (migrated from other kernels for msm8226, msm8960t, msm8916).
  • Source LineageOS updated to 2019-06-16, security update from 5 June 2019.
2019.05.21

Download “aicp_eagle_o-13.1-UNOFFICIAL-20190520.zip” – 345 MB2019-05-20

  • Source AICP updated to 2019-05-20, security update from 5 May 2019.
2019.05.16

Download “lineage-15.1-20190516-UNOFFICIAL-eagle.zip” – 342 MB2019-05-16

  • In driver Wi-Fi enabled BondingMode (included WCNSS_qcom_cfg.ini with settings).
  • Implemented the ability to reboot into recovery.
  • Increased rear microphone sensitivity (camcorder is now well hears,
    for voice recorders – use RecForge-II with a choice of rear microphone).
  • Various changes in zRAM and swap (theoretically multitasking would be better).
  • Various changes in driver i2c (sensors will probably stop hanging).
  • Source LineageOS updated to 2019-05-16, security update from 5 May 2019.
2019.04.08

Download “lineage-15.1-20190408-UNOFFICIAL-eagle.zip” – 341 MB2019-04-08

  • The function of recording a conversation is unlocked and is now available in the dialer.
  • Minor changes and optimizations in build configurations, temporarily added debug of i2c in dmesg.
  • Source LineageOS updated to 2019-04-08, security update from 5 April 2019.
2019.03.12

Download “lineage-15.1-20190311-UNOFFICIAL-eagle.zip” – 341 MB2019-03-11

  • Source LineageOS updated to 2019-03-11, security update from Mart 2019.
2019.03.04

Download “RR-O-v6.2.1-20190304-eagle-Unofficial.zip” – 344 MB2019-03-04

  • Source Resurrection Remix updated to 2019-03-04, security update from December 2018.
2019.03.02

Download “aicp_eagle_o-13.1-UNOFFICIAL-20190302.zip” – 344 MB2019-03-02

  • Source AICP updated to 2019-03-02, security update from February 2019.
2019.02.28

Download “lineage-15.1-20190228-UNOFFICIAL-eagle.zip” – 340 MB2019-02-28

  • Fixed problems with the video camera, built-in video camera works fine (video does not twitch, FullHD work).
  • Fixed problems with XTRA/AGPS, searching and fixing satellites is now as fast as on stock firmware.
  • The built-in firewall is fixed and works (in older versions this leads to an error and a bootlap after a reboot).
  • Source LineageOS updated to 2019-02-28, security update from February 2019.
Changelog LineageOS 14.1 (Android 7.1.2 Nougat)
2019.08.15

Download “lineage-14.1-20190815-UNOFFICIAL-eagle.zip” – 320 MB2019-08-15

  • Source LineageOS updated to 2019-08-15, security update from 5 August 2019.
2019.07.09

Download “lineage-14.1-20190709-UNOFFICIAL-eagle.zip” – 321 MB2019-07-09

  • Source LineageOS updated to 2019-07-09, security update from 5 Jule 2019.
2019.06.16

Download “lineage-14.1-20190616-UNOFFICIAL-eagle.zip” – 319 MB2019-06-16

  • Adaptive LMK.
  • Several hundred kernel commits (migrated from other kernels for msm8226, msm8960t, msm8916).
  • Source LineageOS updated to 2019-06-16, security update from 5 June 2019.
2019.05.21

Download “lineage-14.1-20190521-UNOFFICIAL-eagle.zip” – 319 MB2019-05-21

  • Enabled BFQ by default (unification with Oreo builds).
  • Unified kernel from Oreo builds (Updated BFQ driver, etc).
  • In driver Wi-Fi enabled BondingMode (included WCNSS_qcom_cfg.ini with settings).
  • Implemented the ability to reboot into recovery.
  • Increased rear microphone sensitivity (camcorder is now well hears,
    for voice recorders – use RecForge-II with a choice of rear microphone).
  • Various changes in zRAM and swap (theoretically multitasking would be better).
  • Various changes in driver i2c (sensors will probably stop hanging).
  • Source LineageOS updated to 2019-05-20, security update from 5 May 2019.
2019.04.08

Download “lineage-14.1-20190408-UNOFFICIAL-eagle.zip” – 318 MB2019-04-08

  • The function of recording a conversation is unlocked and is now available in the dialer.
  • Minor changes in build configurations.
  • Source LineageOS updated to 2019-04-08, security update from 5 April 2019.
2019.03.12

Download “lineage-14.1-20190312-UNOFFICIAL-eagle.zip” – 318 MB2019-03-12

  • Source LineageOS updated to 2019-03-11, security update from Mart 2019.
2019.02.28

Download “lineage-14.1-20190228-UNOFFICIAL-eagle.zip” – 318 MB2019-02-28

  • Update gps.conf.
  • Source LineageOS updated to 2019-02-28, security update from February 2019.

Changelog, Downloads TWRP-images for Sony M2

Логотип TWRP (Team Win Recovery Project)
Image recovery.img flash to Recovery-partition.

Changelog TWRP
3.3.1-2019.07.09

Download “TWRP-eagle-20190709.rar” – 14 MBVersion 3.3.1, 2019-07-09

  • Source TWRP updated to 2019-07-09.
3.3.1-2019.06.17

Download “TWRP-eagle-20190617.rar” – 14 MBVersion 3.3.1, 2019-06-17

  • Update kernel.
  • Source TWRP updated to 2019-06-17.
3.3.0-2019.04.21

Download “TWRP-eagle-20190421.rar” – 14 MBVersion 3.3.0, 2019-04-21

  • Cleanup configs.
  • Various updates TWRP components.
3.2.3
  • Remove SuperSU from TWRP.
  • Support both md5 and md5sum file for ZIP files.
3.2.2
  • ADB backup fixes.
  • Minor tweaks to handling date/time on Qualcomm devices.

Quick Installation Guide

  • There must be an unlocked boot.
  • Tatest official firmware ever previously flashed – should be 18.6.A.0.182 (5.1.1), this is due to the modem partition, since it remains from the official firmware.
  • Recovery must be installed – (rus) TWRP for Sony Xperia M2 (eng) TWRP for Sony Xperia M2
  • 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).

What to choose – Android or Android Go (LineageOS Go, AICP Go)? Read this post.

Sources unofficial firmwares for Sony Xperia M2

All builds is based on the sources from XDA – from galaxyfreak, Konstantinosj77, sgspluss, from July 2018.

Build LineageOS 15.1 Oreo 8.1
https://github.com/LineageOS/android -b lineage-15.1
https://github.com/f2065/android_kernel_sony_msm8226 -b lineage-all kernel/sony/msm8226
https://github.com/f2065/device-sony-eagle -b lineage-15.1 device/sony/eagle
https://github.com/f2065/device-sony-yukon -b lineage-15.1 device/sony/yukon
https://github.com/f2065/vendor-yukon -b lineage-15.1 vendor/sony
https://github.com/LineageOS/android_device_sony_common -b lineage-15.1 device/sony/common
https://github.com/LineageOS/android_external_sony_boringssl-compat -b lineage-15.1 external/sony/boringssl-compat
https://github.com/LineageOS/android_hardware_sony_timekeep -b lineage-15.1 hardware/sony/timekeep
https://github.com/LineageOS/android_device_qcom_common -b lineage-15.1 device/qcom/common
https://github.com/f2065/android_hardware_qcom_gps -b lineage-15.1 hardware/qcom/gps

Build LineageOS 14.1 Nougat 7.1.2
https://github.com/LineageOS/android -b cm-14.1
https://github.com/f2065/android_kernel_sony_msm8226 -b lineage-all kernel/sony/msm8226
https://github.com/f2065/device-sony-eagle -b cm-14.1 device/sony/eagle
https://github.com/f2065/device-sony-yukon -b cm-14.1 device/sony/yukon
https://github.com/f2065/vendor-yukon.git -b cm-14.1 vendor/sony
https://github.com/LineageOS/android_device_sony_common -b cm-14.1 device/sony/common
https://github.com/LineageOS/android_external_sony_boringssl-compat -b cm-14.1 external/sony/boringssl-compat
https://github.com/LineageOS/android_hardware_sony_timekeep -b cm-14.1 hardware/sony/timekeep
https://github.com/LineageOS/android_device_qcom_common -b cm-14.1 device/qcom/common

Build TWRP
https://github.com/f2065/platform_manifest_twrp_lineageos -b twrp-14.1
https://github.com/f2065/android_kernel_sony_msm8226 -b cm-14.1 kernel/sony/msm8226
https://github.com/f2065/device-sony-eagle -b cm-14.1-twrp device/sony/eagle
https://github.com/f2065/device-sony-yukon -b cm-14.1 device/sony/yukon
https://github.com/f2065/vendor-yukon -b cm-14.1 vendor/sony
https://github.com/LineageOS/android_device_qcom_common -b cm-14.1 device/qcom/common

Build AICP 13.1 Oreo 8.1
https://github.com/AICP/platform_manifest -b o8.1
https://github.com/f2065/android_kernel_sony_msm8226 -b lineage-all kernel/sony/msm8226
https://github.com/f2065/device-sony-eagle -b aicp-13.1 device/sony/eagle
https://github.com/f2065/device-sony-yukon -b lineage-15.1 device/sony/yukon
https://github.com/f2065/vendor-yukon -b lineage-15.1 vendor/sony
https://github.com/LineageOS/android_external_sony_boringssl-compat -b lineage-15.1 external/sony/boringssl-compat
https://github.com/LineageOS/android_hardware_sony_timekeep -b lineage-15.1 hardware/sony/timekeep
https://github.com/LineageOS/android_device_qcom_common -b lineage-15.1 device/qcom/common
https://github.com/f2065/android_hardware_qcom_gps -b lineage-15.1 hardware/qcom/gps

Build Resurrection Remix 6 Oreo 8.1
https://github.com/ResurrectionRemix/platform_manifest -b oreo
https://github.com/f2065/android_kernel_sony_msm8226 -b lineage-all kernel/sony/msm8226
https://github.com/f2065/device-sony-eagle -b rr-oreo device/sony/eagle
https://github.com/f2065/device-sony-yukon -b rr-oreo device/sony/yukon
https://github.com/f2065/vendor-yukon -b lineage-15.1 vendor/sony
https://github.com/LineageOS/android_external_sony_boringssl-compat -b lineage-15.1 external/sony/boringssl-compat
https://github.com/LineageOS/android_hardware_sony_timekeep -b lineage-15.1 hardware/sony/timekeep
https://github.com/LineageOS/android_device_qcom_common -b lineage-15.1 device/qcom/common
https://github.com/f2065/android_hardware_qcom_gps -b lineage-15.1 hardware/qcom/gps