FORUMS

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

3,288 posts
Thanks Meter: 1,146
 
By cd993, Senior Member on 19th March 2019, 07:49 PM
Post Reply Email Thread
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-...ba7c44716e87ff

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

https://forum.xda-developers.com/app...mless-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!yNqOiVoo3...G7iZrRCe19V2Nc


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
The Following 53 Users Say Thank You to cd993 For This Useful Post: [ View ] Gift cd993 Ad-Free
19th March 2019, 08:05 PM |#2  
The Dutchman's Avatar
Senior Member
Thanks Meter: 30
 
More
Awesome, all files at the ready! BTW get the latest MIUI from HERE or HERE.
Make sure you download the xiaomi.eu_multi_MI9_xxx.zip.
19th March 2019, 08:17 PM |#3  
OP Senior Member
Flag London
Thanks Meter: 1,146
 
More
Quote:
Originally Posted by The Dutchman

Awesome, all files at the ready! BTW get the latest MIUI from HERE or HERE.
Make sure you download the xiaomi.eu_multi_MI9_xxx.zip.

Thanks, first post updated!
The Following User Says Thank You to cd993 For This Useful Post: [ View ] Gift cd993 Ad-Free
19th March 2019, 08:55 PM |#4  
*justintime*'s Avatar
Senior Member
Thanks Meter: 475
 
More
Quote:
Originally Posted by cd993

Thanks, first post updated!

You have used the Magisk Canary build I presume?

And great job for writing it down.... Now I remember the same culprits I had of flashing TWRP.
The Following User Says Thank You to *justintime* For This Useful Post: [ View ] Gift *justintime* Ad-Free
19th March 2019, 09:00 PM |#5  
OP Senior Member
Flag London
Thanks Meter: 1,146
 
More
Quote:
Originally Posted by *justintime*

You have used the Magisk Canary build I presume?

And great job for writing it down.... Now I remember the same culprits I had of flashing TWRP.

That's right:

Magisk-v18.2-51110866(18116).zip

If I can find the link (of if someone can link me to it) I'll update the posy
19th March 2019, 09:11 PM |#6  
*justintime*'s Avatar
Senior Member
Thanks Meter: 475
 
More
Quote:
Originally Posted by cd993

That's right:



Magisk-v18.2-51110866(18116).zip



If I can find the link (of if someone can link me to it) I'll update the posy

Here ya go.

https://forum.xda-developers.com/app...-edge-t3839337
19th March 2019, 09:38 PM |#7  
OP Senior Member
Flag London
Thanks Meter: 1,146
 
More
Quote:
Originally Posted by *justintime*

Here ya go.

https://forum.xda-developers.com/app...-edge-t3839337

Thanks, updated!
19th March 2019, 10:23 PM |#8  
OP Senior Member
Flag London
Thanks Meter: 1,146
 
More
Quote:
Originally Posted by Rommco05

Good stuff for early roots without not tested stuff like twrp and magisk 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

Yeah I agree it's kinda overkill, being a a full run down - when I get time I'll make a shorter condensed version
The Following User Says Thank You to cd993 For This Useful Post: [ View ] Gift cd993 Ad-Free
20th March 2019, 12:44 AM |#9  
Member
Thanks Meter: 4
 
More
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?
20th March 2019, 12:56 AM |#10  
Senior Member
Flag Milan, London & Zürich
Thanks Meter: 85
 
More
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
20th March 2019, 12:57 AM |#11  
OP Senior Member
Flag London
Thanks Meter: 1,146
 
More
Quote:
Originally Posted by perryano

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
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes