General Rooting MIUI on Lisa

Search This thread

zgfg

Senior Member
Oct 10, 2016
7,190
4,638
My thoughts about rooting stock MIUI on Xiaomi 11 Lite 5g NE (Lisa)

This week I'm still waiting for Bootloader, but checking about the possibilities.

Coming from Xiaomi Mi 9T (Davinci) – I owned the phone for 2+ years, used stock EEA first, then switched to Xiaomi.eu Weeklies and finally to Xiaomi.eu Stable.
Trough the time, I went from A9/MIUI 10 to A11/MIUI 12.5, and in parallel I experimented with all relevant Magisk version (Stable, Beta, Canary, Lite, Alpha and Custom Magisk) – curently I'm on Magisk Alpha 23018 (with Zygisk, DenyList, Shamiko – no more the old MagiskHide).

Through all that, I used my Davinci as daily driver, for private and business, and I never had any bigger issues. I hope for the similar experience with my new Lisa.

As you can see, I'm not a fan of custom ROMs (altough I experimented with some of them on my previous devices), hence I also plan for Lisa, at least for now, to stay on MIUI.


Stock MIUI:

1.AFAIK, there are two unofficial custom recoveries but they don't support A12 encryption on /Data and Internal memory, hence they are of limited use for rooting.
They can be used for ADB sideloading and probably with OTG stick and external SD card.
But they cannot install/flash from Internal memory, backup/restore to Internal memory, and generally they cannot backup /Data – specially, TWRP cannot be used for fixing /adb/data in case of magisk bootloops.

2.However, for the installation of Magisk, TWRP is NOT REQUIRED – although by (1), TWRP could be still used for e.g. flashing the Magisk zip from OTG stick.

3.Magisk can be alternatively installed by: installing Magisk app (no root yet), patching the extracted boot.img (in Magisk app), and flashing the patched boot img from Fastboot (therefore, by completely bypassing TWRP).

My Lisa came with EEA 12.5.7 and it was immediately updated to 12.5.8, hence I have downloaded the stock miui_LISAEEAGlobal_V12.5.8.0.RKOEUXM_700eb7116a_11.0.zip and unzipped – but unlike for e.g. Mi 9 series, the OTA package does not contain separated boot.img (192 MB).
Instead, it contains 13.2 GB payload.bin (SAR, Dynamic partitions, all in once) and when I tried, Magisk cannot patch, reporting that format is not supported.

4. There are still some other ways to install Magisk. Maybe, by backing up Boot to OTG stick / external SD card – the backed up boot.emmc.win file can be used as the boot img for patching.
Or by flashing the Magisk zip through TWR (from external SD /OTG) – but that might be risky in case of a brick, fixing may not be easy.


Xiaomi.eu:

Xiaomi.eu ROMs are essentially debloated MIUI. Usually they are even bette, specially if staying on Xiaomi.eu Stable releases (Weekly releases are essentially betas).

Since I was accustomed to Xiaomi.eu on my Davinci, I also planned to switch to Xiaomi.eu on my Lisa.
Currently, they have Stable 12.5.7 (A11), while Weeklies with MIUI 13 / A12 are around the corner (they will start once Xiaomi starts releasing MIUI 13 weekly Betas for Lisa)

5. Hence I have downloaded xiaomi.eu_multi_MI11LE_XM11Lite5GNE_V12.5.7.0.RKOCNXM_v12-11-fastboot.zip. Since there is no TWRP for Lisa, Xiaomi.eu ROM must be installed through Fastboot (unzip and run the batch script windows_fastboot_first_install_with_data_format.bat).

The zip file contains the boot.img and I just tried, Magisk (Alpha) can succesfuly patch – the patched img needs to be flashed from Fastboot to Boot (I cannot proceed for now since still waiting for BL to be unlocked).
If anything goes wrong, it will be just enough to flash the original Xiaomi.eu boot.img.
I already used the same procedure for installing Magisk to Davinci, however I used then TWRP/OF/SHRP (not Fastboot) to flash the patched boot img directly from the couche and the phone – this could even apply to Lisa, if placing the patched boot img to external SD or OTG stock.

Please correct me and/or comment about the other posssbilites about installing Magisk to MIUI on Lisa, specially with your results if you already tried.
 

zgfg

Senior Member
Oct 10, 2016
7,190
4,638
I rooted my lisa by the patched boot.img method. Working like a charm! One thing to note is that you need to reinstall Magisk to the inactive slot soon after OTA but before rebooting since the device uses a/b partitioning. But now for some reason, the more dark mode options in the dark mode settings doesn't work anymore :(
Which ROM are you talking please, Xiaomi.eu or the stock - if stock, please details (CN/Golobal/EEA and MIUI version like in the Settings/My Device)?

I'm asking because for EEA 12.5.8 (that I have) I don't see how can I get boot.img.
I downloaded the OTA zip but it does not contain boot.img, instead, there is 13.2 GB payload.bin inside - see my post above).
For Xiaimu.eu ni problem, their fastboot zip contains the images folder with boot img inside
 

varunkp

Senior Member
Which ROM are you talking please, Xiaomi.eu or the stock - if stock, please details (CN/Golobal/EEA and MIUI version like in the Settings/My Device)?

I'm asking because for EEA 12.5.8 (that I have) I don't see how can I get boot.img.
I downloaded the OTA zip but it does not contain boot.img, instead, there is 13.2 GB payload.bin inside - see my post above).
For Xiaimu.eu ni problem, their fastboot zip contains the images folder with boot img inside
I'm on the stock MIUI India edition. To get the boot.img, download the fastboot ROM. All the images will be in there. But you can also extract the boot.img from the payload file as well. The guide can be found here.
 

zgfg

Senior Member
Oct 10, 2016
7,190
4,638
I'm on the stock MIUI India edition. To get the boot.img, download the fastboot ROM. All the images will be in there. But you can also extract the boot.img from the payload file as well. The guide can be found here.
Ok, thanks, Payload_Dumper works

Since it is A/B device, should I flash to both slots?

fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
 

zgfg

Senior Member
Oct 10, 2016
7,190
4,638
Upon waiting the standard 168 hours, I successfully unlocked my new Lisa (Xiaomi 11 Lite 5g NE)

---

Since I had MIUI EEA 12.5.8 (A11), I downloaded the miui_LISAEEAGlobal_V12.5.8.0.RKOEUXM_700eb7116a_11.0.zip (use MIUI Downloader app from Playstore to make it easy).
Unzipped and found payload.bin inside - used Payload_Dumper (search on XDA) to extract boot.img

I installed Magisk Alpha 24001 app (the same will work for Magisk Stable or Magic Beta 2400x) and patched the boot.img.
I first tested does it boot correctly:
fastboot boot patched_boot.img

and then permanently flashed the Magisk:
fastboot flash boot patched_boot.img

New Magisk does no more support MagiskHide - use Zygisk+DenyList+Shamiko instead:

In Magisk app, enable Zygisk and reboot.
Then enable Enforce DenyList, open Configure DenyList, enable filter to show System and OS apps, find Google Play Services (GMS) and checkmark:
com.google.android.gms
com.google.android.gms.unstable

Additionally checkmark the other (like banking) apps you used to checkmark for MagiskHide in the old Magisk v23

E.g., I always checkmark Xiaomi stock Security (com.miui.securitycenter) and Safety Net checkers like YASNAC (download from Playstore - Magisk does no more include SafetyNet checker coming with the app).
Reboot again.

Since it is also good idea to hide this new Zygisk, I installed Shamiko (Magisk module) and disabled Enforce DenyList (Shamiko will read and take over from DenyList).
Reboot

Additionally, to hide init.rc, I installed InitRcHider module.

Finally to pass the SafetyNet (CTS, unlocked Bootloader), I installed USNF 2.2.1 (latest at the moment, like all the other modules I mention here).
Note: InitRcHider and Shamiko are not required for SN, but without Zygisk+DenyList+USNF you will not pass

Google Play was showing that Device is not certified - I deleted Cache and Data for Google Play Store app, rebooted and after some time Device was certified

Since Magisk does no more connect to the Modules Repo, use Fox Magisk Module Manager

---

Further, I installed AdAway hosts/root mode (don't forget to enable Systemless Hosts in Magisk, and reboot), Vanced YouTube root

By using SystemlessDebloater (find in Fox Mmm), I have debloated 40-something preinstalled system apps - attached is the config list for Debloater, if you want to keep certain apps (Facebook or so, remove those names from the list)

E.g., for Vanced YT, I first uninstalled all updates to YT and then used SystemlessDebloater to debloat the built in the system YT v17, then successfully installed Vanced YT root that requires YT v16.29.39

---

Since Riru is incompatible with Zygisk, use LSposed-Zygisk version. As LSPosed modules, I use GravityBox_R, CustoMIUIzer and HideMyApplist (HMA)

E.g. with HMA I detach (hide) YouTube and AndroidAuto (I still need to configure apps and hacks for AA - work in progress) - YT Vanced root and similarly the hacks for AA require particular old versions of YT or AA.
By detaching those apps from Playstore, I make sure that Playstore does not bother, and does not update by mistake (even mine) YT and AA

Also, banking and similar apps usually look for Magisk app, LSPosed, and LSPosed modules - if they find, they detect 'root'

You can use e.g. Oprek Detector (fromg Google Play):
- checkmark in DenyList
- use HMA to hide Magisk app, LSPosed and Lsposed modules (apps) from Oprek Detector.
As a result, Oprek Detector will no more find root

Use that as a proof of concept for hiding the root from banking apps (altough, some of them may require additional steps)
 

Attachments

  • Alpha.jpg
    Alpha.jpg
    130.6 KB · Views: 109
  • LSPosed-Modules.jpg
    LSPosed-Modules.jpg
    105.4 KB · Views: 106
  • SafetyNet.jpg
    SafetyNet.jpg
    284.2 KB · Views: 106
  • Playstore.jpg
    Playstore.jpg
    248.4 KB · Views: 101
  • Magis-Modules.jpg
    Magis-Modules.jpg
    543.1 KB · Views: 96
  • Oprek.jpg
    Oprek.jpg
    290.9 KB · Views: 96
  • OprekDetector.jpg
    OprekDetector.jpg
    281.7 KB · Views: 100
  • SystemlessDebloaterList.sh
    1.1 KB · Views: 20
Last edited:

zgfg

Senior Member
Oct 10, 2016
7,190
4,638
Thanks to @HimanshuRaj (his TG support and his SHRP - another thread), I have now both Magisk and permanent TWRP (more precisely, SHRP), both in the patched boot.img:

- fastboot boot to SHRP
- from SHRP, flash SHRP img to Ramdisk -Recovery
- Stay in SHRP and flash the Magisk apk renamed to zip file

Normal booting boots to Sydtem/Magisk and rebooting to Recovery boots to Magisk
 
Last edited:
  • Like
Reactions: raulci

raulci

Senior Member
Jan 7, 2018
70
10
Thanks a lot @zgfg for the guide!
I'm going to save this thread as in the future it's possible I will try to root my mobile following your instructions.
:D
 
  • Like
Reactions: zgfg

zgfg

Senior Member
Oct 10, 2016
7,190
4,638
Now, one more successful experiment:

- Magisk Alpha notified about the update (to 24102)
- hence I updated the Magisk Alpha app and then took the Direct update for Magisk itself

It updated the boot img, but correctly keeping the previously installed permanent SHRP:
- 'normal' booting boots to System/Magisk
- rebooting to Recovery boots to SHRP
 

breakasteroid

New member
Mar 13, 2022
4
0
I followed your steps and it works fine, just making sure on how to get permanent SHRP
i have a fully functioning lisa now with magisk and a couple of modules, do i need to redo all of it when trying to install SHRP with your instructions?
and do i flash the patched magisk file or the default app apk?
 

breakasteroid

New member
Mar 13, 2022
4
0
for context: i tried installing shrp twice and performing backups with it but ended up having to clean install stock rom again, maybe it was because i was missing an sd card but i tried it using a pc and just pulling the backup to and from there
 

zgfg

Senior Member
Oct 10, 2016
7,190
4,638
for context: i tried installing shrp twice and performing backups with it but ended up having to clean install stock rom again, maybe it was because i was missing an sd card but i tried it using a pc and just pulling the backup to and from there
Permanent installation for SHRP (Lisa) was also covered (how-to) in the TG channel (link in SHRP thread, itsvOP post #1).
As said, I have permanently installed both Magisk v24.3 and SHRP v0 2 (from TG channel) into the Boot partition (since there is no Recovery partition) and I can boot into System with Magisk (normal boot) or to SHRP (boot to Recovery, with Vol+)

And in SHRP, Internal memory, USB-OTG and external SD work flawlessly

However, the SHRP supports only MIUI 12.5, (A11) not A12 (MIUI 13)

---

Anyway, more about rooting:
Just installed the Magisk module:

and with that, I can finally use AOD really always (or scheduled), not only for 10 seconds as Xiaomi pushed to MiUI 12.5.8
 

breakasteroid

New member
Mar 13, 2022
4
0
However, the SHRP supports only MIUI 12.5, (A11) not A12 (MIUI 13)
the question was rather if you flashed SHRP and magisk before or after installing all said modules and LSPosed but since SHRP isnt working it wont help me anymore

alright so i wont be able to use SHRP since i have A12 running the xiaomi.eu roms, thanks for the info!
 

zgfg

Senior Member
Oct 10, 2016
7,190
4,638
the question was rather if you flashed SHRP and magisk before or after installing all said modules and LSPosed but since SHRP isnt working it wont help me anymore

alright so i wont be able to use SHRP since i have A12 running the xiaomi.eu roms, thanks for the info!
Boot is /boot partition, Magisk staff (all modules, LSPosed, etc goes to /data partition

Hence the order does not matter.
Everything what is needed was explained above and in the TG channel, hence sorry I will not waste time drawing the architecture again

Anyway, when I took SHRP v0.2, and permanently flashed, I 'lost' Magisk for eg 5 minutes.
I made backup of boot partition in SHRP (it was no more stock but with SHRP), patched Magisk to the backed-up img, went back to SHRP and flashed to Boot. Since then I had back both Magisk patch and SHRP in the Boot, and when I booted back to System/Magisk I had all my 5 Magisk modules, LSPosed and it's 3 modules running

It's all about to understand what goes to different partitions Boot and Data, hence playing with Boot does not affect what was previously installed to Data

Anyway, SHRP is of no use for you (yet), but be aware that there TWRP does not support A12 yet, hence neither the derivatives like SHRP

---

And if you use patch and flash (in fastboot) method, you can install Magisk with no need for TWRP/SHRP
 
Last edited:

breakasteroid

New member
Mar 13, 2022
4
0
alright thanks, just had to make sure i didnt do stuff wrong and thats why i lost my data, thanks again for the info on TWRP and A12 not (yet) being available which was probably the reason how everything broke
 

HUYDAY

New member
Oct 11, 2020
4
1
Xiaomi 11 Lite 5g NE
Today I updated my Xiaomi 11 lute 5g ne to MiUI 13 and my root has gone. So I have to use Magisk to patch boot.img. It created patched boot file but when I flash it to my phone and reboot, it freezes on MI logo screen. It didn't work like before. Please help me, thank you.

P/s: when I find rom I saw 2 files: boot.img & boot-gki.img. I only copied boot.img to my phone to patch.
 

Droid-warrior

New member
Jul 10, 2014
1
0
Ludhiana
Today I updated my Xiaomi 11 lute 5g ne to MiUI 13 and my root has gone. So I have to use Magisk to patch boot.img. It created patched boot file but when I flash it to my phone and reboot, it freezes on MI logo screen. It didn't work like before. Please help me, thank you.

P/s: when I find rom I saw 2 files: boot.img & boot-gki.img. I only copied boot.img to my phone to patch.
Were you able to figure a way out? I'm in the same situation where I've tried everything to root 13.0.3 and it gets stuck on boot logo everytime.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Upon waiting the standard 168 hours, I successfully unlocked my new Lisa (Xiaomi 11 Lite 5g NE)

    ---

    Since I had MIUI EEA 12.5.8 (A11), I downloaded the miui_LISAEEAGlobal_V12.5.8.0.RKOEUXM_700eb7116a_11.0.zip (use MIUI Downloader app from Playstore to make it easy).
    Unzipped and found payload.bin inside - used Payload_Dumper (search on XDA) to extract boot.img

    I installed Magisk Alpha 24001 app (the same will work for Magisk Stable or Magic Beta 2400x) and patched the boot.img.
    I first tested does it boot correctly:
    fastboot boot patched_boot.img

    and then permanently flashed the Magisk:
    fastboot flash boot patched_boot.img

    New Magisk does no more support MagiskHide - use Zygisk+DenyList+Shamiko instead:

    In Magisk app, enable Zygisk and reboot.
    Then enable Enforce DenyList, open Configure DenyList, enable filter to show System and OS apps, find Google Play Services (GMS) and checkmark:
    com.google.android.gms
    com.google.android.gms.unstable

    Additionally checkmark the other (like banking) apps you used to checkmark for MagiskHide in the old Magisk v23

    E.g., I always checkmark Xiaomi stock Security (com.miui.securitycenter) and Safety Net checkers like YASNAC (download from Playstore - Magisk does no more include SafetyNet checker coming with the app).
    Reboot again.

    Since it is also good idea to hide this new Zygisk, I installed Shamiko (Magisk module) and disabled Enforce DenyList (Shamiko will read and take over from DenyList).
    Reboot

    Additionally, to hide init.rc, I installed InitRcHider module.

    Finally to pass the SafetyNet (CTS, unlocked Bootloader), I installed USNF 2.2.1 (latest at the moment, like all the other modules I mention here).
    Note: InitRcHider and Shamiko are not required for SN, but without Zygisk+DenyList+USNF you will not pass

    Google Play was showing that Device is not certified - I deleted Cache and Data for Google Play Store app, rebooted and after some time Device was certified

    Since Magisk does no more connect to the Modules Repo, use Fox Magisk Module Manager

    ---

    Further, I installed AdAway hosts/root mode (don't forget to enable Systemless Hosts in Magisk, and reboot), Vanced YouTube root

    By using SystemlessDebloater (find in Fox Mmm), I have debloated 40-something preinstalled system apps - attached is the config list for Debloater, if you want to keep certain apps (Facebook or so, remove those names from the list)

    E.g., for Vanced YT, I first uninstalled all updates to YT and then used SystemlessDebloater to debloat the built in the system YT v17, then successfully installed Vanced YT root that requires YT v16.29.39

    ---

    Since Riru is incompatible with Zygisk, use LSposed-Zygisk version. As LSPosed modules, I use GravityBox_R, CustoMIUIzer and HideMyApplist (HMA)

    E.g. with HMA I detach (hide) YouTube and AndroidAuto (I still need to configure apps and hacks for AA - work in progress) - YT Vanced root and similarly the hacks for AA require particular old versions of YT or AA.
    By detaching those apps from Playstore, I make sure that Playstore does not bother, and does not update by mistake (even mine) YT and AA

    Also, banking and similar apps usually look for Magisk app, LSPosed, and LSPosed modules - if they find, they detect 'root'

    You can use e.g. Oprek Detector (fromg Google Play):
    - checkmark in DenyList
    - use HMA to hide Magisk app, LSPosed and Lsposed modules (apps) from Oprek Detector.
    As a result, Oprek Detector will no more find root

    Use that as a proof of concept for hiding the root from banking apps (altough, some of them may require additional steps)
    4
    My thoughts about rooting stock MIUI on Xiaomi 11 Lite 5g NE (Lisa)

    This week I'm still waiting for Bootloader, but checking about the possibilities.

    Coming from Xiaomi Mi 9T (Davinci) – I owned the phone for 2+ years, used stock EEA first, then switched to Xiaomi.eu Weeklies and finally to Xiaomi.eu Stable.
    Trough the time, I went from A9/MIUI 10 to A11/MIUI 12.5, and in parallel I experimented with all relevant Magisk version (Stable, Beta, Canary, Lite, Alpha and Custom Magisk) – curently I'm on Magisk Alpha 23018 (with Zygisk, DenyList, Shamiko – no more the old MagiskHide).

    Through all that, I used my Davinci as daily driver, for private and business, and I never had any bigger issues. I hope for the similar experience with my new Lisa.

    As you can see, I'm not a fan of custom ROMs (altough I experimented with some of them on my previous devices), hence I also plan for Lisa, at least for now, to stay on MIUI.


    Stock MIUI:

    1.AFAIK, there are two unofficial custom recoveries but they don't support A12 encryption on /Data and Internal memory, hence they are of limited use for rooting.
    They can be used for ADB sideloading and probably with OTG stick and external SD card.
    But they cannot install/flash from Internal memory, backup/restore to Internal memory, and generally they cannot backup /Data – specially, TWRP cannot be used for fixing /adb/data in case of magisk bootloops.

    2.However, for the installation of Magisk, TWRP is NOT REQUIRED – although by (1), TWRP could be still used for e.g. flashing the Magisk zip from OTG stick.

    3.Magisk can be alternatively installed by: installing Magisk app (no root yet), patching the extracted boot.img (in Magisk app), and flashing the patched boot img from Fastboot (therefore, by completely bypassing TWRP).

    My Lisa came with EEA 12.5.7 and it was immediately updated to 12.5.8, hence I have downloaded the stock miui_LISAEEAGlobal_V12.5.8.0.RKOEUXM_700eb7116a_11.0.zip and unzipped – but unlike for e.g. Mi 9 series, the OTA package does not contain separated boot.img (192 MB).
    Instead, it contains 13.2 GB payload.bin (SAR, Dynamic partitions, all in once) and when I tried, Magisk cannot patch, reporting that format is not supported.

    4. There are still some other ways to install Magisk. Maybe, by backing up Boot to OTG stick / external SD card – the backed up boot.emmc.win file can be used as the boot img for patching.
    Or by flashing the Magisk zip through TWR (from external SD /OTG) – but that might be risky in case of a brick, fixing may not be easy.


    Xiaomi.eu:

    Xiaomi.eu ROMs are essentially debloated MIUI. Usually they are even bette, specially if staying on Xiaomi.eu Stable releases (Weekly releases are essentially betas).

    Since I was accustomed to Xiaomi.eu on my Davinci, I also planned to switch to Xiaomi.eu on my Lisa.
    Currently, they have Stable 12.5.7 (A11), while Weeklies with MIUI 13 / A12 are around the corner (they will start once Xiaomi starts releasing MIUI 13 weekly Betas for Lisa)

    5. Hence I have downloaded xiaomi.eu_multi_MI11LE_XM11Lite5GNE_V12.5.7.0.RKOCNXM_v12-11-fastboot.zip. Since there is no TWRP for Lisa, Xiaomi.eu ROM must be installed through Fastboot (unzip and run the batch script windows_fastboot_first_install_with_data_format.bat).

    The zip file contains the boot.img and I just tried, Magisk (Alpha) can succesfuly patch – the patched img needs to be flashed from Fastboot to Boot (I cannot proceed for now since still waiting for BL to be unlocked).
    If anything goes wrong, it will be just enough to flash the original Xiaomi.eu boot.img.
    I already used the same procedure for installing Magisk to Davinci, however I used then TWRP/OF/SHRP (not Fastboot) to flash the patched boot img directly from the couche and the phone – this could even apply to Lisa, if placing the patched boot img to external SD or OTG stock.

    Please correct me and/or comment about the other posssbilites about installing Magisk to MIUI on Lisa, specially with your results if you already tried.
    4
    Which ROM are you talking please, Xiaomi.eu or the stock - if stock, please details (CN/Golobal/EEA and MIUI version like in the Settings/My Device)?

    I'm asking because for EEA 12.5.8 (that I have) I don't see how can I get boot.img.
    I downloaded the OTA zip but it does not contain boot.img, instead, there is 13.2 GB payload.bin inside - see my post above).
    For Xiaimu.eu ni problem, their fastboot zip contains the images folder with boot img inside
    I'm on the stock MIUI India edition. To get the boot.img, download the fastboot ROM. All the images will be in there. But you can also extract the boot.img from the payload file as well. The guide can be found here.
    4
    Ok, thanks, Payload_Dumper works

    Since it is A/B device, should I flash to both slots?

    fastboot flash boot_a patched_boot.img
    fastboot flash boot_b patched_boot.img
    Just fastboot flash boot patched_boot.img should be enough. It'll flash the image to the active slot automatically.
    2
    I rooted my lisa by the patched boot.img method. Working like a charm! One thing to note is that you need to reinstall Magisk to the inactive slot soon after OTA but before rebooting since the device uses a/b partitioning. But now for some reason, the more dark mode options in the dark mode settings doesn't work anymore :(