yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi MIX 4] Inkypen:
Nope, still going. QPR2 took a while for the LOS devs to merge because it broke so many features. Once merged it took me a while to get QPR2 working on our device, by the time I got it stable then QPR3 got released. Thankfully QPR3 didn't take me too long to get working.

New builds are uploaded with plenty of fixes and improvements:

July security patch based on Android 14 QPR3

Vendor blobs and Firmware updated to HyperOS 1.0.3

Kernel updated to latest Qualcomm tag and Linux 5.4.279

Play integrity patches built in and signed with my dev keys so gapps version passes Safetynet/Play integrity just fine

UWB (ultra wideband) service now working correctly (Unable to fully test as I don't have any UWB devices)

Vo5G options enabled

VoWiFi now working

Some other minor fixes and improvements

Unfortunately it's becoming more and more convoluted to port the patches for ANX Camera back to Lineage. Each QPR update breaks something in the camera stack and I'm getting tired of fixing one thing just for something else to break, so from now on ANX won't be included in Lineage and will only be included in ROMs that natively support it (crDroid and Evo X are examples)

vanilla build:

https://sourceforge.net/projects/xiaomi-odin/files/14/LineageOS/lineage-21.0-20240713-UNOFFICIAL-odin.zip/download

gapps build:

https://sourceforge.net/projects/xiaomi-odin/files/14/LineageOS/lineage-21.0-20240713-UNOFFICIAL-gapps-odin.zip/download

KernelSU if root is needed:

https://sourceforge.net/projects/xiaomi-odin/files/Odin-5.4.279-KernelSU-v0.9.5.zip/download
[Xiaomi Mi MIX 4] xtacb4:
tyvm, I feel the love. respect.
[Xiaomi Mi MIX 4] HelloAndroid_:
Well, this is amazing, thank for you your work! May I ask if the crDroid is still maintained?
[Xiaomi Mi MIX 4] Inkypen:
Some of you have noticed I've uploaded a new Lineage build. It has built in gapps and is selinux enforcing. Raise to wake is now working, I've added hotword blobs for OK Google detection and aptX codec for Bluetooth HD audio (untested by me, I don't have HD earphones lol)
[Xiaomi Mi MIX 4] MeTooCut:
Yoo, thanks for ur work on this. Can you upload the updated build without gapps tho?
[Xiaomi Mi MIX 4] santimaster2000:
This, please !
[Xiaomi Mi MIX 4] Inkypen:
Plain build with no gapps uploaded. Just for your information, the package I used for the gapps build is a very minimal version that doesn't replace any system apps. It just installs play store and nothing else.

Safetynet is not passing despite me having it working on an earlier build. Should be fixed with next release.
[Xiaomi Mi MIX 4] Inkypen:
Good news, I discovered the reason behind SIM not working for me on slot A and not at all for some people. If MIUI 13 has been installed on the phone then it turns out the A12 modem firmware is not compatible with the A11 custom ROMs.

Easy enough to fix, if you have loss of sensors or no SIM card simply flash the firmware from MIUI 12 to get it working again. The latest A11 based firmware is here:

Xiaomi Firmware Updater

The ultimate script that provides firmware packages for Xiaomi devices.

xiaomifirmwareupdater.com

After flashing this, I now have SIM and sensors working again on slot A. Download and flash in recovery. Only needs to be done once (or twice if both boot slots don't work lol) and then you can forget about it, unless you return to MIUI 13 and then want to go back to custom ROM.
[Xiaomi Mi MIX 4] santimaster2000:
Thanks gor the "no gapps" version and thanks for explaining what's included with the one version that does include them.
[Xiaomi Mi MIX 4] xlagjn:
Amazing rom ,very stable and smooth. One problem, 120w fast charge seems not work on the new build
[Xiaomi Mi MIX 4] er453r:
That's great news, since I was the one without working SIM :) And I was flashing from MIUI 13 - so it all makes sense now.

Btw. can anyone recommend any good camera app for this ROM? I know about https://camera.aeonax.com/ but installing it is a PITA :/
[Xiaomi Mi MIX 4] MeTooCut:
Gcam is working great and it runs stable. This one - https://www.celsoazevedo.com/files/android/google-camera/dev-arnova8G2-beta/f/dl1/ and if you don't use Gapps, like me, then install the Gcam services provider app - https://github.com/lukaspieper/Gcam-Services-Provider
[Xiaomi Mi MIX 4] xlagjn:
I found that wireless power share not work on enforcing. When setenforce 0 ,it works.
[Xiaomi Mi MIX 4] Inkypen:
Fast charge has already been fixed, please send a logcat showing the denial so I can fix this one as well.
[Xiaomi Mi MIX 4] xlagjn:
I'm on your pe build. The fast charge is ok. sorry ,seems that I can't add attach
[Xiaomi Mi MIX 4] ACYLK:
how to use google pay after flashing the rom?
[Xiaomi Mi MIX 4] er453r:
Wow @Inkypen! Flashed the new version, compatible firmware and EVERYTHING works. You are the best! SELinux seems fine since my bank NFC payments work, FOD is a non-issue since tap-to-wake works. Even more, some apps that did not work on XiaomiEU work here - mind blown 🤯

Definitely daily driving it till the end-of-life of my phone :) I came to MIX4 from Pixel2 and hated everything about MIUI from day 1. Now I have Lineage which is even better than Pixel-android flavor.

One issue for me is finding a good camera app, but that is not ROM related :)

Thank you again! ❤️
[Xiaomi Mi MIX 4] DPMDP:
what about 120w charge with this rom?
[Xiaomi Mi MIX 4] er453r:
Honestly, this ROM does not show you if quick charge is activated (like MIUI does) but judging from charging speeds (from 90% to 100% in less than 2 minutes) - it works :)
[Xiaomi Mi MIX 4] :
I have a few questions!

- Is it possible to have Lineage installed without rooting? (So bank/payment apps still works).

- Does google backup work? (I cannot make it work with MIUI).

I bought recently this phone, and MIUI grinds my gears for real. I want to try this or I will just get rid of the phone.
[Xiaomi Mi MIX 4] viktorino:
Hello! I see now that on sourceforge there is pixelExperience rom, is this entirely new rom, or it's some kind of update to this LineageOS? Thanks
[Xiaomi Mi MIX 4] Inkypen:
Rooting is independent of whatever ROM you have installed. If you don't want root then don't install Magisk. Not sure what exactly you refer to when talking about google backup but if you install the gapps version then the setup wizard does ask if you want to restore apps and settings from your google account.

I'm the second child in my family. I have a completely different name to my brother. Am I an entirely new person, or am I some kind of update to my brother? :ROFLMAO:
[Xiaomi Mi MIX 4] Inkypen:
I've been testing out LineageOS 19.0 based on Android 12. If anyone wants to try it out, it's available here:

https://sourceforge.net/projects/xiaomi-odin/files/12/LineageOS/lineage-19.0-20220311-UNOFFICIAL-odin.zip/download

READ BEFORE INSTALLING

SE Linux is currently permissive

NFC not working

TWRP cannot decrypt A12 partitions meaning you can't access your files in recovery mode. This is a TWRP problem, not a ROM bug. If you need to install something, either sideload it or use USB OTG.

Requires MIUI 13/Android 12 firmware. You can get that here: https://xiaomifirmwareupdater.com/firmware/odin/stable/V13.0.4.0.SKMCNXM/

To go back to Lineage 18 you need the A11 firmware, available here: https://xiaomifirmwareupdater.com/firmware/odin/stable/V12.5.12.0.RKMCNXM/

**** EDIT ****

I've uploaded a new build based on 12L and with fixed NFC. Still has same filename so download link is the same.
[Xiaomi Mi MIX 4] nullexistence:
it works perfect for me but i can't install gapps,i got "installation failed looks like storage space is full" when i trying to sideload
[Xiaomi Mi MIX 4] paatha13:
Which gapps build did you used or with any kind tried with same result?
[Xiaomi Mi MIX 4] nullexistence:
all the same
[Xiaomi Mi MIX 4] paatha13:
Getting same error either using otg and twrp or adb sideload using same gapps build too.

BiTGApps-arm64-12.0.0-R45_signed

MindTheGapps-12.0.0-arm64-20220128_095253

NikGapps-core-arm64-12-20220222-signed
[Xiaomi Mi MIX 4] Inkypen:
I didn't realise that A/B super partition sizes need to be adjusted because A12 gapps are larger than the A11 ones. I actually made a build with integrated gapps but I didn't release it because of a bug in the setup wizard. It can still be installed but DO NOT setup a pin/fingerprint during setup wizard otherwise you will get stuck in a loop. Complete setup wizard first and add password/fingerprint afterwards.

lineage-19.0-20220312-gapps-UNOFFICIAL-odin.zip

drive.google.com
[Xiaomi Mi MIX 4] viktorino:
Hello, anyone else can't hear any connected bluetooth device? Tried two sets of buds, no media sound. Did some digging in bluetooth, earbuds settings, can't find any solution.
[Xiaomi Mi MIX 4] paatha13:
None issues here with Bluetooth worked both my Sony and Oppo headset as well my Sony speakers.
[Xiaomi Mi MIX 4] er453r:
@Inkypen great work! just waiting for selinux to make it my daily :)
[Xiaomi Mi MIX 4] Inkypen:
Lineage 19.1 is now up. Audio policy has been reworked so should fix any audio issues (for example using a USB to 3.5mm headphone adapter now works). Partition sizes have been fixed so you can now flash a gapps package (tested with Nikgapps stock edition). SELinux is still permissive for now, still working on finishing policy.

https://sourceforge.net/projects/xiaomi-odin/files/12/LineageOS/lineage-19.1-20220319-UNOFFICIAL-odin.zip/download
[Xiaomi Mi MIX 4] :
Does anybody know how to add shared libraries (*.so) into `system/lib64` after installing Lineage?

I extracted some libraries from an MIUI dump and they are needed for the MIUI Camera to launch, but whenever I copy the libraries using TWRP file explorer they get deleted on reboot, probably no permission to modify the partition. I want to avoid rooting the phone.
[Xiaomi Mi MIX 4] Inkypen:
What you are tyring to do is perfectly feasible but you need to be comfortable with working on the command line, a file explorer is not going to work unless you are rooted (which you don't want to do). In TWRP you need to remount /vendor and /system_root to be read/write and then use adb to push the files to their relevant directory.

Also, are you talking about ANX camera (AOSP port of MIUI camera) or MIUI camera ripped directly from a ROM dump? And what version of Lineage are you talking about? For 18 the camera stack is source built so it needs to be replaced with the stack from MIUI and it lives in the vendor partition not system partition. I did make a mod for 18 to get ANX camera to work but I didn't release it because I moved development over to 19, and for 19 I just kept the prebuilt camera stack in place so ANX camera should work out of the box.

Next bit of bad news is that ANX camera officially can only be installed via Magisk and not via recovery, and it only works properly on my builds if SE Linux is set to permissive, which is not easily done if you don't have root (which is required to install it in the first place)
[Xiaomi Mi MIX 4] Inkypen:
As you wish :)

SE Linux enforcing build is now available. If something is not working please either provide logs (preferred) or exact steps to reproduce the problem.

https://sourceforge.net/projects/xiaomi-odin/files/12/LineageOS/lineage-19.1-20220321-UNOFFICIAL-odin.zip/download
[Xiaomi Mi MIX 4] er453r:
I have tried all existing ANX versions and could not get any working with 19 :/ or MIX4 for that matter....

I want 2 things from my daily:

1. To have working a banking app with NFC payments

2. To have a good camera app

Unfortunately this 2 goals do not agree with each other :/

Magisk has ways to hide root and selinux from banking apps but it is a pain to setup. Also ANX seems to have stopped main branch development like a year ago.

The only way for us to have an up-to-date and compatible camera app is to somehow rip the stock app and make it usable in the ROM (which I have tried but it look like multiple system level libraries are required :/ )
[Xiaomi Mi MIX 4] :
Thank you for your answer.

So, after mounting both /vendor and /system_root I've tried to adb push a lib but it still gets deleted on reboot. These are the commands I'm using:

adb push lib64/libcamera_algoup_jni.xiaomi.so /system/lib64
adb shell chmod -R 644 /system/lib64/libcamera_algoup_jni.xiaomi.so

After that, I checked with ls -la that the file is indeed in /system/lib64 with the correct permissions. Still, on reboot, it's completely gone.

Do you know what I'm doing wrong? Or probably I need root permissions?
[Xiaomi Mi MIX 4] jmikepr:
I’ve got a few questions. Read the entire thread

Is there support for anti-flicker mode?

In the past other LineageOS builds like for the OnePlus 9 include it under live display if the kernel supports it.

Is there a painless way for me to install MicroG as a system app? As opposed to Gapps? I mainly just like MicroG for the push notifications and that’s it.

I was reading about ANX support and I’ve got that down. What camera comes by default? Stock the default Lineage cam?

For those of you running this build, how is the camera quality and what camera apk are you using?

Depending on these answers I’m going to go ahead and order the phone.

It’s a dream of mine to have a degoogled device, anti flicker/ No PWM, good camera.

I’ll be sure to be highly active in this thread if I pull the trigger
[Xiaomi Mi MIX 4] Inkypen:
Once the partitions are mounted in TWRP you need to make them writeable to make your changes permanent.

adb shell mount -o remount,rw /system_root
adb shell mount -o remount,rw /vendor

That being said, one of the ANX developers sent me a special build of ANX cam for odin, and I spent the weekend trying to make a build with ANX camera built in. I've personally tested this special build on Lineage 18.1 and around 95% of the features work correctly. I've been told that this build works on 12 (untested by me) but that it does not work on 12.1 at all. The reasons became clear when I tried it anyway: A12.1 bumps the SDK from 31 to 32 and part of that is a change to the camera API which totally breaks Xiaomi's camera stack. I modified the ROM source code to revert the camera API changes but that then breaks all camera apps using camera API v2 (v1 is unaffected but no support for high resolutions on v1)

TLDR: Xiaomi's camera stack is not fully compatible with A12.1 due to internal changes, and we need a MIUI build based on 12.1 in order to get it working.
[Xiaomi Mi MIX 4] Inkypen:
Currently no support for anti flicker/dc dimming but it's easy enough to add it in.

MicroG can be installed in the exact same way as Gapps, search for Nanodroid.

MY LOS builds just have stock AOSP camera which is really basic (using a gcam port would be a superior choice), see my previous post about ANX cam support. To be brutally honest the selfie cam has terrible picture quality in AOSP without XIaomi's fancy post processing and the rear cameras give decent pictures but no support for anything past 28MP resolution.
[Xiaomi Mi MIX 4] jmikepr:
Thanks for the reply!

The anti-flicker support is super crucial for me. It baffles me why more manufacturers don't include it like Xiaomi. I'm glad it sounds like an easy fix.

Also glad MicroG sounds easy as well.

I truly don't care about selfies haha. I really just need my rear camera to capture sharp crisp photos of my highly mobile toddlers at home and have some decent looking 4k video. I had decent luck with the GrapeheneOS camera that has been made available publicly on the play store. Maybe someone could demo the phone with that as I would bet it captures decent pictures.

Really appreciate you responding!
[Xiaomi Mi MIX 4] santimaster2000:
Hi, I'm trying to flash this specific build using your TWRP version and ADB Sideload, it's giving me an error at 47 % "Error opening: '/data/cache/? (No such file or directory)", any idea what might be the issue ?
[Xiaomi Mi MIX 4] SanHelios:
@Inkypen I might have to build a shrine for you... it finally got it flashed and it works great so far...

i flashed NikGaps via sideload using the recovery that came with LOS. It works, but Pixellauncher keeps crashing, so i used NikGapps Basic.

Anyone can give me any advice how to install Magisk? Sadly it doesn't work with sideload, nor TWRP neither Stockrecovery.
[Xiaomi Mi MIX 4] SanHelios:
Did it get installed anyway? TWRP gave me any kinds of errors, but i ignored them and kept flashing.
[Xiaomi Mi MIX 4] santimaster2000:
I mean, it seemes to be working, couldn't flash gapps right away, had to first boot into LOS, then turn off the phone, boot TWRP from fastboot, and then adb side load gapps.

Kinda worried, but if you said that it's fine then maybe it's OK.
[Xiaomi Mi MIX 4] jmikepr:
Pretty common to get errors when flashing Lineage from recovery
[Xiaomi Mi MIX 4] SanHelios:
But here's on thing i don't get... i flashed magisk, hid it and used the denial-list to hide the root from the system-apps. But the safety-net verification still failed... anybody knows a solution to failed safetynet-verification?
[Xiaomi Mi MIX 4] santimaster2000:
When you say you "flashed" Magisk, you mean using Magisk Manager, right ?
[Xiaomi Mi MIX 4] SanHelios:
Ehh... No. I used twrp to flash magisk. Here's what i did

1) changed magisk .apk-extension to .zip to make it flashable

2) flashed Firmware A12

3) rebooting TWRP via Bootloader and TWRP-Image "fastboot boot twrp.img"

3) flashed LOS via sideload

4) Step 3

5) flashed NikGAPPS via sideload

6) Step 3

7) flashed magisk.zip via sideload

8) wiped Data

9) System Reboot

Looks complicated and nerve-wrecking but that how it worked. 💪👍
[Xiaomi Mi MIX 4] santimaster2000:
I mean, why not use Magisk Manager ?
[Xiaomi Mi MIX 4] SanHelios:
Well, i tried once, but the direct-flashing option was not available. Bootimage patching only.
[Xiaomi Mi MIX 4] er453r:
@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
[Xiaomi Mi MIX 4] 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 :)
[Xiaomi Mi MIX 4] santimaster2000:
Nice !!!

For gapps, I'm running a beta/alpha/test build from open gapps:

https://xdaforums.com/t/gapps-daily-open-gapps-for-android-all-android-versions-devices.3098071/
[Xiaomi Mi MIX 4] er453r:
Is it Christmas already? :P
[Xiaomi Mi MIX 4] SanHelios:
I can too can confirm all of it, even the crashing pixellauncher... But for me still minor issues, as long as i don't have to use MIUI anymore.

But i have to ask, how did you manage for safety-net so pass? I installed the fix, hid the app from the system and used the deny-list for all Google Apps. Maybe there's something, i haven't tried yes....
[Xiaomi Mi MIX 4] er453r:
@SanHelios I am not rooting/using magisk - just using the ROM as-is and safety net passes just fine.
[Xiaomi Mi MIX 4] Lancelort2513:
Very thank you for your great works!
[Xiaomi Mi MIX 4] santimaster2000:
Quick question, any chance to add the option to hide "lockdown" from the power menu ? Thanks !
[Xiaomi Mi MIX 4] Inkypen:
New build is available with April security patch. There have been some fixes for Always On Display (AOD) mode:

Deep sleep now works when using AOD which will improve battery life. A side effect is that FOD no longer works when using AOD but double tap to wake and raise to wake still work just fine.

AOD mode now supports auto brightness (dim in the dark and bright in the light)

You can get it here: https://sourceforge.net/projects/xi...ge-19.1-20220408-UNOFFICIAL-odin.zip/download

I also have an experimental build available, this has built in gapps and anxcamera (and is selinux enforcing). There are some things to note however:

You must manually select default apps such as Phone app and Digital assistant app. Go to Settings -> Apps -> Default apps and make sure all default apps are set. Setting Google app as the default Digital assistant is important if you want OK Google detection to work :)

ANX Cam has a few bugs:

Slow mo mode will cause the app to freeze up.

Using portrait mode or photo mode in Full or 9:16 ratios will cause the app to force close after it saves the picture to gallery. All other ratios and modes including 108MP work fine.

You can get the experimental build here: https://drive.google.com/file/d/1KaydO21iv89azyCfAI4akL0Ln1TiP4W_/view?usp=sharing
[Xiaomi Mi MIX 4] 98y98:
LineageOS is great....., but I prefer PixelExperience....

I'm using your PixelExperience_odin-12.0-20220319-2125 recently, this rom is awesome！but I have a problem with face scan , Sometimes the screen of the front camera does not turn off properly, causing the camera to become unusable, I had the same situation when other apps uses face verification. At this point if I rebooted phone, the problem disappeared, however,after a period of time, it arises again....

I'd really appreciate If you have free time to fix this, Best Regards.
[Xiaomi Mi MIX 4] SanHelios:
Can't wait to try it .. dirty flash okay?
[Xiaomi Mi MIX 4] hoopsnake:
Wait what??? There's a pixel experience rom for mix 4?
[Xiaomi Mi MIX 4] Inkypen:
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
[Xiaomi Mi MIX 4] 98y98:
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:

xiaomi-odin - Browse /12/PixelExperience at SourceForge.net

sourceforge.net
[Xiaomi Mi MIX 4] hoopsnake:
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?
[Xiaomi Mi MIX 4] Inkypen:
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.