• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][11] LineageOS OFFICIAL [SURYA]KARNA]

Search This thread

oxygenmouse

Member
Jan 31, 2021
14
0

gardiol

Senior Member
Feb 23, 2011
821
1,063
San Carlo Canavese
photos.gardiol.org

UltraGamerHD

Senior Member
Aug 15, 2013
1,268
1,409
Xiaomi Redmi Note 7
Xiaomi Poco X3 NFC
Great Work @gardiol

Been using Official LineageOS 18.1 for ~ 1 week now, it's all working well however recently I have started to have random freezes within apps like Reddit/Twitter/Chrome/TikTok where the UI would freeze, not responding to any of my touches then after a few seconds it would start to work and respond to my previous touches in quick succession. As a result I have had to move back to stock?

Have you noticed this/come across this before?
 

gardiol

Senior Member
Feb 23, 2011
821
1,063
San Carlo Canavese
photos.gardiol.org
Great Work @gardiol

Been using Official LineageOS 18.1 for ~ 1 week now, it's all working well however recently I have started to have random freezes within apps like Reddit/Twitter/Chrome/TikTok where the UI would freeze, not responding to any of my touches then after a few seconds it would start to work and respond to my previous touches in quick succession. As a result I have had to move back to stock?

Have you noticed this/come across this before?

Never happened.

Do you use mods or magisk modules?

Which gapps?
 

gardiol

Senior Member
Feb 23, 2011
821
1,063
San Carlo Canavese
photos.gardiol.org
The only Magisk Modules I use are the ones in your post about SafetyNet & MIUI Core for ANXCamera.

Gapps I use OpenGApps Pico

Actually, the ANX camer and MIUI core modules are NOT recomended and NOT supported on LOS. You should remove those and see if any freeze occur. They replace so many system libraries that it is impossible to know what is going on...

Unfortunately, ANX is not recomended. Use GCAM with custom XML (i suggest the XML and GCAM i posted earlier, on telegram group there are more apks and xmls, but i don't use them personally so i cnanot upload them here).

Maybe i will make a thread gcam related for LOS.
 

Master One

Senior Member
Jan 31, 2011
772
270
Europe
I assume updating LOS replaces an installed TWRP with its own recovery?

What's an automated solution for that problem, so that you don't have to reinstall TWRP manually after each LOS update?
 

Master One

Senior Member
Jan 31, 2011
772
270
Europe
It was not replaced in my case.
Interesting, because as LOS comes with its own recovery, a manual or OTA update should overwrite the recovery partition as well, unless it makes use of the backup-script functionality.

It's been some time that I had LOS (for microG) in use, and back then on the OnePlus 6 I always had to restore TWRP after a ROM update using the "TWRP A/B Retention Script" Magisk module, as as with Magisk itself.
 

gardiol

Senior Member
Feb 23, 2011
821
1,063
San Carlo Canavese
photos.gardiol.org
Interesting, because as LOS comes with its own recovery, a manual or OTA update should overwrite the recovery partition as well, unless it makes use of the backup-script functionality.

It's been some time that I had LOS (for microG) in use, and back then on the OnePlus 6 I always had to restore TWRP after a ROM update using the "TWRP A/B Retention Script" Magisk module, as as with Magisk itself.

No LOS recovery will never be installed without manual operation. TWRP will not support OTA tough, you must flash the update zip manually. And no, TWRP will not be replaced.
 

Master One

Senior Member
Jan 31, 2011
772
270
Europe
No LOS recovery will never be installed without manual operation. TWRP will not support OTA tough, you must flash the update zip manually. And no, TWRP will not be replaced.
OK, I'm confused now, so why would TWRP not support OTA updates? Does it work with OF?

Can't believe that OTA updates only work with the LOS recovery.

I remember it being a hassle when using LOS for microG on our OnePlus 5 and OnePlus 6, but OTA has been working nicely with ArrowOS + OF including the backup-scripts for restoring Magisk and Bromite SystemWebview automatically with each update (OTA and manually).
 

gardiol

Senior Member
Feb 23, 2011
821
1,063
San Carlo Canavese
photos.gardiol.org
OK, I'm confused now, so why would TWRP not support OTA updates? Does it work with OF?

Can't believe that OTA updates only work with the LOS recovery.

No other recovery aside LOS recovery will automatically flash OTA updates. You download the zip, then reboot to recovery (TWRP/OF) and flash the zip manually. Done.

Ask TWRP/OF devs to fix it.
 
  • Like
Reactions: curiousrom

Master One

Senior Member
Jan 31, 2011
772
270
Europe
No other recovery aside LOS recovery will automatically flash OTA updates. You download the zip, then reboot to recovery (TWRP/OF) and flash the zip manually. Done.

Ask TWRP/OF devs to fix it.
OK, still odd, because as said, it worked with TWRP and OF when using ArrowOS OTA updates.

Do you know if the LOS recovery processed the backup-scripts (which should be part of LOS ROMs) correctly, so that Magisk and things like SystemWebView get restored after an OTA update?

I have done extensive research back then resulting in [GUIDE] Bromite SystemWebView with OTA Update Survival, so if LOS recovery can handle the addon.d survival mechanism I would not necessarily need TWRP or OF instead.
 

gardiol

Senior Member
Feb 23, 2011
821
1,063
San Carlo Canavese
photos.gardiol.org
OK, still odd, because as said, it worked with TWRP and OF when using ArrowOS OTA updates.

Do you know if the LOS recovery processed the backup-scripts (which should be part of LOS ROMs) correctly, so that Magisk and things like SystemWebView get restored after an OTA update?

I have done extensive research back then resulting in [GUIDE] Bromite SystemWebView with OTA Update Survival, so if LOS recovery can handle the addon.d survival mechanism I would not necessarily need TWRP or OF instead.

Well, sincerely only core LOS people use LOS recovery due to it's critical lack of features.
It should handle that i guess.
 

v44r

Member
Nov 28, 2020
17
10
For people waiting for an "official" microG build (as I am): by looking at their build times it seems they build alphabetically at a rate of 1 device per 1h15m... latest one is "hotdogb", and there are 94 devices between that and "surya"... so ~117 hours left.

(Sorry for the OT; I hope talking about microG in an official LOS thread is not forbidden here, as is on the LOS reddit. :) )
 
  • Like
Reactions: Master One

gardiol

Senior Member
Feb 23, 2011
821
1,063
San Carlo Canavese
photos.gardiol.org
For people waiting for an "official" microG build (as I am): by looking at their build times it seems they build alphabetically at a rate of 1 device per 1h15m... latest one is "hotdogb", and there are 94 devices between that and "surya"... so ~117 hours left.

(Sorry for the OT; I hope talking about microG in an official LOS thread is not forbidden here, as is on the LOS reddit. :) )

Totally not OT, as far it's related to Lineage 18.1 official for Surya.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Insane battery life on this.

    5h13m screen time, 53% remaining. And that's in an area with not so good coverage. 2h Reddit, 1h Youtube, 1h Twitch.
    2
    I wonder why it's taking that long for LineageOS to merge those two tickets?
    Sadly, looks like we will have to wait forever for this to be merged. LineageOS are very resistant to change as they prioritise stability. Anyway, these bugs are really not important, just remember to turn on debugging...
    2
    I've been running this for a while now.

    I don't know if it's the ROM or that I flashed it after a new fastboot MIUI flash, but it's been rock solid. Very good battery life and next to no issues whatsoever.

    Recommended :)
    1
    Hi! Does anyone know how I can get the 3 cameras to work without gmcam? (Cameras, plural)
    Gcam crashes randomly, no matter which config I use.
    Or is there a way to install original xiaomi camera app?
    Got safetynet patched, but what if not? the apps that i installed before actually all worked.
    What are the restrictions?

    This is an AWESOME rom so far,everything works but i need these Cameras.
    Have a nice day :)
    I use anxcam (https://camera.aeonax.com/) though it is not recommended i.e. by gardiol. In some modes, like "protrait", it freezes, but aside this, i use it for months.
    This is the nearest to "stock" miui camera app - because it is a port.
    1
    Hi, sorry for the late reply.
    I sticked to the wiki: "https://github.com/nckmml/ANXCamera/wiki"
    https://camera.aeonax.com/#predownloads - section "By Noid - Full Version modded for R "
    And as pointed out the appropriate 48MP fix from the addon-section, as well as the "ANXCamera Pro"-application from Playstore

    Please read this Post.



    @vinylmeister
  • 60
    Lineage_OS_Logo.png



    LineageOS 17.1 official trees / unofficial builds for surya and karna.

    LineageOS 18.1 Official.

    We are official!


    17.1 will never be official.
    18.1 is official.

    WARNING - NOTE
    Due to two still unmerged tickets on LineageOS Gerrit, you MUST enable USB debugging in developers options to avoid high battery drain if you flash official build!​

    /*
    * 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.
    */

    What's working:
    • WiFi
    • VoLTE
    • VoWIFI
    • FM Radio
    • RIL (telephone, SIM, 2G/3G/4G/LTE/+/blah...)
    • Tethering
    • Bluetooth + AAC
    • Tethering + bluetooth working
    • Safety net passed
    • SELinux Enforcing in Trust
    • DT2W
    • WiFi Display fully working
    • Infrared (IR)
    • NFC (Surya only)

    Known issues:
    • Honestly at this time, nothing?

    Camera Notes
    ANX camera is not recomended and will most probably NOT work.
    To get a fully working camera try one of the gcams here. Do not forget to copy&load the associated xml file!

    Official LOS uses oss camera service, so xml written for other custom roms might not work. The gcams at the above link have modified xmls for LOS18.1.


    Download:

    There is also a MIcroG build if you don't like Google Apps!
    Note: on the same download links you can find also MicroG builds for both 17.1 and 18.1! If you care for official microg builds, check here they will be ready when they will be ready.

    There is also, for help and support, the:
    Instructions:
    • NOTE: it is MANDATORY to flash latest stable firmware for your region!
    • For 17.1: flash VENDOR + FIRMWARE from Android 10 (Q)
    • For 18.1: flash FIRMWARE from Android 11 (R) - no vendor required.
    • Download this build and Magisk (optionally) and gapps (optionally).
    • Put the zip on your MicroSD (suggested) or connect via USB to PC.
    • Boot to recovery (latest TWRP only is suggested! OrangeFox has issues).
    • Wipe Dalvik, Cache and format data. This IS NOT OPTIONAL!
    • Reboot recovery after wipe and format.
    • Flash this ROM zip...
    • ... (suggested) reboot system and do the initial setup ...
    • ... If you want Magisk and/or gapps: boot back to recovery,
    • Flash GAPPS and/or Magisk.
    • Reboot and enjoy!
    If you have any issues flashing, like persistent GApps or booting issues, try to cleanup the phone with the following procedure:
    • Download a full MIUI rom recovery package from XiaomiFirmwareUpdater
    • ... (make sure you download the full rom package for RECOVERY, it is about 2.4Gb!) ...
    • From recovery, flash the zip file. This will cleanup all the partitions.
    • Now flash again this ROM.
    This problem is related to the fact that TWRP and OrangeFox both don't support dynamic partitions properly yet.

    Tested with Magisk 23.0, newer version should work.
    Suggested GAPPS for LineageOS 17.1: OpenGapps nano or pico.
    Suggested GAPPS for LineageOS 18.1: Mind The Gaps (
    here)


    XDA DevDB Information
    LineageOS 17.1 & 18.1, ROM for the Xiaomi Poco X3 NFC

    Contributors

    Build by @gardiol
    Thanks to @Maharajah99, @janhammer504 , and quite so many others.

    Device tree sources: device tree
    Kernel sources: kernel
    Vendor sources: vendor

    Additional notes

    SafetyNet does not pass by default, you need to follow the steps on post n.3 below. This is due to Google issues and LOS rules.

    ROM OS Version: Android 10 & 11
    ROM Kernel: Linux 4.x

    Version Information
    Status:
    Official and Unofficial.

    Created 2020-12-13
    Last Updated 2021-09-98
    18
    I have some news. I am working on Lineage-18.1 and so far i am having some good progress.
    I managed to boot it, it's still unstable and a lot work is required, but it's steady.

    It is OSS based, so this will be official no doubt this time.
    18
    Official build is again underway and will be ready in a few days.
    Everything has been approved this time we are just waiting for hudson & wiki merge to be approved.

    I think there is good hope that the first official build will be next week.
    16
    Changelog

    19 September 2021 (17.1)

    September security patches.

    06 September 2021 (18.1)
    New debloated kernel
    Fixed screen recorder rate limiter
    Fixed DriveDroid (and more usb gadget stuff)
    Added proximy check to prevent screen wakeup option
    August patches
    Fixed minor denials (battery improvement)

    31 July 2021 (18.1)
    Fixed lots of denials
    Greatly improved battery life
    more minor fixes.

    20 July 2021 (both 17.1 and 18.1)
    July patches
    For 18.1: mi_thermald added back
    For 18.1: dynamic 30-120Hz fixed

    13 July 2021 (18.1)
    All new trees!
    FORMAT data is MANDATORY

    19 June 2021 (17.1)
    Upstream sync
    June patches

    17 June 2021 (18.1)
    fixed haptic issues
    Fixed Netflix error 5.10
    Fixed idle drain
    Fixed NFC denial
    Upstream sync

    07 June 2021 (18.1)
    Fix aptX
    Fix boot from MIUI to LOS not working

    07 June 2021 (18.1)
    Fix netflix
    Fic video recording length
    Fix GBoard rounded corners

    05 June 2021 (18.1)
    First release of 18.1 build!

    11 May 2021 (17.1)
    LOS upstream sync with May patches

    18 April 2021
    LOS upstream sync with April patches
    Dpmd crash resolved
    ️LOS call recorder enabled
    ️Removed all permissive domains

    09 April 2021
    Upstream sources sync

    28/29 March 2021
    Fixed video recording bug
    Fixed audio crackling (finally!)
    Removed all "parts", added doze and refresh rate specific settings
    Getting trees ready for official
    (note: UnofficlalBuild and Experimental builds are from 28 March, MicroG from 29th)

    13 March 2021
    Two builds are available...
    Unofficial, the same old build, but with March security patches.
    Experimental, featuring a full vendor partition, but still SELinux permissive, but a ton of improvements including fixed video recording length, 4K video recording and playback and more minor issues.
    Pick your choice!

    27 February 2021
    Really fixed yellow tint once for all
    Enabled VoIP transition
    Updated proprietary blobs
    Haptic improvements
    Various minor optimizations
    LOS upstream sync

    19 February 2021
    Improved Wifi
    Improved audio
    LOS upstream sync

    06 February 2021
    Improved brightness levels
    Finished reworking tree
    February LOS upstream sync
    Latest security patches

    24 Jannuray 2021
    Fixed "Fast Charging" string, except for original charger!!! (Fast charging IS working, just does not says it's fast in lockscreen).
    Added 30Hz and 50Hz display frequency in display options
    Cleaned up audio routes


    19 Jannuary 2021
    Reverted a prop which was interferring with whatsapp videos.

    18 Jannuary 2021
    Fixed fingerprints
    Rewritten init_surya.cpp
    Removed more useless stuff
    Activated correctly second SIM card
    Added a few translations
    Improved brighness
    Improved Wifi networks
    Fixed tethering+bluetooth

    05 Jannuary 2021
    WiFi Display fixed, finally!
    Resolved bug with speakerphone and reboot

    05 Jannuary 2021
    WiFi Display not fixed
    Product partition enlarged
    Device Tree reworked for proper contribution recognition
    AOD disabled. Once fixed will be available again.

    01 Jannuary 2021
    DT2W Fixed.

    29 December 2020
    New device tree is up.
    Brightness works again
    DT2W not working
    AOD not working
    FM Radio fixed (again)

    29 December 2020
    Final fix for low volume recording.
    WiFI Display still not fixed (please send logs!!!)
    Device tree cleaned up a lot
    add Higher Aspect Ratio
    statusbar : avoid display parameters on Notch
    SELinux is showing Enforcing in Trust

    28 December 2020
    Added audio fixes for low volume.
    Added full WiFi Display support (to be confirmed)

    26 December 2020
    New parittion size.
    Bluetooth now reporting working properly.

    24 December 2020
    Tentative SELinux enforcing.

    22 December 2020
    Added FM radio support, FM radio working.
    SELinux still permissive

    20 December 2020
    Reworked vendor mixing camera blobs from A10 branch and telephony from A11 branch.
    Camera is reported working.
    SIM card is reported working.
    VoLTE and WoWiFi reported working.
    FM Radio NOT working.

    19 December 2020
    New beta build for camera fix.
    Let me know if it works!

    18 December 2020
    SIM card works
    missing camera
    selinux permissive, will try to fix in later build
    16
    Passing SafetyNet and Google Play Certification

    Most of POCO X3 AOSP derived ROMs incorrectly set the device fingerprint. The reasons are various and can be summarized as:
    1. It's being dome like this by the Great Devs
    2. It's too dangerous to change
    3. In this way we can fake being a Pixel phone
    But this is fundamentally incorrect, as each device has it's own fingerprint signature that shall be preserved, and MUST be preserved in order to achieve official status. Moreover, the recent changes in Play Services about SafetyNet (you can read more here: hardware certification) make impossible to pass SafetyNet with an unlocket bootloader. The workaroud requires a rewrite of the keystore and faking to be an older device which does not support hardware certification. This must be implemented from upstream (and i doubt LOS will ever implement it anyway).

    So, what is the problem?

    First, the hardware certification must be faked.
    Second, the correct device fingerprint must be set.

    So, what is the solution?

    First, use a magisk module.
    Second, use another magisk module to fix it. Maybe this second problem might be solved in the future, but the first one cannot be fixed unless LOS upstream add the fix themselves.

    The procedure

    1. Download Magisk (official magisk page), download latest stable.
    2. Boot to recovery and install magisk. (future dirt flashes will preserve magisk)
    3. Reboot system and open Magisk Manager app.
    4. Install the first module (this: from official github page)
    5. Activate Magisk Hide and "hide Magisk Manager app". This is very important!
    6. Install the module "MagiskHide Props Config", you can find it in the modules repository inside Magisk Manager!
    7. Open a terminal... you have three options:
      1. adb shell from PC with phone connected over USB (first, enable USB debugging in developers options)
      2. Enable terminal app from developers options
      3. Install a terminal app from Play Store or FDroid.
    8. Now, in terminal: type "su" (and give root permissions!)
    9. Type "props"
    10. Now you will see a menu, select "1" (Edit device fingerprint)
    11. From the new menu, select "f" (Pick a certified fingerprint)
    12. Select the brand POCO, not XIAOMI!
    13. Now select the POCO X3 NFC (either global or europe, does not matter)
    14. You should see the fingerprint selected on screen, now accept it with "y".
    15. Accept to reboot immediately!
    16. The phone will reboot, after that SafetyNet will pass.
    Known issues and solutions

    99% of issues are related to incorrectly use of Magisk. Magisk HIDE must be enabled and Magisk MAnager must be "hidden" with the menu selection inside Magisk MAnager itself.