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

[M.O.D. KERNEL Q 1.5] MIUI 11 Mi9/ 9T Pro 835mhz GPU DynFsync LZ4 WLblock *FOD Fix*

Search This thread
Thanks. I feel I understand things well enough to give it another go now

---------- Post added at 04:17 AM ---------- Previous post was at 03:34 AM ----------



Hi Ok????

Is there a reason I cannot see my Xiaomi Mi9 device in winrar or 7zip when I go to extract? When I extract it manually an copy it to internal storage/TWRP/backups/(device id) and go to restore it isnt there an cannot be restored?

Is it a mounting issue or the version of Miui I'm on? (EU 9.7.22).

Would I be better to extract it to a backup path to my Type-C usb?

---------- Post added at 04:50 AM ---------- Previous post was at 04:17 AM ----------

How Exciting woohoo. The automatic method worked when I restored from my type-C usb :)Booting now so I can back up an then try to follow your set up guides an let cell cool down after all the boots.

Then benchmarking ;)

Will post pics of the results

Thanks Mslezak.

---------- Post added at 04:58 AM ---------- Previous post was at 04:50 AM ----------

First boot is taking a very long time? Fingers crossed lol

---------- Post added at 05:20 AM ---------- Previous post was at 04:58 AM ----------

No boot. Endless little 'powered by android' loading moving dots. Will try with Xiaomi Eu.9.8.1.

Closest yet to success for me :)

---------- Post added at 05:43 AM ---------- Previous post was at 05:20 AM ----------

Just read the time I posted in your country an realised your asleep. lol. Rest up. Thanks for your help

---------- Post added at 05:51 AM ---------- Previous post was at 05:43 AM ----------

Im such a Bell end pmsl. I checked my TWRP version and realised I had flashed the wrong TWRP lol.

This mod only works with 3.3.1-39 and this whole time Ive been using 3.3.1-37

Duh!!!

Will try again :)


Tried all successful installation then 40 minute loading screen. Why wont this cell boot?
 

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,456
11,022
Milano
Tried all successful installation then 40 minute loading screen. Why wont this cell boot?
Please check in the picture attached of twrp mount page.
Uncheck the bottom flag of system read only and check the upper system and vendor.
Than copy the fstab file into vendor/etc.

Probably is missing the access to overwrite the original fstab. IMG_20190826_080507_213.jpg

Inviato dal mio MI 9 utilizzando Tapatalk
 
Last edited:
  • Like
Reactions: Bryceicle1971
Please check in the picture attached of twrp mount page.
Uncheck the bottom flag of system read only and check the upper system and vendor.
Than copy the fstab file into vendor/etc.

Probably is missing the access to overwrite the original fstab.

Inviato dal mio MI 9 utilizzando Tapatalk
It wasn't checked. I have it installed after 3 days trying. It has major problems with antutu. Might need tweaking. Everything launches in seconds an my GPU has switched from max 810 mhz to 830mhz.

I just can't get antutu to run properly?

---------- Post added at 10:40 AM ---------- Previous post was at 09:50 AM ----------

Hey everyone. I recently got this mod working after 3 days an nearly giving up. Everything is very fast.

Except antutu does not work?

It gets stuck at 17% after running the 3 initial graphics tests.

Has anyone else had issues with antutu after getting this mod to work?

Seems very wierd?

Also I had to overwrite magisk 19.4 with 19.3 as there was freezing after boot an apps would not open?

Hoping to upload pictures soon after tweaking an bugs figured out.

An getting antutu to work? ?
 

mslezak

Senior Member
Dec 12, 2016
393
358
Houston
Google Pixel 2
OnePlus 8T
Yes(for me fstab zip not worked i transported fstab.gcom via root browser)

If the fstab zip is not working, you need to go into TWRP, Mount, and select Vendor. Then flash the zip. Thanks @smeroni68 for finding this on Telegram. It is because the zip file uses BusyBox and not every user has that installed on their system. Selecting Vendor will allow it to patch the vendor/etc/fstab.qcom file.
 

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,456
11,022
Milano
If the fstab zip is not working, you need to go into TWRP, Mount, and select Vendor. Then flash the zip. Thanks @smeroni68 for finding this on Telegram. It is because the zip file uses BusyBox and not every user has that installed on their system. Selecting Vendor will allow it to patch the vendor/etc/fstab.qcom file.
I given to Matt a modified updater-script from Mauro that avoid to use busybox commands... Matt as soon will have time (he is at work now!) will prepare and test the new zips... hopefully they will work independently if vendor is mounted or not... let's see.

Inviato dal mio MI 9 utilizzando Tapatalk
 
  • Like
Reactions: xenix96

Troomak

Member
Oct 3, 2017
11
0
I've tried to get this kernel to work with Havoc OS (just on ext4 so far) in every way I can think of but I can't seem to get it to work.

I've tried restoring boot + dtbo and flashing the f2fs zip. I've flashed the zip with vendor unmounted, mounted and with busybox installed and not installed.

I've also tried going the manual route and using a root browser to transfer the fstab file to /vendor/etc and installing the kernel as .img files on boot and dtbo instead of restoring.

No matter how I do it everything seems to be going smooth and I get no errors or weird behavior of any kind until I try to reboot. It either shows me the loading splash screen for a couple of seconds befpre rebooting into TWRP or it boots straight to bootloader.

In every case I've been able to go into TWRP and restore my own backed up boot img and then I can boot again just fine.

Any hints on what I should try next? I'm not giving up on this :D
 

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,456
11,022
Milano
I given to Matt a modified updater-script from Mauro that avoid to use busybox commands... Matt as soon will have time (he is at work now!) will prepare and test the new zips... hopefully they will work independently if vendor is mounted or not... let's see.

Inviato dal mio MI 9 utilizzando Tapatalk
Tested by Matt... working!
Credits to @mauronofrio for fixing the script!

Inviato dal mio MI 9 utilizzando Tapatalk
 
  • Like
Reactions: xenix96
Well folks....

I have succeeded an followed all directions to the best of my ability.

My cell seems much snappier. For instance. Pokemon go launch's in 7-8 seconds. Used to me 13-16.

Everything launch's in seconds an cell is generally more responsive.

However....

In my case I have no bragging rights lol.

By that I mean that everything works more or less like the developer of this ROM says: except synthetic benchmarks.

Even at 4am when I got up for work an cell in the fridge for a few minutes (anything more an I risk condensation) an with a battery temp of 17°C an CPU temp of 22°C.....well the pictures tell the tale.
 

Attachments

  • Screenshot_2019-08-27-05-17-47-475_com.miui.cit.jpg
    Screenshot_2019-08-27-05-17-47-475_com.miui.cit.jpg
    165 KB · Views: 251
  • Screenshot_2019-08-27-05-16-55-173_com.smartpack.kernelmanager.jpg
    Screenshot_2019-08-27-05-16-55-173_com.smartpack.kernelmanager.jpg
    162.7 KB · Views: 249
  • Screenshot_2019-08-27-05-16-47-896_com.smartpack.kernelmanager.jpg
    Screenshot_2019-08-27-05-16-47-896_com.smartpack.kernelmanager.jpg
    151.7 KB · Views: 251

Mrleonsio

Senior Member
Sep 3, 2015
120
56
Tbilisi
I do everything mentioned in the post exactly step by step and I still get the RESET PHONE button in the middle after I change data and cache to F2FS. What the hell am I doing wrong just tell me...

ROM I flashed : xiaomi.eu_multi_MI9_9.7.22_v10-9.zip
After flashing made a basic set up without downloading any apps , just activated my device using my Xiaomi account password and when I had start screen I did reboot to TWRP.
"Now enter your password and proceed to the next section. If it asks you if you want to keep the system read only SAY NO! You will be modifying system components, keep it writable to avoid installation issues." - My TWRP never asks for password or anything (I am using one provided in files from this post).

Converting EXT4 data and cache partitions to F2FS:

***Note flashing TWRP / Install / fstab_patch_F2FS_MI9.zip MUST be repeated any time you change ROMs or you won't have access to your data!!! So back this up!!!!***

"Boot back into TWRP. You will need to go to Wipe, Advanced Wipe, Click Data, Repair or Change File System, Change File System, and click F2FS. Swipe to change. It will format and you'll have nothing on your data partition. Next format cache. Go to Wipe, Advanced Wipe, Click Cache, Repair or Change File System, Change File System, now click F2FS. Swipe to change. Again it will format and be wiped. " - After I do this and restart my device it boots and on black screen I got RESET PHONE button saying "Encryption was interrupted and can't complete. As a result, the data on your phone is no longer accessible." down left corner with a small font.
This is a first time I spent so much time trying to do something and still did not worked.

FYI : I don't know about you guys but after flashing the MIUI restarting to system just boots back in TWRP without actual booting so I am flashing Force Encryption Disable file grabbed from my old Poco F1 forum and it does boot after.I am about to give up :')
 

mslezak

Senior Member
Dec 12, 2016
393
358
Houston
Google Pixel 2
OnePlus 8T
I do everything mentioned in the post exactly step by step and I still get the RESET PHONE button in the middle after I change data and cache to F2FS. What the hell am I doing wrong just tell me...

ROM I flashed : xiaomi.eu_multi_MI9_9.7.22_v10-9.zip
After flashing made a basic set up without downloading any apps , just activated my device using my Xiaomi account password and when I had start screen I did reboot to TWRP.
"Now enter your password and proceed to the next section. If it asks you if you want to keep the system read only SAY NO! You will be modifying system components, keep it writable to avoid installation issues." - My TWRP never asks for password or anything (I am using one provided in files from this post).

Converting EXT4 data and cache partitions to F2FS:

***Note flashing TWRP / Install / fstab_patch_F2FS_MI9.zip MUST be repeated any time you change ROMs or you won't have access to your data!!! So back this up!!!!***

"Boot back into TWRP. You will need to go to Wipe, Advanced Wipe, Click Data, Repair or Change File System, Change File System, and click F2FS. Swipe to change. It will format and you'll have nothing on your data partition. Next format cache. Go to Wipe, Advanced Wipe, Click Cache, Repair or Change File System, Change File System, now click F2FS. Swipe to change. Again it will format and be wiped. " - After I do this and restart my device it boots and on black screen I got RESET PHONE button saying "Encryption was interrupted and can't complete. As a result, the data on your phone is no longer accessible." down left corner with a small font.
This is a first time I spent so much time trying to do something and still did not worked.

FYI : I don't know about you guys but after flashing the MIUI restarting to system just boots back in TWRP without actual booting so I am flashing Force Encryption Disable file grabbed from my old Poco F1 forum and it does boot after.I am about to give up :')

Please redownload the latest ZIP in the post. And reread it - it has been simplified. Update the fstab using the flashable zip. Your issue sounds like fstab is not properly installed - in TWRP you can Mount / Vendor, go to Advanced / Terminal. cd vendor/etc. cat fstab.qcom. If you don't see lines for F2FS userdata and cache it didn't stick. You can boot into TWRP from fastboot directly off the recovery image Google it. Or try Xiaomi.eu 9.8.1 or another ROM. Get on Telegram if you need more help!
 
Last edited:
  • Like
Reactions: xenix96 and Troomak

Troomak

Member
Oct 3, 2017
11
0
I've tried to get this kernel to work with Havoc OS (just on ext4 so far) in every way I can think of but I can't seem to get it to work.

I've tried restoring boot + dtbo and flashing the f2fs zip. I've flashed the zip with vendor unmounted, mounted and with busybox installed and not installed.

I've also tried going the manual route and using a root browser to transfer the fstab file to /vendor/etc and installing the kernel as .img files on boot and dtbo instead of restoring.

No matter how I do it everything seems to be going smooth and I get no errors or weird behavior of any kind until I try to reboot. It either shows me the loading splash screen for a couple of seconds befpre rebooting into TWRP or it boots straight to bootloader.

In every case I've been able to go into TWRP and restore my own backed up boot img and then I can boot again just fine.

Any hints on what I should try next? I'm not giving up on this :D

Seems like it was just Havoc OS that didn't want to work with the kernel. I swapped to xiaomi eu 9.8.1 and I got the kernel working on first try doing the exact same thing I did on Havoc. Haven't converted to f2fs yet but everything else is working perfectly.

Huge thanks to the developer on this one. This is exactly what I hoped would come out when I bought the phone :good:

Edit: Just converted to F2FS without issues. Didn't have to mount vendor for the patch to work.
 
Last edited:

xenix96

Senior Member
Dec 31, 2011
999
761
[M.O.D. KERNEL] Mi 9 Android 9 Pie GPU830mhz F2FS data/cache Fsync LZ4 ZRAM [STABLE]

Super tweaked kernel for the Mi 9. Best AnTuTu Benchmark 432K thus far, expect 420K-430K in daily............!

Where the hell is your donation link ???

I switched to MI9T Pro but for the huge effort you brought for the MI9 community to bring finally a oc kernel and the great collaboration sharing your experience i want to donate you some € !!!

So put in your thread a donation link please ?????

Cheers
 

mslezak

Senior Member
Dec 12, 2016
393
358
Houston
Google Pixel 2
OnePlus 8T
Where the hell is your donation link ???

I switched to MI9T Pro but for the huge effort you brought for the MI9 community to bring finally a oc kernel and the great collaboration sharing your experience i want to donate you some € !!!

So put in your thread a donation link please

Cheers

Thanks Xenix it should show up in a computer browser on the left of the post, just not on the phone. BTW your kernel is coming bud K20 Pro built off my source already posted, same hardware more bands. And know I know how to make it fly without even a kernel manager!!! The new Magisk Patch (PappaSmurf OP7 Pro dev I thank for the example)
 
  • Like
Reactions: efx7n and xenix96

xenix96

Senior Member
Dec 31, 2011
999
761
Thanks :fingers-crossed:
The Donation is on his way :)


Thanks Xenix it should show up in a computer browser on the left of the post, just not on the phone. BTW your kernel is coming bud K20 Pro built off my source already posted, same hardware more bands. And know I know how to make it fly without even a kernel manager!!! The new Magisk Patch (PappaSmurf OP7 Pro dev I thank for the example)
 

Attachments

  • Bild1.jpg
    Bild1.jpg
    15.7 KB · Views: 242

mslezak

Senior Member
Dec 12, 2016
393
358
Houston
Google Pixel 2
OnePlus 8T
Xenix you are donation #1! Only $39 left until I get back all the money the fake dev took from me to setup my GitHub repo and never finish the VM I made (which was used to make a kernel this last week for your phone basically the K20 Pro, but I made the entire thing) :) Amazing there are like over 100 people and 1 donation... Begging for $ at the street corner is a better path to riches :)
 
  • Like
Reactions: xenix96

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    [M.O.D. KERNEL Q]

    *** NOTE: a dev has posted on TG the FOD fix for beta/ MIUI 12 forked from my code, download there! I asked for GitHub source to comply with XDA and will post once I have it and provide a link to the file link "Mi9/Mi9T Pro Optimization and Overclocking" Telegram has it now: https://t.me/joinchat/NNTe_E9G4ZcZKXCUrajFYQ ***

    MIUI 11 Mi9/ 9T Pro MOD 1.5

    MOD-Q 1.5 is for stable MIUI 11 variants for Mi9 only - Xiaomi.eu 11.0.5 stable is what it was built for, runs best on, just use it. The Mi9T Pro version supports MIUI 11 variants plus many AOSP builds. If you use an official MIUI 11 Xiaomi version you will get a warning message "Contact device manufacturer." You can ignore that, it means nothing. But I highly suggest using Xiaomi.eu 11.0.5, or another MIUI 11 variant like MiRoom or some use Revolution OS.

    ***DO NOT USE ANY PERFORMANCE (CPU/GPU/ETC) MAGISK MODULES WITH THIS FOR BEST PERFORMANCE!!! IT INSTALLS IT'S OWN OPTIMIZED MAGISK MODULE AUTOMATICALLY***

    FP scanner will only work up to 11.0.5. Xiaomi keeps changing the code and not releasing it to made Dev builds not work. There were "patches" that worked until a few weeks back, but Xiaomi has yet again changed their FP scanner code. So I will not update the FP code, do not ask, it is a complete waste of time. Sorry, but Xiaomi.eu 11.0.5 and MOD 1.5 work very very well together.

    Features:
    835mhz GPU, Adreno Boost, Dynamic Fsync, Boeffla WL blocker (better battery idle), F2FS optimizations, LZ4 ZRAM. EXFAT USB/SDCard support added. Sultan Boost + PapaSmurf's Op7Pro tweaks, Dynamic Overclocking + Underclocking with frequency boost for smooth, fast, clean performance and fluid scaling. Many thanks to PapaSmurf who greatly influenced this kernel; portions are ported from his Op7 Pro Repo.

    Mi9T Pro version also reported to work on AOSP ROMs using the original FOD implementation (Derpfest, MSM, CRDroid, Havoc, LOS).

    Just use the Magisk Module it installs for you automatically when you flash the zip from TWRP, likely the best results will be obtained. SmartPack can be installed to choose between profiles under Performance Tweaks - battery / balanced / performance / gaming, although the default installed Magisk module is highly recommended by itself for optimal performance and good battery drain.

    Github source has been added for MOD 1.5 here. Please read the Readme that's why it's there.
    https://github.com/mrslezak/MODQ1.5

    Releases are available here: Download them for your device and follow the instructions there. If you already have TWRP and Magisk, it will be easy. Just read please it will answer your questions.
    https://github.com/mrslezak/MODQ1.5/releases/tag/MOD1.5


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [M.O.D. KERNEL PIE] Mi9 Android9 GPU830mhz F2FS data/cache Dynamic Fsync LZ4 WLblocker V2 [STABLE]

    MOD Pie notes:

    ***New features added! Dynamic Fsync replaces the Fsync toggle (credits to author Paul Reioux aka Faux123 <[email protected]>), and Boeffla Wakelock blocker 1.1.0 (credits to author: andip71 <[email protected]>) has been added. The GPU830mhz runs on a higher regulator now so even 3DMark runs without issue, this is as stable as it gets. A battery saving Magisk Module has been added for longer life and scored 422.5K still on AnTuTu! It will throttle and hotplug (idle) cores as needed to save battery ***

    Super tweaked kernel for the Mi 9. Best AnTuTu Benchmark 432K thus far, expect 420K-430K in daily operation with good battery life. This will vary based on the ROM selected. Stock AnTuTu is 370K. So you can run your phone faster than any production 855+ at the moment. This kernel is setup on purpose to allow anything from stock to maximum performance, you can set parameters as you like in a kernel manager.

    GitHub Source: https://github.com/mrslezak/MODKernel-V2-Cepheus

    Releases are available here:
    https://github.com/mrslezak/MODKernel-V2-Cepheus/releases/tag/V2

    TG Name: MattoftheDead

    M.O.D. Kernel (MattoftheDead). This kernel is STABLE, everything works, it runs on any MIUI based ROM (MIUI Global Dev, MIUI China Dev, MiGlobe, Xiaomi.eu, AOSP, etc.). ***If you install this kernel and don't follow the tweak instructions, it runs exactly like stock. There is now a Magisk module that will run with the optimal settings to make this easy! *** So read up. You can apply any tweaks you'd like. These include:

    GPU 830mhz overclock - stable and smooth. The GPU will throttle down when not being used to a lower mhz. The Magisk Module will enable the max 830mhz clock for you. Or you can go without if you have a dialcode supported GPU MaxFreq OC mode *#*#8106#*#*

    ZRAM LZ4 data encryption enabled - fastest encryption method, smaller ZRAM sizes (512mb is good) work very well [2GB is the stock ZRAM default, LZO is the default kernel compression which is slow]. ZRAM is in-memory swap so it is ultra fast. This allows you to have more free RAM for apps to run.

    F2FS data and cache partition support - full ICE AES 256bit encryption. Note only @mauronofrio TWRP 3.3.1-39 + supports F2FS partition mounting so you MUST use this TWRP recovery!!!

    F2FS has been tested on MIUI Global Dev 9.6.27 and Xiaomi.eu 9.7.22, 9.8.1, MiGlobe, RevOS, AOSP, Havoc thus far (more added daily) and read/write speeds and app access are definitely fast. Support was enabled by working directly with @mauronofrio on XDA (thanks Mauro) so we originated F2FS support for Mi9 - there are also F2FS kernel tweaks that help the speed in the kernel.

    BOEFFLA Wakelock Blocker 1.1.0 - blocks wakelocks and allows you to change what gets blocked that is waking up your phone and preventing deep sleep. There are defaults blocked already in this build that are known to be blockable safely. If you want to add more, use SmartPack Kernel manager under Wakelocks. It will also show you what apps are causing them and the frequency so you can disable the ones that are not needed.

    If you want to join in the discussion and see updates in realtime, World MI9 & Mi9T Pro Optimization and Overclocking is a TG group which has many things related to MOD and any other kernels, mods for the phone, Magisk Modules, all types of things for the devices.

    Step 1: [KERNEL REQUIRED FILES]
    Go to the releases page posted earlier and download everything.

    Step 2: [ROM SELECTION]
    If you already have a Pie MIUI based DEV ROM installed, you can continue to use it. Global Dev 9.6.27 is recommended. But this supports up to Xiaomi.eu 9.8.1. If you want to use a new MIUI based ROM, download it and setup the device (between these ranges of releases - some like MiRoom, some like stock, some like Xiaomi.eu). If you are clean flashing everything, don't bother restoring all the apps - they will be deleted when you switch to F2FS. Just set it up so you can login and get to the default menu with the default apps displayed. Either way, you will have to setup the device as a new phone. So back up all your user data (photos, downloads, etc), apps, etc. using Google Drive, Xiaomi Cloud, Titanium Backup Pro, or any other app that backs up apps and settings. It's often easiest to put them on your PC since you will be plugged into it during this install process with your USB cable.

    Step 3: [MAURO TWRP INSTALLATION FOR F2FS SUPPORT]:
    Boot Mi9 holding Power + Volume Down
    Hook up to your phone to the PC with the charging cable
    Open a command prompt. Go to your Minimal ADB and Fastboot folder.
    Type: fastboot devices
    And hopefully you see your device ID pop up. If not you don't have the right driver, the cable is bad, or something else is wrong. Search Google.

    Next flash Mauro TWRP:
    fastboot flash recovery twrp-3.3.1-41-cepheus-mauronofrio.img (or use his latest from the link at the bottom of this thread)
    Hopefully you see it flash to the device in a few seconds successfully and it's ready to go.

    Booting to TWRP:
    Turn off your phone. Now hold down power + volume up. Once the boot Logo appears, let go of the power button but keep holding volume up. TWRP should boot. If not, try again. I usually have to remove the phone case. Now enter your password and proceed to the next section. If it asks you if you want to keep the system read only SAY NO! You will be modifying system components, keep it writable to avoid installation issues.

    Step 4: [FLASHING THE M.O.D. KERNEL]
    Check the releases page posted above. Just unzip the file there and flash via TWRP as an image to boot. It's patched with Magisk already.

    Step 5: [CONVERT EXT4 TO F2FS}:
    Converting EXT4 data and cache partitions to F2FS:

    Check the releases page posted above for fstab_patch_F2FS_MI9_Cache_NoBarrier.zip required to enable F2FS. You MUST flash this in TWRP or your OS will NOT be able to boot an F2FS data partition!!!! This file has been kanged all over the internet, it was created here. Feel free to use it, everyone already is.

    ***Note flashing TWRP / Install / fstab_patch_F2FS_MI9_Cache_NoBarrier.zip MUST be repeated any time you change ROMs or you won't have access to your data!!! So back this up!!!!***

    Boot back into TWRP. You will need to go to Wipe, Advanced Wipe, Click Data, Repair or Change File System, Change File System, and click F2FS. Swipe to change. It will format and you'll have nothing on your data partition. Next format cache. Go to Wipe, Advanced Wipe, Click Cache, Repair or Change File System, Change File System, now click F2FS. Swipe to change. Again it will format and be wiped.

    Step 6: [SETTING UP YOUR "NEW" PHONE]:
    Next, reboot to System. The device should boot up and welcome you to your "new" device. It has no data apps so it has to be new. You will have to login to your Xiaomi account if it is associated with the device. Then you can choose to restore from a Google Backup and next from Xiaomi Cloud. You can do either one to get your apps back. I would suggest Xiaomi Cloud after Google completes all its downloads - it will place icons in the right places and install your root apps if you had them. And after setting up your apps, now boot back to TWRP and make a Backup. Now for this Nandroid backup you should backup data, boot, dtbo, and vendor partitions (vendor has the fstab.qcom file that allows your F2FS supported partition to boot now). Even if you save to your internal device initially, be sure to put it on a PC for safe keeping. Then If you accidentally wipe your partition later, you can skip importing, get to the main screen after minimal setup completes, enable file transfer from the connected PC, and then copy the Nandroid backup to your Internal Memory. Boot into TWRP and restore the backup and you're back in business.

    Step 7: [INSTALLING MAGISK MANAGER AND KERNEL MANAGER]:
    So now you install the MagiskManager-v7.3.2.apk to enable all root functions. If you want Google Pay and anything else setup posts are here in the Mi9 forum that show you how. Generally hide all banking apps, trading apps, Google Pay, GMS, etc. And I suggest installing GMS doze for better battery life and the Mi9 Auto Brightness fix.

    In addition, to have the MOD kernel setup for the best performance, go into Magisk Manager, Modules, and flash the (Magisk)MOD-Battery-Saver+_v2.zip from the releases page. It will auto set all the parameters the kernel features, and does a great job with extending battery life at the same time.

    This is the best setup for performance. Pictures are included below.

    If you would like to change the settings, you need a kernel manager. So next you can install the Smart Pack APK SmartPack_Kernel_Manager_v8.7.apk to enable or disable all the tweaks you desire.

    Pictures are attached below to show the TWRP screens for flashing and F2FS partition conversion. Also the settings of best performance using Smart Pack kernel manager are here. If you want to change any of the best settings after flashing the Magisk Module, do it in the kernel manager of your choice and set on boot - where to change those options is in the pictures below for SmartPack.

    Enjoy!

    Mauro TWRP
    https://forum.xda-developers.com/Mi-9/development/recovery-unofficial-twrp-xiaomi-mi-9-t3905825

    SmartPack Kernel Manger
    https://forum.xda-developers.com/android/apps-games/app-smartpack-kernel-manager-t3854717

    FK Kernel Manager CPU Profile
    https://play.google.com/store/apps/details?id=com.franco.kernel&hl=en_US

    Magisk
    https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

    Minimal ADB and Fastboot
    https://forum.xda-developers.com/showthread.php?t=2317790

    And one last thing. I have been working with some of the most well known devs out there on XDA on Telegram, Private Messaging, and other channels to get this kernel where it is - but I have no XDA presence. I've helped hundreds of people on Telegram setup their systems or diagnose their issues. If you find this post useful, helpful, innovative, or install my kernel and like it, please click the Thanks button to acknowledge the work that I've done to get the Mi9 to this point. It would be greatly appreciated to get some thank yous for all the hours I've put into this development work for the Mi9, and provides some motivation to keep improving. Other kernels are on the way as well for more Xiaomi / Redmi devices if I feel some love from the community. Much appreciated!

    Thanks goes out to @smeroni68 and @mauronofrio for helping fix the fstab.qcom zip that cost several hours of pain yesterday for users and I on Telegram that did not have the Vendor partition mounted when flashing the old fstab.zip file - it will flash now mounted or not from TWRP. And thanks to @ilia1985 for providing a Magisk Module template for the kernel manager settings, now OC setup doesn't even need a kernel manager!

    ***DISCLAIMER - APPLYING ANY ROOT MODS IS ALWAYS AT YOUR OWN RISK! I AM NOT RESPONSIBLE FOR BRICKED DEVICES, DAMAGE OR OTHER THAT MAY OTHERWISE OCCUR. THIS HAS BEEN TESTED EXTENSIVELY BUT USE AT YOUR OWN RISK***
    4
    If you have trouble installing this mod, try my video tutorial, also I was able to condense down some of the steps.

    3
    MIUI Global Dev 9.6.27 is the basis of this mod. All benchmarks and tests were done on this ROM.
    3
    My Results

    Excellent work @mslezak

    Glad to see some love for our device.

    These are my results before and after flashing the magisk optimal settings file with your kernel.
    2
    Looks like it's base on last one version of android9 MIUI DEV 9.8.1 to modify its kernel, doesn't it ?
    So it's not base on linux kernel 4.14.139 to develop ?

    Kris

    4.14.83 per the hardware device settings. Q is already upstreamed to the latest Linux and CAF so just waiting on a source release so kernels can be made. No need to spend time upstreaming unless another dev wants to (I'm in contact with the other kernel dev here on XDA we're working together now, he may upstream). He upstreamed his to 4.14.139 and will pull my source repo soon to fix bugs in his build so he may just upstream this kernel or fix bugs in his kernel in the process. Collaboration is a good thing. I've been waiting for assistance for a long time and it's good to team up with others devs. We don't get paid we do this as a hobby.