[ROM][R][mata] Unofficial, optimized LineageOS 18.1 - May 6th

Search This thread

Tomoms

Senior Member
Feb 15, 2014
2,643
6,340
OnePlus One
Essential Phone
In this thread I'll share with you my personal builds of LineageOS 18.1 for the Essential PH1 - codename: mata. These builds are unofficial LineageOS builds, customized with my favorite tweaks and features, and with some interesting optimizations.

MAIN FEATURES
LineageOS 18.1 features:
  • support for MicroG (signature spoofing) - read the 2nd post!
  • built with the latest Clang 12.0.x
  • updated & improved libraries: sqlite, zlib, libpng, jemalloc, libvpx, libyuv
  • critical system components built with -O3 optimizations (art, SurfaceFlinger, bionic)
  • arm64-optimized bionic routines
  • Android RunTime (ART) updates and improvements
  • several debugging & tracing components are removed from the system
  • partial/full screenshot QS tile
  • reduced priority of the USB connection type & USB debugging notifications
  • in-built F-Droid Privileged Extension
  • removed some links with Google: DNS nameservers & captive portal URL
  • support for OTA updates
  • signed with my own keys
  • other minor tweaks and improvements
KERNEL FEATURES
  • updates for zram/zsmalloc (+ zstd compression algorithm instead of lz4) reverted due to regressions
  • power-efficient workqueues are implemented in many drivers
  • simple_lmk by kerneltoast replaces standard LMK
  • Kcal & Klapse
  • maple I/O scheduler as default
  • DDR bandwidth boost when launching apps and other scenarios
  • DriveDroid support (not tested)
  • Wireguard support (not tested)
  • lots patches to improve memory allocation-related overhead
  • USB controller driver updated (MTP speed improvements)
  • memory routines optimized for the arm64 architecture
  • built with -O3 optimizations
  • binder backported from Linux 5.4
  • lots of drivers and components only useful for debugging are disabled
  • many small, miscellaneous patches to improve performance and power consumption
BUGS
Common to official builds as well:
  • unaligned recovery logo + black bar at the right of the screen - fixed in my 2021-12-15 build and newer official builds
  • distorted in-call audio when VoLTE is enabled for T-Mobile users - fixed in my 2022-03-11 build and newer official builds
  • low microphone volume/distorted audio when recording videos
  • PPSSPP crashes on startup
Specific to my builds:
  • recovery "Back" button is difficult to press - workaround: press a little bit above it - fixed in the 2022-01-07 build
  • speaker misbehaving when listening to voice messages in apps such as Telegram and WhatsApp - fixed in the 2022-02-21 build

CHANGELOG for LineageOS 18.1:
May 6th:
  • May's security patches
  • various kernel updates and fixes

April 28th:
  • synced with LineageOS
  • updated SQLite to v3.37.2
  • kernel bug fix involving ZRAM
  • minor kernel tweaks and improvements

April 13th:
  • synced with LineageOS, April's security patches
  • some minor tweaks and fixes in the Android frameworks
  • kernel: binder driver backported from Linux 5.4
  • kernel: simple_lmk replaces the standard LMK
  • kernel: updates for the random number generator driver
  • kernel: other minor fixes and improvements

March 21st:
  • lots of updates and fixes for the platform code (picked from crDroid)
  • critical system components/libraries are built with ThinLTO and PGO
  • improved the energy efficiency of the WiFi chip
  • synced with LineageOS

March 11th:
  • synced with LineageOS
  • March's security patches
  • fix for distorted in-call audio for T-Mobile users when VoLTE is enabled

February 21st:
  • synced with LineageOS
  • a fix by the Lineage team for a telephony bug: more info here
  • a fix by me for a permission issue that caused the playback of voice messages in messaging apps not to switch properly between the main and the call speakers when the proximity sensor was covered/uncovered

February 11th:
  • synced with LineageOS
  • kernel updated to Linux 4.4.302
  • minor bug fix in the system

January 22nd:
  • synced with LineageOS
  • kernel updated to Linux 4.4.299
  • Google's DNS nameservers have been replaced with Cloudflare's (1.1.1.1, 1.0.0.1)
  • some security hardening patches taken from GrapheneOS

January 7th:
  • kernel: Linux 4.4.297
  • kernel: removed debugging junk from the WiFi chip's driver
  • kernel: patches for the dwc3 driver (improve MTP transfer speeds)
  • tentative fix for the camcorder microphone issues
  • recovery touchscreen issues are fixed
December 15th:
  • synced w/ LineageOS (incl. December's security patches)
  • kernel updated to Linux 4.4.294
  • lots of small kernel improvements and fixes
  • maple I/O scheduler is now the default
  • several user interface/user experience improvements (read here)
  • alignment of visual elements in recovery is fixed (now also in official LineageOS)
November 5th:
  • synced with LineageOS
  • November's security patches
  • kernel: DriveDroid support
  • kernel: Wireguard support
  • kernel: DDR bandwidth boost on zygote fork
  • kernel: several other small updates and improvements
October 23rd:
  • synced with LineageOS
  • touchscreen support in Lineage recovery
  • kernel now supports Kcal and Klapse
October 7th:
  • initial build with all the above features
  • October's security patches are included

DOWNLOADS
LineageOS 18.1 (all builds): SourceForge
Recovery images (all builds): SourceForge


SOURCES
All my repos are on Github. In particular: device tree, kernel sources.


A BIG "THANK YOU" TO
the whole LineageOS team, and the multitude of great developers of the Android custom ROM scene, such as kdrag0n, kerneltoast (Sultanxda), arter97, nathanchance, flar2, franciscofranco, frap129, the MSM-Xtended project, the crDroid project. I hope I have not forgotten anyone.
 
Last edited:

Tomoms

Senior Member
Feb 15, 2014
2,643
6,340
OnePlus One
Essential Phone
POST-INSTALLATION ADVICE

SETTING UP MICROG

Signature spoofing is supported but not enabled out of the box. There's no switch to enable it in Settings, you must grant its permission to each app that needs it. In particular, if you install MicroG (either via the apks or via MinMicroG), you must run these commands in a root shell:
Code:
pm grant com.google.android.gms android.permission.FAKE_PACKAGE_SIGNATURE
pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE
then make sure all the checkboxes in MicroG's status screen are ticked and reboot.

SETTING UP VIPER4ANDROID
If you follow these steps carefully, you'll manage to install Viper4Android while keeping Enforcing SELinux, and it will survive across ROM updates too :)
Since XDA Labs has been dead for a while, I've reuploaded Viper4Android's apk installer here: https://mega.nz/file/htFikD6Y#HpcdSMSa6fPdB5EXhGnyYI4uoxA7R4TnzhAZD_J_jrk

PASSING SAFETYNET
Passing SafetyNet is quite easy. You need to have Gapps installed, though. Flash Magisk, enable Magisk Hide in its settings, reboot. Now you should pass SafetyNet.
 
Last edited:

Angrydr0id

Senior Member
Nov 8, 2015
71
18
OnePlus One
Essential Phone
I just installed the ROM.
I did a clean flash through TWRP with Magisk and Gapps; January firmware and AOSP Vendor.
I only found the next bugs:
  • OTA always says that the update check failed, so I don't know if its working.
  • When I am on a call and I use the speaker, I can hear but they do not hear me. (This bug was present in my previous rom that was Carbon but I would like to know why it happens and if it is possible to fix it).
Everything else seems to work flawlessly.
Thanks again and I'll be on the lookout for updates.
If you need me to test, logs or something that can help in the development you can contact me without problem.
 

Tomoms

Senior Member
Feb 15, 2014
2,643
6,340
OnePlus One
Essential Phone
I just installed the ROM.
I did a clean flash through TWRP with Magisk and Gapps; January firmware and AOSP Vendor.
I only found the next bugs:
  • OTA always says that the update check failed, so I don't know if its working.
  • When I am on a call and I use the speaker, I can hear but they do not hear me. (This bug was present in my previous rom that was Carbon but I would like to know why it happens and if it is possible to fix it).
Everything else seems to work flawlessly.
Thanks again and I'll be on the lookout for updates.
If you need me to test, logs or something that can help in the development you can contact me without problem.
I've just fixed the OTA updater's issue. I had forgotten to push the json file that is used to check the presence of updates, thus the check failed. It's working now.
Issue number 2 is common to many phones and ROMs, on older phones it used to be a problem with some value in the mixer_paths.xml file. I'll look into it.
 

pakpenyo

Senior Member
Jul 24, 2015
174
37
I've just fixed the OTA updater's issue. I had forgotten to push the json file that is used to check the presence of updates, thus the check failed. It's working now.
Issue number 2 is common to many phones and ROMs, on older phones it used to be a problem with some value in the mixer_paths.xml file. I'll look into it.
For issue number 2, it occurs in almost all roms, especially those based in LOS, except AOSPA Ruby Beta 1. Your device tree also uses 3 mics like LOS. So, the problem is the same.
 

Tomoms

Senior Member
Feb 15, 2014
2,643
6,340
OnePlus One
Essential Phone
For issue number 2, it occurs in almost all roms, especially those based in LOS, except AOSPA Ruby Beta 1. Your device tree also uses 3 mics like LOS. So, the problem is the same.
Thanks for the information. I'll look into it but it's not my main priority right now. Give me a couple of weeks :)
 

pakpenyo

Senior Member
Jul 24, 2015
174
37
supporting info here if needed regarding the speaker issue
I've seen it for a long time, including your posts there. Is the problem solved by removing the 3 mic entry?

Btw, i just made a new issue there. It happens in all LOS based roms, as well as other roms like Carbon, Havoc etc. But that's not the case in AOSPA Ruby Beta 1. I have a logcat, but I don't understand. May it be related to an audio/mic/speakerphone issue?
 

Tomoms

Senior Member
Feb 15, 2014
2,643
6,340
OnePlus One
Essential Phone
Hello guys!
I've just uploaded a new build. It brings Kcal/Klapse support, as requested by @Angrydr0id
I've also fixed touchscreen in Lineage recovery, it's working again now :)
Lineage recovery images are now available for download in a specific folder on SourceForge. They are meant to be flashed with fastboot and then booted with fastboot reboot recovery
 

Angrydr0id

Senior Member
Nov 8, 2015
71
18
OnePlus One
Essential Phone
Just updated and everything works perfectly also in the recovery, thanks for implementing KCAL.

If someone uses FrancoKernel Manager to modify the values of the screen in "Display Control", I recommend the following settings, I love the saturation of the colors:

Saturation: 275
Value: 251
Contrast: 258
Hue: 0

Thanks.
 
  • Like
Reactions: Nehemoth

Tomoms

Senior Member
Feb 15, 2014
2,643
6,340
OnePlus One
Essential Phone
Another +1 in hope of fixing this issue, a fix would easily catapult this ROM to top of the charts for this device. I think this is possibly the biggest issue for mata development currently and only AOSPA folks (and stock) seems to have fixed it.
I'll start looking into this issue in the very next days. Keep an eye on this thread :)
 

Tomoms

Senior Member
Feb 15, 2014
2,643
6,340
OnePlus One
Essential Phone
New build available! Featuring November's security patches plus several interesting kernel updates and improvements, such as DDR bandwidth boost on app startup (should improve app launching time a bit), memory allocation speed & overhead improvements, Wireguard support and DriveDroid support. I haven't tested Wiregaurd and DriveDroid, so try them if you can and let me know if they work.
The speakerphone issue is still under investigation, I haven't had enough time to look at it lately.
 

mervinb

Member
May 8, 2015
31
17
New build available! Featuring November's security patches plus several interesting kernel updates and improvements, such as DDR bandwidth boost on app startup (should improve app launching time a bit), memory allocation speed & overhead improvements, Wireguard support and DriveDroid support. I haven't tested Wiregaurd and DriveDroid, so try them if you can and let me know if they work.
The speakerphone issue is still under investigation, I haven't had enough time to look at it lately.
@Tomoms , I've been using official 18.1 for several months, and my impression if that your ROM is a major improvement - smoothness, and esp. battery life. It might be partly due to the fresh install, but so far, so good. Thank you! The phone is a backup to my Pixel 4a, but has been called upon several times, so having an up-to-date Android on the PH-1 is important for me.

As with the other poster(s), the speaker / mic issue is a problem. My dad, very senior and hard of hearing, has another PH-1, and the issue makes video call difficult for him. Hope you have some time to look into it.
 
  • Like
Reactions: psychic_quark

Tomoms

Senior Member
Feb 15, 2014
2,643
6,340
OnePlus One
Essential Phone
@Tomoms , I've been using official 18.1 for several months, and my impression if that your ROM is a major improvement - smoothness, and esp. battery life. It might be partly due to the fresh install, but so far, so good. Thank you! The phone is a backup to my Pixel 4a, but has been called upon several times, so having an up-to-date Android on the PH-1 is important for me.

As with the other poster(s), the speaker / mic issue is a problem. My dad, very senior and hard of hearing, has another PH-1, and the issue makes video call difficult for him. Hope you have some time to look into it.
Glad you're liking my ROM. Yep, don't worry, I've already started to look into the speakerphone issue :)
 
  • Like
Reactions: vsn4 and Angrydr0id

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Hello, official LineageOS 19 nightlies will be available for mata in a couple of days circa. I'll start building my 19-based ROM in the next few weeks. Expect the first build to be available before the end of the month :)
    5
    Hello people, I've released a new build. SourceForge seems to have some problems at the moment, so in case of slow or faulty downloads, wait a few hours and retry.
    This build brings: an updated SQLite library, an important kernel fix for ZRAM (which was sometimes failing in the background since the very first build of mine, which dates back to last summer - not a critical bug but still important to have it fixed!), and a few minor tweaks for the kernel.
    In order to fix the ZRAM bug, I had to revert the updates for the ZRAM driver I had applied in the kernel. Thus, LZ4 now replaces zstd as the compression algorithm (just like in official LineageOS). However, it is an updated LZ4 engine which should perform better that the older one which is present in our LineageOS kernel, so I still expect ZRAM to perform a tad better, compared to official LineageOS :)
    If you want to live on the edge, you can flash this kernel: https://mega.nz/file/E9ME2R4b#sFNw-D0ZZpUMSjRMxYbzkwfhpvAfZ6KnqoEMfWDY3mQ
    Source-wise, it is identical to the one bundled in the new build, but it is compiled with the latest Clang 15.0.0 and Polly optimizations. Seems to be working fine here.
    Happy flashing!
    5
    Hello, a new build with May's security patches has just been uploaded. It'll be available for downloading (also via OTA) in a few minutes :)
    1
    I was on the April 13th build, then booted to recovery and sideloaded the April 28th build. This doesn't boot for me - it fails and brings be back to recovery.
    At that point i've used fastboot to change slots back and forth and flashed magisk to both of them (as the recovery flashes magisk to the other slot afaik), eventually came back to the slot of the 28th build. This doesn't boot as well.

    Only after factory reset it boots as normal.

    Could it be related to encryption?
    It could, but everybody's data partition is encrypted, so I cannot understand why you're having problems.
    Next time, in order to flash Magisk in the correct slot after an upgrade, just enter the Advanced menu of the recovery and tap on Reboot to recovery. The phone will be rebooted to recovery and the active slot will be automatically switched to the one in which you have just flashed the new build. At this point you'll be able to flash Magisk or whatever in the proper slot. No fastboot needed.
    Anyway, if as of now you have fixed the problem by factory-resetting, let's wait and see what happens with the next build.
    1
    What toolchains do you use to compile the kernel? I've tried Google's AOSP GCC+Proton Clang but I'm getting many errors.
    For inline builds of the kernel (i.e., kernel built during a full OS compilation), I use this clang. For standalone kernels, I use a more up-to-date Clang (Proton clang 13 until a few weeks ago, Atom-X Clang 15 currently). Take a look at the funcs.sh file in my kernel sources to see what environment variables and what make arguments I use to build.
  • 11
    In this thread I'll share with you my personal builds of LineageOS 18.1 for the Essential PH1 - codename: mata. These builds are unofficial LineageOS builds, customized with my favorite tweaks and features, and with some interesting optimizations.

    MAIN FEATURES
    LineageOS 18.1 features:
    • support for MicroG (signature spoofing) - read the 2nd post!
    • built with the latest Clang 12.0.x
    • updated & improved libraries: sqlite, zlib, libpng, jemalloc, libvpx, libyuv
    • critical system components built with -O3 optimizations (art, SurfaceFlinger, bionic)
    • arm64-optimized bionic routines
    • Android RunTime (ART) updates and improvements
    • several debugging & tracing components are removed from the system
    • partial/full screenshot QS tile
    • reduced priority of the USB connection type & USB debugging notifications
    • in-built F-Droid Privileged Extension
    • removed some links with Google: DNS nameservers & captive portal URL
    • support for OTA updates
    • signed with my own keys
    • other minor tweaks and improvements
    KERNEL FEATURES
    • updates for zram/zsmalloc (+ zstd compression algorithm instead of lz4) reverted due to regressions
    • power-efficient workqueues are implemented in many drivers
    • simple_lmk by kerneltoast replaces standard LMK
    • Kcal & Klapse
    • maple I/O scheduler as default
    • DDR bandwidth boost when launching apps and other scenarios
    • DriveDroid support (not tested)
    • Wireguard support (not tested)
    • lots patches to improve memory allocation-related overhead
    • USB controller driver updated (MTP speed improvements)
    • memory routines optimized for the arm64 architecture
    • built with -O3 optimizations
    • binder backported from Linux 5.4
    • lots of drivers and components only useful for debugging are disabled
    • many small, miscellaneous patches to improve performance and power consumption
    BUGS
    Common to official builds as well:
    • unaligned recovery logo + black bar at the right of the screen - fixed in my 2021-12-15 build and newer official builds
    • distorted in-call audio when VoLTE is enabled for T-Mobile users - fixed in my 2022-03-11 build and newer official builds
    • low microphone volume/distorted audio when recording videos
    • PPSSPP crashes on startup
    Specific to my builds:
    • recovery "Back" button is difficult to press - workaround: press a little bit above it - fixed in the 2022-01-07 build
    • speaker misbehaving when listening to voice messages in apps such as Telegram and WhatsApp - fixed in the 2022-02-21 build

    CHANGELOG for LineageOS 18.1:
    May 6th:
    • May's security patches
    • various kernel updates and fixes

    April 28th:
    • synced with LineageOS
    • updated SQLite to v3.37.2
    • kernel bug fix involving ZRAM
    • minor kernel tweaks and improvements

    April 13th:
    • synced with LineageOS, April's security patches
    • some minor tweaks and fixes in the Android frameworks
    • kernel: binder driver backported from Linux 5.4
    • kernel: simple_lmk replaces the standard LMK
    • kernel: updates for the random number generator driver
    • kernel: other minor fixes and improvements

    March 21st:
    • lots of updates and fixes for the platform code (picked from crDroid)
    • critical system components/libraries are built with ThinLTO and PGO
    • improved the energy efficiency of the WiFi chip
    • synced with LineageOS

    March 11th:
    • synced with LineageOS
    • March's security patches
    • fix for distorted in-call audio for T-Mobile users when VoLTE is enabled

    February 21st:
    • synced with LineageOS
    • a fix by the Lineage team for a telephony bug: more info here
    • a fix by me for a permission issue that caused the playback of voice messages in messaging apps not to switch properly between the main and the call speakers when the proximity sensor was covered/uncovered

    February 11th:
    • synced with LineageOS
    • kernel updated to Linux 4.4.302
    • minor bug fix in the system

    January 22nd:
    • synced with LineageOS
    • kernel updated to Linux 4.4.299
    • Google's DNS nameservers have been replaced with Cloudflare's (1.1.1.1, 1.0.0.1)
    • some security hardening patches taken from GrapheneOS

    January 7th:
    • kernel: Linux 4.4.297
    • kernel: removed debugging junk from the WiFi chip's driver
    • kernel: patches for the dwc3 driver (improve MTP transfer speeds)
    • tentative fix for the camcorder microphone issues
    • recovery touchscreen issues are fixed
    December 15th:
    • synced w/ LineageOS (incl. December's security patches)
    • kernel updated to Linux 4.4.294
    • lots of small kernel improvements and fixes
    • maple I/O scheduler is now the default
    • several user interface/user experience improvements (read here)
    • alignment of visual elements in recovery is fixed (now also in official LineageOS)
    November 5th:
    • synced with LineageOS
    • November's security patches
    • kernel: DriveDroid support
    • kernel: Wireguard support
    • kernel: DDR bandwidth boost on zygote fork
    • kernel: several other small updates and improvements
    October 23rd:
    • synced with LineageOS
    • touchscreen support in Lineage recovery
    • kernel now supports Kcal and Klapse
    October 7th:
    • initial build with all the above features
    • October's security patches are included

    DOWNLOADS
    LineageOS 18.1 (all builds): SourceForge
    Recovery images (all builds): SourceForge


    SOURCES
    All my repos are on Github. In particular: device tree, kernel sources.


    A BIG "THANK YOU" TO
    the whole LineageOS team, and the multitude of great developers of the Android custom ROM scene, such as kdrag0n, kerneltoast (Sultanxda), arter97, nathanchance, flar2, franciscofranco, frap129, the MSM-Xtended project, the crDroid project. I hope I have not forgotten anyone.
    8
    Hello, official LineageOS 19 nightlies will be available for mata in a couple of days circa. I'll start building my 19-based ROM in the next few weeks. Expect the first build to be available before the end of the month :)
    7
    A new build is available. It brings the latest updates from the Lineage code base and an updated kernel (4.4.302).
    I've also prepared a separate kernel that you can optionally flash on top of the new build: https://mega.nz/file/llFiBD7D#6Jsum5lcswtvgMaC6-6hLQYtvGuZLp7YPEybjoFbXT8
    This kernel features more twekas and performance optimizations, mainly related to the task scheduler and the memory management subsystem. All these changes will be included in the next build's kernel.
    7
    New build available! Featuring November's security patches plus several interesting kernel updates and improvements, such as DDR bandwidth boost on app startup (should improve app launching time a bit), memory allocation speed & overhead improvements, Wireguard support and DriveDroid support. I haven't tested Wiregaurd and DriveDroid, so try them if you can and let me know if they work.
    The speakerphone issue is still under investigation, I haven't had enough time to look at it lately.
    6
    A new build is available!
    It brings several updates to the Android frameworks and other internal components (libcore, art, bionic - mostly picked from crDroid), including advanced optimizations (ThinLTO, PGO) applied to some critical system libraries.
    There are also a few device-specific changes, notably some tweaks for the WiFi driver's configuration, which should improve the energy efficiency of the chip.