Development [ROM][12.1][UNOFFICIAL] LineageOS 19.1 for Xiaomi MIX 4

Search This thread

Inkypen

Senior Member
Aug 19, 2018
467
1,410
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
Can't wait to try it .. dirty flash okay?
I haven't tried with these specific builds, but It has worked for me in the past.
Wait what??? There's a pixel experience rom for mix 4?
Indeed. I've built a couple of other ROMs too, check https://sourceforge.net/projects/xiaomi-odin/files/
Maybe check the Mix 4 telegram group as well, there are a few ROMs by other developers: https://t.me/Mix4GlobalOfficial
 
  • Like
Reactions: Chris_of_Topher

98y98

Member
Apr 9, 2022
5
1
Wait what??? There's a pixel experience rom for mix 4?
Yes, inkypen (Nicholas Magill) also made Pixel Experience for MIX 4. Although it is currently an unofficial version, there are basically no obvious bugs when I use it, everything works fine. He is also maintaining the official PE version of MIX 3. So I believe he will also be the maintainer of MIX 4.
Current unofficial version download from here:
 
  • Like
Reactions: Chris_of_Topher

hoopsnake

Senior Member
Dec 4, 2019
143
62
ASUS ROG Phone 3
I haven't tried with these specific builds, but It has worked for me in the past.

Indeed. I've built a couple of other ROMs too, check https://sourceforge.net/projects/xiaomi-odin/files/
Maybe check the Mix 4 telegram group as well, there are a few ROMs by other developers: https://t.me/Mix4GlobalOfficial
Nice! thanks. Just waiting on painfully slow sourceforge. I'm guessing because it's pixel experience gapps included do we need vendor firmware too? And flash by fastboot since it's A12?
 
  • Like
Reactions: Chris_of_Topher

Inkypen

Senior Member
Aug 19, 2018
467
1,410
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
Nice! thanks. Just waiting on painfully slow sourceforge. I'm guessing because it's pixel experience gapps included do we need vendor firmware too? And flash by fastboot since it's A12?
Installation of PE (which does include gapps, wouldn't be a pixel experience without them lol) is the same as the installation of LOS, flash through recovery. If coming from MIUI 12 you need to flash MIUI 13 firmware. Read the instructions in the first couple of posts of this thread.
 
  • Like
Reactions: Chris_of_Topher

jmikepr

Senior Member
Aug 15, 2019
120
81
Xiaomi Mi 11 Ultra
Installation of PE (which does include gapps, wouldn't be a pixel experience without them lol) is the same as the installation of LOS, flash through recovery. If coming from MIUI 12 you need to flash MIUI 13 firmware. Read the instructions in the first couple of posts of this thread.


Just wanted to check back in and see if you had any updates on implementation of the anti flicker mode?

I know it's frowned upon to ask for updates about project especially when it's already thankless job.

But you did make it sound like an easy feature to implement when I asked previously. So I'm just curious if it's on the agenda or could be knocked out quickly.

I'm crippled by modern OLED phones and want a more private option with a good anti flicker mode.

The OnePlus devices that have official LOS support with anti flicker, still flicker quite a bit. Xiaomi has an excellent a to flicker mode from last experience but I want a privacy respecting OS as well.
 
  • Like
Reactions: Chris_of_Topher

Inkypen

Senior Member
Aug 19, 2018
467
1,410
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
New test build is up. It has a new version of minimal gapps installed and it also passes safetynet from clean flash without the need of root or any additional patches or modules. OK Google detection is now working with the screen switched off. Biggest change is a much improved ANX camera experience. There are no more crashes when using certain camera modes, the only thing not working is slow motion. I'm considering making ANX the default camera for all future builds (gapps and non gapps) and I would appreciate any feedback about this change.

Build is here: https://sourceforge.net/projects/xi...220426-UNOFFICIAL-gapps-anx-odin.zip/download
 
New test build is up. It has a new version of minimal gapps installed and it also passes safetynet from clean flash without the need of root or any additional patches or modules. OK Google detection is now working with the screen switched off. Biggest change is a much improved ANX camera experience. There are no more crashes when using certain camera modes, the only thing not working is slow motion. I'm considering making ANX the default camera for all future builds (gapps and non gapps) and I would appreciate any feedback about this change.

Build is here: https://sourceforge.net/projects/xi...220426-UNOFFICIAL-gapps-anx-odin.zip/download
I certainly welcome making ANX the default camera for all builds. The LOS-Stock-Camera is okay, but it's difficult to use and the pictures often lack is so many ways.
 
  • Like
Reactions: Chris_of_Topher

santimaster2000

Senior Member
Dec 25, 2009
406
101
Buenos Aires
New test build is up. It has a new version of minimal gapps installed and it also passes safetynet from clean flash without the need of root or any additional patches or modules. OK Google detection is now working with the screen switched off. Biggest change is a much improved ANX camera experience. There are no more crashes when using certain camera modes, the only thing not working is slow motion. I'm considering making ANX the default camera for all future builds (gapps and non gapps) and I would appreciate any feedback about this change.

Build is here: https://sourceforge.net/projects/xi...220426-UNOFFICIAL-gapps-anx-odin.zip/download
You're awesome ! Will wait for a build without gapps in order to test, and yes, I think making ANX the default camera seems like a good idea.
 
  • Like
Reactions: Chris_of_Topher

Lancelort2513

New member
Feb 14, 2022
3
1
New test build is up. It has a new version of minimal gapps installed and it also passes safetynet from clean flash without the need of root or any additional patches or modules. OK Google detection is now working with the screen switched off. Biggest change is a much improved ANX camera experience. There are no more crashes when using certain camera modes, the only thing not working is slow motion. I'm considering making ANX the default camera for all future builds (gapps and non gapps) and I would appreciate any feedback about this change.

Build is here: https://sourceforge.net/projects/xi...220426-UNOFFICIAL-gapps-anx-odin.zip/download
sorry for ask the dumb question....
But I just change to Pixel experience yesterday lol.
Will ANX camera module works on pixel experience also? >_<
 
  • Like
Reactions: Chris_of_Topher
Apr 28, 2021
8
2
Two question about the latest build:
  • Do all 3 camera lenses work on ANX?
  • What would be the best way to backup MIUI in case i want to revert back? As far as i know there still is no TWRP for A12
i think i have found a way to backup the MIUI Roms on the Mix 4. You can boot an TWRP (don't flash) and backup there. Normally you can't backup directly via TWRP because you can't decrpyt the data-partition. So you must disable everything that has to do with Lockscreen, Passwort, Pattern or PIN. Then you should able to decrpyt the data-partition and backup everything.

i don't try this way but you should be able to do this. A few days ago there was an TWRP Version for Mix 4 A12 who is now deleted.
 
  • Like
Reactions: Chris_of_Topher

er453r

Member
Jan 1, 2012
49
8
So I have been on lineage-19.1-20220321-UNOFFICIAL-odin.zip than dirty flashed to lineage-19.1-20220419-UNOFFICIAL-gapps-odin.zip and finally dirty flashed to lineage-19.1-20220426-UNOFFICIAL-gapps-anx-odin.zip and everything worked perfectly!

I have been using it for 5 days now and everything is working OK. Highlights:
  • Google Voice Match works and works with the screen off!!! - that's the biggest game changer for me - I am finally able to use the phone while driving again
  • ANX Camera works - and works great. @0201m - all lenses work, and seamless lens changing during video recording also works. Some modules (like Panorama and Document Scanner) are missing, and slo-mo does not work - but aside from that no issues and quality of the photos is much better than anything I could do with GCam ports
  • Password auto-fill in apps started working for me (it wasn't in the previous builds, just forgot to mention it)
  • Other essentials stuff like banking apps, bluetooth, quick charge etc. - working nice as always.
@Inkypen thanks again for all the great work! This phone, with this software - easily beats any other phone out there on market for me. I've got bezel-less, notch-less screen, a really good camera, great battery life (2 days easy), newest, open-source OS - I need nothing more :) Thanks again!
 
  • Like
Reactions: Chris_of_Topher

0201m

Member
Dec 14, 2012
19
7
Bavaria, Germany
So I have been on lineage-19.1-20220321-UNOFFICIAL-odin.zip than dirty flashed to lineage-19.1-20220419-UNOFFICIAL-gapps-odin.zip and finally dirty flashed to lineage-19.1-20220426-UNOFFICIAL-gapps-anx-odin.zip and everything worked perfectly!

I have been using it for 5 days now and everything is working OK. Highlights:
  • Google Voice Match works and works with the screen off!!! - that's the biggest game changer for me - I am finally able to use the phone while driving again
  • ANX Camera works - and works great. @0201m - all lenses work, and seamless lens changing during video recording also works. Some modules (like Panorama and Document Scanner) are missing, and slo-mo does not work - but aside from that no issues and quality of the photos is much better than anything I could do with GCam ports
  • Password auto-fill in apps started working for me (it wasn't in the previous builds, just forgot to mention it)
  • Other essentials stuff like banking apps, bluetooth, quick charge etc. - working nice as always.
@Inkypen thanks again for all the great work! This phone, with this software - easily beats any other phone out there on market for me. I've got bezel-less, notch-less screen, a really good camera, great battery life (2 days easy), newest, open-source OS - I need nothing more :) Thanks again!
Thank you for the detailed writeup! I guess i am going to give it a chance then. Camera is always important for me, so i wanted to make sure before.
 
  • Like
Reactions: Chris_of_Topher

0201m

Member
Dec 14, 2012
19
7
Bavaria, Germany
Just a quick update @Inkypen ROM is very smooth so far. I did notice 2 things beside screen off FOD
  • Proximity doesn't seem to work for me (Received a call today and the screen didnt blank)
  • Somehow my phone won't sign into 5G networks (t-Mobile Germany) - this worked flawlessly on MIUI
    • LTE works perfectly though, i checked in the setting, 5G is set as the prefered network type
And one really minor "aesthetical" quirk. The screen off/on animation when locking via the button doesnt end at the button. It like expands and collapses towards the power button on pixel devices, but ends an the volume rocker at the MIX 4. Don't know if this can be tweaked or not.
 
Last edited:
  • Like
Reactions: Chris_of_Topher

er453r

Member
Jan 1, 2012
49
8
Just a quick update @Inkypen ROM is very smooth so far. I did notice 2 things beside screen off FOD
  • Proximity doesn't seem to work for me (Received a call today and the screen didnt blank)
  • Somehow my phone won't sign into 5G networks (t-Mobile Germany) - this worked flawlessly on MIUI
    • LTE works perfectly though, i checked in the setting, 5G is set as the prefered network type
And one really minor "aesthetical" quirk. The screen off/on animation when locking via the button doesnt end at the button. It like expands and collapses towards the power button on pixel devices, but ends an the volume rocker at the MIX 4. Don't know if this can be tweaked or not.
5G works for me just fine, but different country, different network...
 
  • Like
Reactions: Chris_of_Topher

0201m

Member
Dec 14, 2012
19
7
Bavaria, Germany
5G works for me just fine, but different country, different network...
Thats strange. I think it shouldn't have to do anything with the firmware/rom but i dont know. I had xiaomi.eu before and it worked perfectly. Also checked my apn

EDIT: I popped my Vodafone Sim into the phone and 5G connected. Maybe my provider (congstar) is doing a 5G test in my area, as 5G isn't officially rolled out. Unfortunately i cant test it with an official Telekom card
 
Last edited:
  • Like
Reactions: Chris_of_Topher

alex hamilton

Member
Aug 24, 2021
10
1
Planning to buy this phone

does anyone have any inputs on the quality of under display camera working with lineageOS? like does the screen properly turn off for the selfie camera, does the software properly handle the image coming through the selfie camera, ... etc?

any plans to go official?

great work!
 
  • Like
Reactions: Chris_of_Topher

Oxofrmbl

Senior Member
Just a quick update @Inkypen ROM is very smooth so far. I did notice 2 things beside screen off FOD
  • Proximity doesn't seem to work for me (Received a call today and the screen didnt blank)
  • Somehow my phone won't sign into 5G networks (t-Mobile Germany) - this worked flawlessly on MIUI
    • LTE works perfectly though, i checked in the setting, 5G is set as the prefered network type
I had problem with proximity with another ROM and it was due to wrong firmware.
I had xiaomi.eu beta flashed before.
But after flashing Chinese stable firmware (no wipe or anything needed, just sideloading through adb sideload) it worked flawlessly

Maybe that fixes your network issue as well. I don't have 5g contract so i don't know
 
  • Like
Reactions: Chris_of_Topher

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    @Inkypen have you ever restored a TWRP backup from one device to another (Same model), I lost my Mi Mix 4 last week, already bought a new one, should be here in 10 days, I have a TWRP backup, any idea how should go about in order to restore it onto my new Mi Mix 4 ? Thanks !!!
  • 9
    2okPze5.png

    LineageOS is a free, community built, aftermarket firmware distribution of Android 12 (S), which is designed to increase performance and reliability over stock Android for your device.

    Code:
    #include <std_disclaimer.h>
    
    /*
    * Your warranty is now void.
    *
    * We are 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 us for messing up your device, we will laugh at you.
    *
    */

    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. You will need to provide your own Google Applications package (gapps). LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    Base source code is available in the LineageOS Github repo. And if you would like to contribute to the project, please visit our Gerrit Code Review.

    GPL compliance:
    yG18r6g.png


    Working:
    Almost everything

    Broken:
    Screen off FOD (Fingerprint On Display)

    Downloads:
    https://sourceforge.net/projects/xiaomi-odin/files/12/LineageOS
    https://sourceforge.net/projects/xiaomi-odin/files/11/LineageOS

    Installation:
    Reboot to recovery
    Copy LineageOS zip to internal storage
    Install LineageOS zip package
    Install [optional] a Google Apps package of your choice
    Format data (wiping is not sufficient, formatting requires you to type "yes")
    Reboot

    Important notes:
    GApps can only be flashed on clean installs.
    Formatting data (all user data is wiped, including internal storage) is a must if MIUI was previously installed and device was encrypted.

    Contributors
    Inkypen
    ROM OS Version: Android 12
    ROM Kernel: Linux 5.4
    Based On: AOSP
    6
    New builds are up:
    • June security patch
    • Kernel upstreamed to 5.4.197 and latest lahaina CAF tag
    • LHDC Bluetooth codec added (untested as I don't have a BT device that supports this)
    • Some ANX tweaks (should start a little bit faster)
    Regarding the conversation about the visible camera hole at maximum brightness, that's a hardware limitation. You must have seen Xiaomi's promotional image of the pixel array above the front facing camera showing the smaller pixels allowing light to pass through to the image sensor. A smaller pixel will not be able to shine as brightly as a larger one hence the slightly darker view on max brightness. MIUI gets around this flaw by displaying a sun symbol over the camera hole at max brightness. On a couple of builds I tried limiting the max brightness by about 15% so this wasn't noticeable but I had a few people in sunny areas complain about the change, so I reverted back. If it bothers you just turn the brightness down a little bit.

    Are there any plans to fix the widevine level from l3 to l1? I know that the China/eu Rom habe l1,so it should not be impossible to fix
    I've had L1 support since before I even released any builds. Download any media codec info app from play store and check for yourself.
    5
    New test build is up. It has a new version of minimal gapps installed and it also passes safetynet from clean flash without the need of root or any additional patches or modules. OK Google detection is now working with the screen switched off. Biggest change is a much improved ANX camera experience. There are no more crashes when using certain camera modes, the only thing not working is slow motion. I'm considering making ANX the default camera for all future builds (gapps and non gapps) and I would appreciate any feedback about this change.

    Build is here: https://sourceforge.net/projects/xi...220426-UNOFFICIAL-gapps-anx-odin.zip/download
    4
    @Inkypen
    So I have been daily-driving lineage-19.1-20220321-UNOFFICIAL-odin.zip for over a week now and here are some things I have noticed:

    • Google Assistant Voice Match is not available (so no "OK Google") - this worked with Lineage 18.1
    • "OK Google" also does not work with locked/off screen (actually that also did not work 18.1... - that is something I miss from my Pixel 2)
    • I have used NikGApps and the security code loop during setup is still present
    • the same - using NikGApps with PixelLauncher loops the PixelLauncher (not a rom isssue, just giving a heads-up) - I have ended up using core apps flavor
    • camera Apps I have found working are some GCam builds, but they all have issues (not all cameras supported, no slow-mo videos, images are not properly scaled for diffirent lenses...) - we really need ANX - even if it means sacrificing some APIs and other cam apps...
    • I can confirm that safety net passes, the banking apps and NFC payments work OK
    • quick wireless charge works OK
    • 120Hz display works OK though I am not sure it is forced all the time
    • bluetooth works with all devices I could throw at it :)

    Other than that everything is nice and smooth :) Using it daily is pure pleasure. Kudos to @Inkypen
    Your first four points are not the fault of the ROM and are all related to the same thing: gapps

    OK Google detection needs Velvet which is only in Nikgapps stock edition and above, which you can't install because as you mentioned Pixel Launcher will crash. I've determined that the security code loop is due to using A12 version of setup wizard.

    Which leads me to the good news, I've found a 12.1 version of gapps that has fixed the setup wizard bug. It's meant to be part of a ROM build and is not suitable for flashing separately, so I'll start releasing gapps builds soon.

    As for ANX, you're in luck. I figured out what to change in the Lineage source code to get the Xiaomi camera stack working and I've successfully made a test build with it integrated. I just need to write selinux policy for it :)

    Screenshot_20220404-001531_Settings.png
    3
    I've been testing out LineageOS 19.0 based on Android 12. If anyone wants to try it out, it's available here:

    READ BEFORE INSTALLING
    **** EDIT ****
    I've uploaded a new build based on 12L and with fixed NFC. Still has same filename so download link is the same.