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

Search This thread

er453r

Member
Jan 1, 2012
49
8
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.
@Inkypen Installed 0519 version, here is the logcat, but it only says networkError on downloads, nothing else :/
 

Attachments

  • anxlogcat.log
    8.2 KB · Views: 8

Inkypen

Senior Member
Aug 19, 2018
466
1,407
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
@Inkypen Installed 0519 version, here is the logcat, but it only says networkError on downloads, nothing else :/
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.
 

fares94400

Member
Apr 8, 2015
15
9
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.
Screenshot_9.png
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.
 

lightskreen

Member
Oct 3, 2014
7
0
Milwaukee
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?
 

santimaster2000

Senior Member
Dec 25, 2009
406
100
Buenos Aires
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.
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 !
 

er453r

Member
Jan 1, 2012
49
8
@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.
 
  • Like
Reactions: santimaster2000

santimaster2000

Senior Member
Dec 25, 2009
406
100
Buenos Aires
@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.
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)
 

Inkypen

Senior Member
Aug 19, 2018
466
1,407
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
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.
 

santimaster2000

Senior Member
Dec 25, 2009
406
100
Buenos Aires
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.
Ohhhhhh OK, that makes sense !
 

0201m

Member
Dec 14, 2012
19
7
Bavaria, Germany
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
 
Last edited:
  • Like
Reactions: Chris_of_Topher
Jun 24, 2017
31
14
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.
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...
 

Inkypen

Senior Member
Aug 19, 2018
466
1,407
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
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.
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. :) :) :)
 

hoopsnake

Senior Member
Dec 4, 2019
143
62
ASUS ROG Phone 3
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...
There's a magisk module for that. Idk if it works on android 12, imo prefer status bar always there so never used it.
 

santimaster2000

Senior Member
Dec 25, 2009
406
100
Buenos Aires
Apr 28, 2021
6
2
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?.
 

Inkypen

Senior Member
Aug 19, 2018
466
1,407
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
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?.
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.

 
  • Like
Reactions: SanHelios

Inkypen

Senior Member
Aug 19, 2018
466
1,407
London
Samsung Galaxy Note 4
Xiaomi Mi 5s
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)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    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:

    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 🤣
    1
    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:


    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:

    Honestly, the whole virtual a/b partition setup is a pain. No dedicated recovery partition, userspace fastbootd, super partitions, etc. All good for OEMS but a nightmare for custom stuff, even something as simple as installing a recovery is a pain (as everyone with touchscreen issues found out lol). As for Magisk, just flash it in recovery. Newer TWRP versions actually recognise the Magisk APK so you don't even need to change file extension. I know John has said this method is deprecated, but it still works just fine on the Mix 4.
    1
    Honestly, the whole virtual a/b partition setup is a pain. No dedicated recovery partition, userspace fastbootd, super partitions, etc. All good for OEMS but a nightmare for custom stuff, even something as simple as installing a recovery is a pain (as everyone with touchscreen issues found out lol). As for Magisk, just flash it in recovery. Newer TWRP versions actually recognise the Magisk APK so you don't even need to change file extension. I know John has said this method is deprecated, but it still works just fine on the Mix 4.
    Yeah, I agree 100 %, this entire new system sucks balls.

    Still, thanks for all your help, you were right, I now have both Magisk and TWRP running side by side, and yes, TWRP actually recognised the Magisk apk.
    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.