yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi MIX 4] jmikepr:
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.
[Xiaomi Mi MIX 4] hoopsnake:
You're a legend thank you
[Xiaomi Mi MIX 4] Inkypen:
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
[Xiaomi Mi MIX 4] SanHelios:
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.
[Xiaomi Mi MIX 4] santimaster2000:
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.
[Xiaomi Mi MIX 4] 0201m:
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
[Xiaomi Mi MIX 4] Lancelort2513:
sorry for ask the dumb question....

But I just change to Pixel experience yesterday lol.

Will ANX camera module works on pixel experience also? >_<
[Xiaomi Mi MIX 4] Kryptocurrency:
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.
[Xiaomi Mi MIX 4] er453r:
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!
[Xiaomi Mi MIX 4] 0201m:
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.
[Xiaomi Mi MIX 4] SanHelios:
Will never use MIUI on my device ever again... Thx @Inkypen ... :)

I don't know if it was asked before, but would it be possible to create a LOS without Gapps and just the ANX-Camera?
[Xiaomi Mi MIX 4] 0201m:
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.
[Xiaomi Mi MIX 4] er453r:
5G works for me just fine, but different country, different network...
[Xiaomi Mi MIX 4] 0201m:
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
[Xiaomi Mi MIX 4] alex hamilton:
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!
[Xiaomi Mi MIX 4] Oxofrmbl:
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
[Xiaomi Mi MIX 4] EnzoG54:
Hello, just flashed 19.1 LOS, awesome rom, very smooth. However, is there a fix for Netflix to detect L1 Widevine? Or I'm stuck at L3. Thanks..
[Xiaomi Mi MIX 4] Chris_of_Topher:
Hello, I would like to know what the current quality of the selfie/front facing camera is?

And does Gcam now work perfectly (especially in the selfie department) like the ANX camera app?
[Xiaomi Mi MIX 4] Inkypen:
New builds with May security patch are up. ANX camera is now default camera solution. The SE policy rules for ANX have been rewritten and now almost everything is working correctly, including the downloadable features like Panaroma and Document scanner. The only things not working are slow motion video recording and HDR video recording.

Download links:

Vanilla build

Gapps build

@0201m Thank you for the logs concerning proximity sensor, I'll look into it. The sensor was working correctly on 11 and 12 and I haven't done any major changes to my device tree so something must have changed in 12.1 to cause this. Also I fixed the screen animations to line up with physical buttons so thanks for letting me know about that too ;)
[Xiaomi Mi MIX 4] 0201m:
Thank you for the update! If you need additional logs just let me know.

I experienced another side effect of the non working proximity. I have AOD enabled and somehow even without anything playing and the proximity theoretically working the phone wakes up in my pocket and starts random inputs.

So the "check prxoimity in doze" somehow doesnt work. i believe there once was an option to enable it under display settings, but its not there.
[Xiaomi Mi MIX 4] 0201m:
Oh anothter question. How do i update on lineage? Can i boot into twrp and dirty flash even with an encrypted data partition? I guess it should work as data is not concerened in the update process.
[Xiaomi Mi MIX 4] lightskreen:
Thank you so much for making this room, it's very good. My only nitpick is I wish the status bar height was a little more uniform. Is there a way to make it so it looks more like the notification shade clock and icons?
[Xiaomi Mi MIX 4] er453r:
@Inkypen just dirty-flashed the lineage-19.1-20220511-UNOFFICIAL-gapps-odin build and everything that was working still works great :) Two issues already noted in this thread:

ANX downloadable features still do not work for me (I get the "network error" massage)

I have the same proximity issues @0201m reported, and probably had them before all along, just did not notice them (phone can go crazy in the pocket or during a phone call from face touches - I just blamed it on xiaomi hardware :P)
[Xiaomi Mi MIX 4] Inkypen:
Someone else asked me this so I'm just going to copy/paste the reply:
[Xiaomi Mi MIX 4] Inkypen:
Very strange, ANX downloadables are working here. Try this sequence to see if it works:

Enable USB debugging and ADB Root/rooted debugging in developer options

Connect device to a PC and use a terminal window to enter these commands

adb root

adb shell setenforce 0

This temporarily disables selinux. Try to download ANX features. You can just reboot device to re-enable selinux.

Also good news, I've managed to fix the erratic operation of the proximity sensor. Fix will be in next update.
[Xiaomi Mi MIX 4] santimaster2000:
Would you mind sharing the steps you followed in order to dirty flash ?
[Xiaomi Mi MIX 4] santimaster2000:
lnkypen, I just flashed thim, ehm, quick question, is it normal that before this update I truly couldn't see the "camera hole" and now I can ?

Also, I no longer have root, sorry, first time dirty flashing, not really sure what to do.
[Xiaomi Mi MIX 4] er453r:
@santimaster2000 I do it in 4 steps:

Temporarily flash twrp from Inkypen in fastboot with

fastboot boot twrp-odin.img

Push the zip to data with

adb push lineage-19.1-20220511-UNOFFICIAL-gapps-odin.zip /data/

Install with TWRP without wiping anything

Restart to system :)
[Xiaomi Mi MIX 4] er453r:
@Inkypen tried it exactly as you said, but the same - network error
[Xiaomi Mi MIX 4] santimaster2000:
Did it, but wiped dalvik/cache, everything seems to be working, aside from root, also, for some reason "Phone Services" keeps making the location green notification thingy pop up.
[Xiaomi Mi MIX 4] santimaster2000:
OK, got root, problem seemd to be that I was flashed the first patched boot.img that I got from the stock MIUI ROM, I extracted the new boot.img from the latest LOS build, patched and flashed that, now I got root.

I still have the problem with "Phone Services" constantly accessing location, and also the front camera "hole" seems to remain open all the time.
[Xiaomi Mi MIX 4] Inkypen:
Not an selinux issue then. It's working fine here on LOS and on PE. Go to app info (long press anx icon on launcher and select the "i") clear all storage and try again. If it still doesn't work then I'll need a logcat to try and troubleshoot it.

Kinda sounds like the issue I had early in development when various things work on one boot slot but not the other. Reboot to recovery and flash MIUI 13 firmware again.

Also, why does everyone seem to extract and patch the boot image when trying to install Magisk? Why not just sideload it in recovery?

For future builds the relevant latest firmware will be included in the ROM zip, to avoid all these headaches about firmware version.
[Xiaomi Mi MIX 4] santimaster2000:
Are you talking about the camera thing or the location thing ?

So, I just flash this firmware, right ?

https://xdaforums.com/t/firmware-xiaomi-mix-4-odin-auto-updated.4428687/

Thanks again for all your work man !
[Xiaomi Mi MIX 4] Inkypen:
New builds are up. Firmware is now included so no need to flash it separately.

Erratic proximity sensor fixed

Kernel upstreamed to 5.4.195

Firmware/vendor blobs updated to MIUI 13.0.6.0

Some people are having issues updating/sideloading via TWRP, so I made an unofficial build of OrangeFox.

https://sourceforge.net/projects/xiaomi-odin/files/OrangeFox-R11.1-Unofficial-odin.zip/download

To install it simply sideload it in TWRP. Occasionally the device won't get recognised when plugged into a PC and it's simple to fix. Go to the mount page in menu options (3 horizontal lines) and toggle MTP off/on.

Regarding updating the ROM, there seems to be some confusion on how to do it because no recovery is currently able to decrypt A12 data partitions. I mentioned it earlier but there are two ways in which to update.

Sideload

This is the simplest way to update but it seems that TWRP won't sideload some A12 ROMs. If sideload doesn't work then use the OrangeFox linked above.​

Usage:​

Connect device to a PC and activate ADB sideload mode in recovery​

In a terminal type : adb sideload rom.zip​

ADB

The other method you can try is to use ADB to copy a ROM to the phone and install it directly from the device. Internal storage isn't actually mounted because of encryption, so /sdcard becomes attached to a temporary filesystem in memory.​

Usage:​

Connect device to a PC​

In a terminal type: adb push rom.zip /sdcard​

Install zip in directly in recovery from internal storage​

You should replace rom.zip with the filename of the zip you want to flash. Because of the virtual A/B setup on this device it appears that addon.d is no longer functional and this means anything that modifies the system will need to be flashed again once an update is completed, a prime example being Magisk (which you can sideload, no patching boot image is necessary). OrangeFox even prints a helpful message reminding you of this little fact.
[Xiaomi Mi MIX 4] santimaster2000:
Will flash as soon as I can make a proper backup of EVERYTHING !!!

Quick question, if I'm dirty flashing, should I wipe dalvik/cache or not ?
[Xiaomi Mi MIX 4] er453r:
@Inkypen Installed 0519 version, here is the logcat, but it only says networkError on downloads, nothing else :/
[Xiaomi Mi MIX 4] Inkypen:
I looked into this and I found only the gapps version has this bug and the vanilla version works correctly. This makes no sense considering I've built several other ROMs which also include gapps and it works properly on every other build I've made. I've also got some of my own logs but unfortunately they are useless because they give no info whatsoever as to the cause. I will do some tests with different gapps packages to see if I can pinpoint exactly what is going on.
[Xiaomi Mi MIX 4] fares94400:
I spent my whole day trying to figure it all out but I made it ( I am not good with computers)

At first I wanted to install your pixelexperience ROM but it failed (see pic) so I had to flash lineageOS instead.

As you can see it displayed an error at 47% "failed to read command: No error" even though the rom was successfully flashed and is currently working.

I don't care as long as it works but I just wanted to say it anyways.

Also touchscreen doesn't work in Orangefox once I actually flash it, I have to run it through fastboot to make the touchscreen work.
[Xiaomi Mi MIX 4] lightskreen:
I tried this rom and the interface seems to be really framey when opening and closing applications as well as swiping back and forth to the google feed. I've tried forcing 120 hz and other things, is there a setting i don't know about?
[Xiaomi Mi MIX 4] santimaster2000:
Hey ! First of all, thanks for all your work, flashed latest LOS (20220519), that fixed thed location green pop up thing, but the front camera "hole" still becomes visible when it shouldn't, at least know it seems to only happen above 85 % brightness, this wasn't an issue on build 20220321, could you please confirm if you get the same behavior be cranking up the brightness up to 100 % ? Thanks !
[Xiaomi Mi MIX 4] er453r:
@lightskreen have you enabled variable refresh rate in Display settings? I do not know how it knows when to use 60/120 Hz but I have noticed no stutter at all.

@santimaster2000 @Inkypen I can confirm that front facing camera is more visible since 20220519 - as if it was a few levels darker than the rest of the screen.
[Xiaomi Mi MIX 4] santimaster2000:
Thanks, at least I know it wasn't just me.

Also, the problem was present (As far as I've tested) since 20220511, can't tell if it was also present on previous versions between that one, and 20220321 (Wasn't present here), because I've only ran those 3 (20220321, 20220511 and 20220519)
[Xiaomi Mi MIX 4] hanste (SM-G901F):
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
[Xiaomi Mi MIX 4] Inkypen:
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.

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.
[Xiaomi Mi MIX 4] santimaster2000:
Ohhhhhh OK, that makes sense !
[Xiaomi Mi MIX 4] 0201m:
One issue, that forced me to temporarily switch back to MIUI is Android Auto.

For my new car it is not working. It starts connecting, the Android Auto app opens on the phone, but then closes (crashes) again.

I suspect there is something wrong/missing with gapps, but i couldnt get a log.

On MIUI everything works

Update: Switched to PixelExperience, Android Auto is working perfectly there
[Xiaomi Mi MIX 4] Marko1000Marko:
Thanks for this great ROM, just got my mix4 and installed it, works great

I'm wondering if anyone figured out a way to enable immersive mode (hide the status bar)? It looks great on notchless phones like this one, I was running android 10 on my last phone and had it, but apparently google removed immersive mode starting from android 11...

The usual ways to enable global immersive mode through adb or root apps doesn't work, there is some confusion with people claiming it does work on android 12 but that's on samsung and other modified android distros that have apparently kept the immersive mode functionality. Both Android 12 AOSP and MIUI seem to have this functionality removed.....

Is there any way to get immersive mode back on Lineage? I really don't want to go back to having a status bar visible...
[Xiaomi Mi MIX 4] fourrure:
I've already flashed it and rooted, and it looks quite nice! Awesome job! This rom should be official!
[Xiaomi Mi MIX 4] Inkypen:
I've built TWRP 3.6.2 A12 branch and decryption is working. Untested other than making sure it boots and decrypts internal storage correctly. Use fastboot boot to run it and Advanced/Flash current TWRP to actually install it. If you find any bugs feel free to report them but bear in mind the whole TWRP A12 branch is currently WIP.

https://sourceforge.net/projects/xiaomi-odin/files/odin-twrp-3.6.2_12-0.img/download
[Xiaomi Mi MIX 4] SanHelios:
Just flashed it but had an "unpacking error", got installed anyway.

I was able to decrypt my storage and the issue of not being able to copy anything onto the storage is gone. Haven't tried to flash anything yet, but when i need to redo my android, i'll have the opportunity.

But so far, thanks a thousand fold for your incredible work and sharing it. :) :) :)
[Xiaomi Mi MIX 4] hoopsnake:
There's a magisk module for that. Idk if it works on android 12, imo prefer status bar always there so never used it.
[Xiaomi Mi MIX 4] santimaster2000:
You're the boss !!!
[Xiaomi Mi MIX 4] Kryptocurrency:
can i ask a question to the twrp a12 version? I have a Mix 4 with weekly .eu rom booted into your TWRP and flashed it over TWRP. After that the recovery said the root done before is gone root it again. When i do this only the stock recovery booted up.

How can i root and use the TWRP? or is this because WIP?.
[Xiaomi Mi MIX 4] Inkypen:
MIUI will try to reinstall stock recovery if it detects a custom recovery is being used. Usually when you first boot TWRP it asks if you want to allow modifications to system partition or keep it read only, this is to allow TWRP to disable stock recovery installation. The TWRP build I posted here has non working touchscreen when installed on xiaomi.eu so I made an updated build which has been confirmed as working correctly by testers, but I can't help you with any MIUI/xiaomi.eu issues because I hate MIUI with a passion and I refuse to keep it on any of my devices any longer than is necessary.

https://sourceforge.net/projects/xiaomi-odin/files/odin-twrp-3.6.2_12-1.img/download
[Xiaomi Mi MIX 4] Inkypen:
New builds are up.

Gapps build

Vanilla build

Changelog:

Kernel version 5.4.203

July security patch

Fixed Wifi Display

Fixed physical screen size properties (this caused tiiny images in apps like reddit)

Fixed Netflix not detecting widevine L1 correctly

Added high touch poll rate for you gamers out there ;)

Enabled multi threaded render engine (improves UI smoothness)

Enabled some power saving tweaks for Wifi/Bluetooth

Some other minor tweaks and improvements

Also got an updated TWRP A12 build for you here: Download

Touchscreen now works properly on MIUI based ROMs

TWRP settings are now saved properly and are persistent across reboots

TWRP settings are now saved in /data/recovery rather than /sdcard/.twrps (some apps look for the .twrps folder and then declare your device is rooted even if it isn't)
[Xiaomi Mi MIX 4] er453r:
@Inkypen

Thanks! The new recovery finally works flawlessly for me and I am finally able to flash a new build straight from the phone :)

As for the build - everything that was working still works and ANX additional features download and work :) except for slomo (a known bug)
[Xiaomi Mi MIX 4] santimaster2000:
Nevermind, I'm an idiot.
[Xiaomi Mi MIX 4] santimaster2000:
Nevermind, I'm an idiot 2.
[Xiaomi Mi MIX 4] santimaster2000:
OK, now that I have unfucked myself, am I that stupid or is there no way to have both TWRP flashed as recovery and root with boot.img patched with Magisk ? Because I'm having this exact same issue:
[Xiaomi Mi MIX 4] Inkypen:
I've have zero issues regarding this. I have Magisk and TWRP happily co-existing with one another. I have said it before, extracting the boot image and manually patching it is not necessary. You can install Magisk directly in recovery, just install it the same way you would install a ROM.

Recovery lives in the boot partition ramdisk, if you extract the boot image from a ROM, patch it with Magisk and then flash the patched boot, then surprise surprise you're going to have the stock recovery from that ROM 🤣
[Xiaomi Mi MIX 4] santimaster2000:
Ohhhh, I get it ! Sorry, my previous phone was a Razer Phone 2, and the root process was totally different, I was doing the boot image patching because that was what I found as the "advised method" for the Mi Mix 4.

So, if I get this right:

Installation

The Magic Mask for Android

topjohnwu.github.io

I just rename the magisk apk to .zip, and flash it as is, I don't target the boot partition or anything, I just flash it, right ? Problem with that is: