[GUIDE] How I flashed TWRP, Xiaomi.eu rom and rooted with Magisk

Search This thread

cd993

Senior Member
May 8, 2009
3,711
1,379
London
OnePlus 12
Hey guys.

The below is my full experience of how I flashed TWRP, the Xiaomi.eu rom and rooted with Magisk. Whilst it essentially is a step-by-step, it also contains not only how I succeeded but also how I encountered issues and so...


*UPDATE!*
Here is a slightly condensed verison with thanks to @airwebber

Get the latest xiaomi.eu rom from here or here, just scroll down and find the "xiaomi.eu_multi_MI9..." version.

https://sourceforge.net/p/xiaomi-eu...ty/?page=0&limit=100#5cb9f96ee8ba7c44716e87ff

Get the latest magisk (magisk v19 works at the time of writing this post):

https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

Some versions of twrp may not work on older builds other than the latest (9.4.25) and so use this one with:

https://mega.nz/#!CH5jgYTB!yNqOiVoo3cf0_15jIwZ-btO52cvpOG7iZrRCe19V2Nc


Once the waiting time elapses (usually 360 hours) use the MiFlash tool to unlock the bootloader. Warning: this wipes your phone entirely, so be sure to backup anything of importance.

Unlocking takes a few minutes and once 100% complete your Mi 9 will reboot. Your phone will say “unlocked” on the first splash screen while booting up.

Your Mi 9 will boot, and you will need to either perform/skip the initial setup stuff. Once ready, power off your device in order to flash TWRP.

Press both the volume down key and power key to boot into Fastboot Mode.

Once in Fastboot Mode, use the following command to install TWRP: “fastboot flash recovery XXXX” (XXXX = the pathway to your TWRP.img file). However, I find it best using Minimal ADB and copying the TWRP file and renaming it to “twrp.img” for ease) in the Minimal ADB folder location e.g. “C:\Program Files (x86)\Minimal ADB and Fastboot”.

Once flashed, disconnect the USB cable and boot to TWRP recovery by holding down both the volume up and the power buttons. This sometimes will bring you to the stock recovery and NOT TWRP! If it does, boot back to Fastboot and reflash TWRP.

Once you can boot to TWRP, push both the rom and magisk via CMD line:

adb push rom.zip /tmp/
adb push magisk.zip /tmp/
For ease, I suggest copying both files to the Minimal ADB folder location e.g. “C:\Program Files (x86)\Minimal ADB and Fastboot”. And renaming them to: “rom.zip” and “magisk.zip”.

This step is very important!! You must go to the Wipe menu and select: Format Data, then type “yes” to continue and then: do a Factory reset, which also wipes: Data, Caches and Format Data. If you skip this step you won’t be able to install a lot of important apps and will have to start over.

Now that you have pushed both the rom & magisk and wiped everything you needed to. Install the ROM immediately after install magisk.zip (in that order) both located in /tmp/.

The installation will take a couple of minutes (if your screen dims, don’t worry that’s just TWRP screen dimming, touch the screen to keep it awake!) once finished with no errors, then reboot and chose Do Not Install the TWRP app when prompted.

The phone will take a few seconds to reboot and show the first MI splash screen, but it should start booting. After a couple of minutes, you should see the initial boot screen! Perform the setup (connecting to Wi-Fi, adding my Google account etc.).

Once finished setting up, you may notice that magisk was not installed, if that happens, you can install the APK version and follow the prompts and reboot.

Once rebooted, confirm that magisk is now installed. If it is, I suggest installing SafetyNet and confirming your phone passes!

If it passes, you have successfully installed and rooted the Xiaomi.eu rom!

Also, when updating with each weekly I recommend the below as an alternative to using the built in Updater app. The reason being is I believe the updater app automatically reboots after it installs, which if you're rooted means you'll lose it. That then means you have to reboot back to twrp, reflash magisk, reboot, reinstall modules, reboot again etc.

Therefore to update a weekly:

Download the rom manually
Reboot to twrp
Wipe system and caches
Flash the rom and magisk
Reboot

Optional: I also disable my substratum theme too before updating and reapply afterwards. Whether it's needed or not I'm not too sure, so give it a try either way
 
Last edited:

cd993

Senior Member
May 8, 2009
3,711
1,379
London
OnePlus 12
Good stuff for early roots without not tested stuff like twrp and magisk :cowboy: but I would hide that middle part coz some people can get be confused. Or make a short version which working in order and another with your all step's but separately

edit: still 46h left :rolleyes:

Yeah I agree it's kinda overkill, being a a full run down - when I get time I'll make a shorter condensed version :)
 

perryano

Account currently disabled
Aug 10, 2015
55
4
GB
meettomy.site
Thanks for the detailed write up. The EU roms are google approved correct? Does the side Ai button work with google assist? Do you need to install twrp to flash or can I just flash global/EU rom if I don't want to root yet?
 
Last edited:

mr-mauro

Senior Member
May 19, 2011
318
109
Milan, London & Zürich
I just got the bootloader unlocked (1h before than I tought ahahah). I had some issue that the unlocker was telling to me thaat I didn't use enought the phone and that so I had to try in few days :) I overtook the problem using an old version of the unlocker (2.3.803.10).
Reading your procedure it all logical and fine, thanks! Except one thing that I'm not sure... Is xiaomi.eu a 'full rom' (on all Xiaomi that I had I always jumped straight to something different than MIUI and so I never tried it ahahah :p)?
If so, I think it would be better to wipe the system too before installing the rom. That's because doing so it will do 100% 'clean' installation and not a an update on the normal global miui :)
 
Last edited:

cd993

Senior Member
May 8, 2009
3,711
1,379
London
OnePlus 12
Thanks for the detailed write up. The EU roms are google approved correct? Does the side Ai button work with google assist? Do you need to install twrp to flash or can I just flash global/EU rom if I don't want to root yet?

Hmm unsure about them being approved or not... The side button does work. As far as I understand, you'll need to install twrp in order to flash the new rom, but could always go back to stock recovery and of course no need to root if you don't want to :)
 

cd993

Senior Member
May 8, 2009
3,711
1,379
London
OnePlus 12
I just got the bootloader unlocked (1h before than I tought ahahah). I had some issue that the unlocker was telling to me thaat I didn't use enought the phone and that so I had to try in few days :) I overtook the problem using an old version of the unlocker (2.3.803.10).
Reading your procedure it is more or less everything fine except one thing that I'm not sure. is xiaomi.eu a full rom? If so, I think it would be better to wipe the system too before installing the rom because instead it will try to to an update on the normal global miui rather than a 100% 'clean' installarion :)

That's a fair point - if you have some this successfully then perhaps I'll amend my post. Sometime soon I'll make a small set of instructions, rather than my essay :p
 

ted presley

Senior Member
Jun 12, 2007
485
125
Ho Chi Minh city
It just boot :) So, it is fine :p I just noticed TickTock as a default app installed by Xiaomi.eu :)

P.S. FYI I noticed that the devices is seen by Google as a Mi Mix 2S

Yeah, to change the device name back to mi 9, just install "Find my device" app from Google play store, sign in with google account, there's an option in the setting to rename the device (this device).

That's the only place you can change the name back, I did try all, but only this one worked.
 
  • Like
Reactions: QAM

Top Liked Posts

  • There are no posts matching your filters.
  • 53
    Hey guys.

    The below is my full experience of how I flashed TWRP, the Xiaomi.eu rom and rooted with Magisk. Whilst it essentially is a step-by-step, it also contains not only how I succeeded but also how I encountered issues and so...


    *UPDATE!*
    Here is a slightly condensed verison with thanks to @airwebber

    Get the latest xiaomi.eu rom from here or here, just scroll down and find the "xiaomi.eu_multi_MI9..." version.

    https://sourceforge.net/p/xiaomi-eu...ty/?page=0&limit=100#5cb9f96ee8ba7c44716e87ff

    Get the latest magisk (magisk v19 works at the time of writing this post):

    https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

    Some versions of twrp may not work on older builds other than the latest (9.4.25) and so use this one with:

    https://mega.nz/#!CH5jgYTB!yNqOiVoo3cf0_15jIwZ-btO52cvpOG7iZrRCe19V2Nc


    Once the waiting time elapses (usually 360 hours) use the MiFlash tool to unlock the bootloader. Warning: this wipes your phone entirely, so be sure to backup anything of importance.

    Unlocking takes a few minutes and once 100% complete your Mi 9 will reboot. Your phone will say “unlocked” on the first splash screen while booting up.

    Your Mi 9 will boot, and you will need to either perform/skip the initial setup stuff. Once ready, power off your device in order to flash TWRP.

    Press both the volume down key and power key to boot into Fastboot Mode.

    Once in Fastboot Mode, use the following command to install TWRP: “fastboot flash recovery XXXX” (XXXX = the pathway to your TWRP.img file). However, I find it best using Minimal ADB and copying the TWRP file and renaming it to “twrp.img” for ease) in the Minimal ADB folder location e.g. “C:\Program Files (x86)\Minimal ADB and Fastboot”.

    Once flashed, disconnect the USB cable and boot to TWRP recovery by holding down both the volume up and the power buttons. This sometimes will bring you to the stock recovery and NOT TWRP! If it does, boot back to Fastboot and reflash TWRP.

    Once you can boot to TWRP, push both the rom and magisk via CMD line:

    adb push rom.zip /tmp/
    adb push magisk.zip /tmp/
    For ease, I suggest copying both files to the Minimal ADB folder location e.g. “C:\Program Files (x86)\Minimal ADB and Fastboot”. And renaming them to: “rom.zip” and “magisk.zip”.

    This step is very important!! You must go to the Wipe menu and select: Format Data, then type “yes” to continue and then: do a Factory reset, which also wipes: Data, Caches and Format Data. If you skip this step you won’t be able to install a lot of important apps and will have to start over.

    Now that you have pushed both the rom & magisk and wiped everything you needed to. Install the ROM immediately after install magisk.zip (in that order) both located in /tmp/.

    The installation will take a couple of minutes (if your screen dims, don’t worry that’s just TWRP screen dimming, touch the screen to keep it awake!) once finished with no errors, then reboot and chose Do Not Install the TWRP app when prompted.

    The phone will take a few seconds to reboot and show the first MI splash screen, but it should start booting. After a couple of minutes, you should see the initial boot screen! Perform the setup (connecting to Wi-Fi, adding my Google account etc.).

    Once finished setting up, you may notice that magisk was not installed, if that happens, you can install the APK version and follow the prompts and reboot.

    Once rebooted, confirm that magisk is now installed. If it is, I suggest installing SafetyNet and confirming your phone passes!

    If it passes, you have successfully installed and rooted the Xiaomi.eu rom!

    Also, when updating with each weekly I recommend the below as an alternative to using the built in Updater app. The reason being is I believe the updater app automatically reboots after it installs, which if you're rooted means you'll lose it. That then means you have to reboot back to twrp, reflash magisk, reboot, reinstall modules, reboot again etc.

    Therefore to update a weekly:

    Download the rom manually
    Reboot to twrp
    Wipe system and caches
    Flash the rom and magisk
    Reboot

    Optional: I also disable my substratum theme too before updating and reapply afterwards. Whether it's needed or not I'm not too sure, so give it a try either way
    4
    what a horrible way with almost 30 steps! But the worst thing is, there are another 30 steps before that. You need to do lot of preparation in the settings, and the online account (collecting lot of private data), and the PC software (again collecting) and read long guides on miui.com. The core software on phone even asks you for sms verification. Same with online account - you do need real phone number, real email, everything is endlessly veridied while as the privacy policies say, tons of data are collected. And Xiaomi will monitor your phone use, you need to be active, and you need to keep that breached account with you on the phone for the bootloader to stay unlocked (can't just clean up their **** after this "2 week procedure"). This is so far the worst rooting procedure. Absolutely extreme big brother behaviour. Who's ready to sell their person to a chinese company?
    You are so overreacting...

    BTW, it's not that 30 steps process, the guide just tells all the process that the owner of this thread has met to let the others who have less experience could see how things possibly could be.

    To me it's just like this:
    1. Unlock bootloader
    2. Flash recovery
    3. Boot recovery, format (wipe stock rom encryption), reboot recovery, copy files, flash rom, flash Magisk (if you want it)
    4. Reboot

    And yes, how many steps depends on how detail you want to tell.

    P/S: if you hate Xiaomi that much, just buy a Samsung phone or and other brands and have fun with it.

    Sent from my MI 9 using Tapatalk
    2
    so i went to return the device.. then i thought i have still 2 weeks to return it, so i bought another mobile for the waiting period. but if it doesn't come sooner than 360, it's over.
    cannot use the phone as TitaniumBackup doesn't work for example, and i won't bother configuring anything manually, nevermore. it will lay down on the desk in the Xiaomi way.
    btw i didn't find 'running services' in dev options, Xiaomi must be hiding some spy/ad stuff there.
    maybe the S10 recovery will be released sooner (tic toc), Mi9 will then go swiftly back to the shop. as they wish.

    i perversely found the lack of SD card as a benefit during flashwork with these low end flagships (6T,Mi9) because my PC UHS3 reader is also USB-C so switching between PC and mobile is easy, without need to pull sd card with a pin.
    The grammar of this post gave me cancer.

    Too bad you didn't like the Mi 9.

    Skickat från min MI 9 via Tapatalk
    2
    Play Store just started crashing but I rebooted, went into Swift Installer and there's an update which fixed it! So maybe you will have luck now

    But if Substratum is great for you, good! I've used that for my last few devices, and all Swift Installer is, is a nifty package.

    WhatsApp's ticks are the same as the accent which is cool, but I'm utterly obsessed with black for AMOLED screens. It's perfect and dark and and and... And some people I show my devices to ask how I use it without eyestrain haha

    I am just happy that there's support for black theming. And even in your case, where it was not perfect, you have alternatives and want the same goal - and I'm. loving. This phone today.

    Between you finding me the ebay deal, this thread and guide, and the support of XDA, its fast becoming the best phone I've ever had.

    ... But I can't stop tinkering! Didn't you say Edxposed was the Xposed equivalent? :)

    Yeah I'm back on substratum and all is well, apart from play store but I can't live with that for now :)

    Yeah try it out, Edxposed is working great!

    https://magiskroot.net/download-xposed-for-android-pie/
    2
    For me there was no problem to go on Xiaomi.eu Rom, My steps were to Unlock the Bootloader - Restart to MIUI and i also always Enable ADB Debugging. Then boot to Fastboot and flash the TWRP , go to TWRP Format Data, Reboot again to TWRP, then from the PC transfer via USB Kabel the Xiaomi.eu Rom to the Mi9 Folder and Install. I didnt use Magisk because of the full support for Payment apps. Everthing works like charm now. Im looking foward to see nice Pixel Roms on this Device :)