Development [ROM][13.0][SAFETYNET][OPTIMIZED] LineageOS 20 for Motorola Edge 30

Search This thread

Daedroza

Inactive Recognized Developer
Jun 16, 2014
570
1,051
github.com
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/


About LineageOS
LineageOS is a free, community built, aftermarket firmware distribution of Android 13.x (T),​
which is designed to increase performance and reliability over stock Android for your device.​
All the source code for LineageOS is available in the LineageOS GitHub repo.​
And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.​
Official LineageOS website : http://lineageos.org

About Optimizations
  • Android Runtime
    • Disable debugging related features
    • Compile with D8 optimizations
    • Adjust watchdog timeout
  • Android Bionic
    • Sort host cache in-memory for performance
    • Switch to jemalloc memory allocator
    • msmset and pthread related changes
  • Android Build
    • Compile with ARMv8-2a-dotprod optimizations
    • Compile with O3
    • Compile with lse+fp16
    • Don't compress resources and assets
    • Use dexpropt speed
    • Increase heap size and use aapt2
    • ... and sqlite, zlib related optimizations
  • Android Recovery
    • Allow installation of unverified zips i.e the most functional change ever
  • Android FWB
    • Reduce blur intensity to ease CPU/GPU
    • 3 finger screenshot support (Please check under Gestures)
    • Added related missing permissions
    • SurfaceFlinger related optimizations
    • View/Layout optimizations
  • Android Telephony
    • Latest prebuilt APN from Stock
    • Updated CarrierConfigs from CAF
    • Additional cherry-picked IMS related fixes
  • Android System
    • Safetynet fixes
    • Improved Magisk evasion fixes
    • Disabling data for all connection interfaces and not just mobile data
    • Additional alarms and ringtones
  • Dialer
    • Allow auto-call recording as per country laws
    • UI changes
  • DocumentsUI
    • Start with Internal Storage instead of Downloads
  • Gallery2
    • Start with albums activity
  • Trebuchet
    • Allow double tap to sleep on homescreen
  • Updater
    • Allow local update feature
About Issues
  • MotoCamera's night mode doesn't work correctly (same as LineageOS)

Downloads Links
LineageOS 20.x (Unlocked Bootloader) :
Link :
Google Applications :
Not required (has inbuilt minimal set of Google Applications including SetupWizard)​
Flashing and updating
LineageOS clean install :
- (Optional) Flash the boot.img recovery from the ROM zip with Fastboot​
- (Optional) Wipe the data & cache (Backup to make sure not to loose data)​
- Flash the LineageOS ROM zip from the Recovery​
- Reboot to recovery again​
- (Optional) Every additional zip you want to flash like Magisk​
- Reboot to system​
LineageOS Update using "Local Update" feature :
- You need to be on an existing ROM developed by me​
- Download the ZIP from download link above and storage in local storage (example Downloads folder)​
- Go to Settings -> System -> Updater​
- Click 3-dot buttons and select Local update​
- Select the zip using File Manager​
- Let it update (takes some time)​
- Reboot​
Issues and reports
- Report issues only if you are using the ROM kernel
- If an additional mod is installed, make sure it's unrelated, and mention it
- Make sure the issue wasn't discussed earlier in the threads
- Share a log of the error with CatLog for example
- Make sure you also tell the ROM version you're using

XDA:DevDB Information
[ROM][13.0][OPTIMIZED] LineageOS 20 for Moto Edge 30

Contributors
Daedroza, Albert
Source Code: https://github.com/daedroza

ROM OS Version: 13.x Android T
ROM Kernel: Linux 5.4.x

Version Information
Status:
Stable

Created 2023-01-26
Last Updated 2023-01-26
 
Last edited:

Daedroza

Inactive Recognized Developer
Jun 16, 2014
570
1,051
github.com
Changelog (You can use updater to update from local storage)
  • March 25, 2023
    • Sync with March security patches
    • Aggressive inline optimization using LTO
    • Aggressive sleep optimizations
    • Respect restricted apps
    • Platform fixes for GMS package
    • Fixed a bug where Android Studio's debugger didn't connect (for developers)
  • February 19, 2023
    • Complete fix for SafetyNet
  • February 13, 2023
    • Synced with February security patches
    • More SQLite optimizations and updates
    • Reverted to Lineage's UDFPS implementation
    • Use Aperture instead of MotCamera4 (crashes with face beauty and night mode...)
 
Last edited:

rjawan

Member
Jul 13, 2013
9
2
Appreciate your kind efforts. Feels perfectly smooth and stable.
Just a noob question regarding the "Safetynet fixes", my device still cannot pass the CTS (which I assumed would be one of the fixes compared to stock LOS 20). Or may be I misunderstood the whole thing. Thanks.
 

Daedroza

Inactive Recognized Developer
Jun 16, 2014
570
1,051
github.com
Appreciate your kind efforts. Feels perfectly smooth and stable.
Just a noob question regarding the "Safetynet fixes", my device still cannot pass the CTS (which I assumed would be one of the fixes compared to stock LOS 20). Or may be I misunderstood the whole thing. Thanks.

Thanks for your response!

I've picked "most" of the patches across different ROMs but there might be one or two missing. For time being, you can use Magisk and Zygisk to hide your relevant apps.

For me, using Magisk + Zygisk Hide on Google Play Store gave certified status which is good enough for me. At the moment, I am using ProtonAOSP's related patches (mostly with exception for others) for SafetyNet from Android 12 but it seems Android 13 is bit different. I will take a look into it however I am sure you can get it done easily using Magisk + Zygisk combo for time being.

EDIT: Magisk fixed. Please use builds after 18th February!
 
Last edited:
  • Like
  • Love
Reactions: crubbish and rjawan

alekksander

Senior Member
Nov 1, 2016
80
12
is any of these improvements suppose to improve longevity of battery? (except lowering blur, that i can understand :) ) wondering if this build is for me over default LOS.

possible to see build without google stuff included?
 
Last edited:

Daedroza

Inactive Recognized Developer
Jun 16, 2014
570
1,051
github.com
is any of these improvements suppose to improve longevity of battery? (except lowering blur, that i can understand :) ) wondering if this build is for me over default LOS.

possible to see build without google stuff inincluded

From a non developer's perspective, ROM is quite smooth. Most layers of the code are optimised. There are some functional changes like able to install unsigned packages in recovery which official Lineage doesn't allow.

For battery life, I get maximum 10 hours of screen on time. I never crossed that mark. Usage is no social media and mostly video browsing (means no screen touches with 480p/720p streaming) @ 60HZ/48HZ combo.

Regarding Google Play services, it was a design decision. I like functional changes and hence kept a minimal package that is oriented towards battery life. I had done my fair share of living without Google services and I think modern devices are fairly powerful now.

I had done a comparison with Lineage's recommended MindTheGapps package and I get additional 2 hours of screen on time (maximum 10 hours of screen on time as said before).
 

JorgeTone

Member
Jul 21, 2016
9
7
From a non developer's perspective, ROM is quite smooth. Most layers of the code are optimised. There are some functional changes like able to install unsigned packages in recovery which official Lineage doesn't allow.

For battery life, I get maximum 10 hours of screen on time. I never crossed that mark. Usage is no social media and mostly video browsing (means no screen touches with 480p/720p streaming) @ 60HZ/48HZ combo.

Regarding Google Play services, it was a design decision. I like functional changes and hence kept a minimal package that is oriented towards battery life. I had done my fair share of living without Google services and I think modern devices are fairly powerful now.

I had done a comparison with Lineage's recommended MindTheGapps package and I get additional 2 hours of screen on time (maximum 10 hours of screen on time as said before).

10 hours is impressive, even with just 60hz. So that means if you do not have the MindTheGapps you have 2 hours extra battery? Or is it 2 more hours if you have the MindTheGapps vs the Google bloat?

Thanks
 

Daedroza

Inactive Recognized Developer
Jun 16, 2014
570
1,051
github.com
profound answer. thank You.

does it mean no plans to release g'less variant?

No plans as such. Building Android 13 is already very costly for me with these optimizations. Building it twice once with and without is something I am not looking forward to simply because of my constrained resources. I do a lot of building outside Lineage too, so simply cannot waste my SSD read/write cycles. Secondly, I already shipped first version with those services built-in. Removing those in next update will cause a lot of problems and could be fixed with clean flash only.

10 hours is impressive, even with just 60hz. So that means if you do not have the MindTheGapps you have 2 hours extra battery? Or is it 2 more hours if you have the MindTheGapps vs the Google bloat?

Thanks

MindTheGapps is a more complete Google services package which includes accessibility and few other components. My minimal built-in package doesn't include those. If you require accessibility services, my recommendation is to use official Lineage with MindTheGapps.
 
Last edited:
  • Like
Reactions: Pfmp2010

alekksander

Senior Member
Nov 1, 2016
80
12
Got it.
Really last question – does this ROM works anything different to LOS regarding UDFPS? (It doesn't seem so, but i prefer to ask since i cannot decode most of the changelog acronyms).
 
Last edited:
  • Like
Reactions: Daedroza

Daedroza

Inactive Recognized Developer
Jun 16, 2014
570
1,051
github.com
Got it.
Really last question – does this ROM works anything different to LOS regarding UDFPS? (It doesn't seem so, but i prefer to ask since i cannot decode most of the changelog acronyms).

The UDFPS implementation is same as official build, no difference whatsoever except that my build has slightly more screen flashes because the UDFPS implementation doesn't support multi rect correctly. A workaround is present in official build that causes more battery life to be consumed.

For now that workaround is reverted in my build because I'm trying to understand how far it's effect is on battery life.

I don't think you will even notice it if you use 90HZ+ or more as default.

EDIT: Reverted to original Lineage implementation on new release!
 
Last edited:

Daedroza

Inactive Recognized Developer
Jun 16, 2014
570
1,051
github.com
Appreciate your kind efforts. Feels perfectly smooth and stable.
Just a noob question regarding the "Safetynet fixes", my device still cannot pass the CTS (which I assumed would be one of the fixes compared to stock LOS 20). Or may be I misunderstood the whole thing. Thanks.

Hi @rjawan , please use build from February 19, 2023. It has complete SafetyNet fixes. Remember to remove Magisk as some apps still detect it and banks might app not work because of it. But CTS profile does pass and my bank app works now. Enjoy :)
 
  • Like
  • Love
Reactions: crubbish and rjawan

rjawan

Member
Jul 13, 2013
9
2
Hi @rjawan , please use build from February 19, 2023. It has complete SafetyNet fixes. Remember to remove Magisk as some apps still detect it and banks might app not work because of it. But CTS profile does pass and my bank app works now. Enjoy :)
Thank you. Amazing work. Works like a charm, just as you said. Passed the CTS test straight away. BTW I am not using Magisk to begin with so have nothing to do on that front. Cheers mate. Thanks. :giggle:
 
  • Like
Reactions: Daedroza

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Code:
    #include <std_disclaimer.h>
    /*
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    */


    About LineageOS
    LineageOS is a free, community built, aftermarket firmware distribution of Android 13.x (T),​
    which is designed to increase performance and reliability over stock Android for your device.​
    All the source code for LineageOS is available in the LineageOS GitHub repo.​
    And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.​
    Official LineageOS website : http://lineageos.org

    About Optimizations
    • Android Runtime
      • Disable debugging related features
      • Compile with D8 optimizations
      • Adjust watchdog timeout
    • Android Bionic
      • Sort host cache in-memory for performance
      • Switch to jemalloc memory allocator
      • msmset and pthread related changes
    • Android Build
      • Compile with ARMv8-2a-dotprod optimizations
      • Compile with O3
      • Compile with lse+fp16
      • Don't compress resources and assets
      • Use dexpropt speed
      • Increase heap size and use aapt2
      • ... and sqlite, zlib related optimizations
    • Android Recovery
      • Allow installation of unverified zips i.e the most functional change ever
    • Android FWB
      • Reduce blur intensity to ease CPU/GPU
      • 3 finger screenshot support (Please check under Gestures)
      • Added related missing permissions
      • SurfaceFlinger related optimizations
      • View/Layout optimizations
    • Android Telephony
      • Latest prebuilt APN from Stock
      • Updated CarrierConfigs from CAF
      • Additional cherry-picked IMS related fixes
    • Android System
      • Safetynet fixes
      • Improved Magisk evasion fixes
      • Disabling data for all connection interfaces and not just mobile data
      • Additional alarms and ringtones
    • Dialer
      • Allow auto-call recording as per country laws
      • UI changes
    • DocumentsUI
      • Start with Internal Storage instead of Downloads
    • Gallery2
      • Start with albums activity
    • Trebuchet
      • Allow double tap to sleep on homescreen
    • Updater
      • Allow local update feature
    About Issues
    • MotoCamera's night mode doesn't work correctly (same as LineageOS)

    Downloads Links
    LineageOS 20.x (Unlocked Bootloader) :
    Link :
    Google Applications :
    Not required (has inbuilt minimal set of Google Applications including SetupWizard)​
    Flashing and updating
    LineageOS clean install :
    - (Optional) Flash the boot.img recovery from the ROM zip with Fastboot​
    - (Optional) Wipe the data & cache (Backup to make sure not to loose data)​
    - Flash the LineageOS ROM zip from the Recovery​
    - Reboot to recovery again​
    - (Optional) Every additional zip you want to flash like Magisk​
    - Reboot to system​
    LineageOS Update using "Local Update" feature :
    - You need to be on an existing ROM developed by me​
    - Download the ZIP from download link above and storage in local storage (example Downloads folder)​
    - Go to Settings -> System -> Updater​
    - Click 3-dot buttons and select Local update​
    - Select the zip using File Manager​
    - Let it update (takes some time)​
    - Reboot​
    Issues and reports
    - Report issues only if you are using the ROM kernel
    - If an additional mod is installed, make sure it's unrelated, and mention it
    - Make sure the issue wasn't discussed earlier in the threads
    - Share a log of the error with CatLog for example
    - Make sure you also tell the ROM version you're using

    XDA:DevDB Information
    [ROM][13.0][OPTIMIZED] LineageOS 20 for Moto Edge 30

    Contributors
    Daedroza, Albert
    Source Code: https://github.com/daedroza

    ROM OS Version: 13.x Android T
    ROM Kernel: Linux 5.4.x

    Version Information
    Status:
    Stable

    Created 2023-01-26
    Last Updated 2023-01-26
    2
    Appreciate your kind efforts. Feels perfectly smooth and stable.
    Just a noob question regarding the "Safetynet fixes", my device still cannot pass the CTS (which I assumed would be one of the fixes compared to stock LOS 20). Or may be I misunderstood the whole thing. Thanks.

    Thanks for your response!

    I've picked "most" of the patches across different ROMs but there might be one or two missing. For time being, you can use Magisk and Zygisk to hide your relevant apps.

    For me, using Magisk + Zygisk Hide on Google Play Store gave certified status which is good enough for me. At the moment, I am using ProtonAOSP's related patches (mostly with exception for others) for SafetyNet from Android 12 but it seems Android 13 is bit different. I will take a look into it however I am sure you can get it done easily using Magisk + Zygisk combo for time being.

    EDIT: Magisk fixed. Please use builds after 18th February!
    2
    is any of these improvements suppose to improve longevity of battery? (except lowering blur, that i can understand :) ) wondering if this build is for me over default LOS.

    possible to see build without google stuff inincluded

    From a non developer's perspective, ROM is quite smooth. Most layers of the code are optimised. There are some functional changes like able to install unsigned packages in recovery which official Lineage doesn't allow.

    For battery life, I get maximum 10 hours of screen on time. I never crossed that mark. Usage is no social media and mostly video browsing (means no screen touches with 480p/720p streaming) @ 60HZ/48HZ combo.

    Regarding Google Play services, it was a design decision. I like functional changes and hence kept a minimal package that is oriented towards battery life. I had done my fair share of living without Google services and I think modern devices are fairly powerful now.

    I had done a comparison with Lineage's recommended MindTheGapps package and I get additional 2 hours of screen on time (maximum 10 hours of screen on time as said before).
    2
    Appreciate your kind efforts. Feels perfectly smooth and stable.
    Just a noob question regarding the "Safetynet fixes", my device still cannot pass the CTS (which I assumed would be one of the fixes compared to stock LOS 20). Or may be I misunderstood the whole thing. Thanks.

    Hi @rjawan , please use build from February 19, 2023. It has complete SafetyNet fixes. Remember to remove Magisk as some apps still detect it and banks might app not work because of it. But CTS profile does pass and my bank app works now. Enjoy :)
    2
    Got it.
    Really last question – does this ROM works anything different to LOS regarding UDFPS? (It doesn't seem so, but i prefer to ask since i cannot decode most of the changelog acronyms).

    The UDFPS implementation is same as official build, no difference whatsoever except that my build has slightly more screen flashes because the UDFPS implementation doesn't support multi rect correctly. A workaround is present in official build that causes more battery life to be consumed.

    For now that workaround is reverted in my build because I'm trying to understand how far it's effect is on battery life.

    I don't think you will even notice it if you use 90HZ+ or more as default.

    EDIT: Reverted to original Lineage implementation on new release!