Hello, friends.
I am a little bit confused about (present) capabilities of this TWRP, so I would like to make some questions.
I am still in the unlocking process, so want to make my mind in advance about what I will face when "repairing" the X· Pro.
The phone has come with EU stock and my idea is to keep it.
Target; Root the stock with Magisk. ONLY
Method: Patch the boot and flash it in boot partition
So the idea is to
1.- Install Magisk in the Phone
2.- Copy boot.img in the phone
3.- Patch the boot image
4.- Fastboot boot this twrp
5.- Locate the output of the step 3.- and flash it in boot partition using this twrp
6.- Reboot to System
Do you think this will work?
As you are and want to continue on stock ROM, you don't need, better, it's useless to flash TWRP or any other custom recovery: once booted the stock MIUI will kill it.
What you need to do is:
1-be sure bootloader is really unlocked: when turning on device there will be an unlocked lock on the top of the screen, above the "MIUI"
2- on mobile: download Magisk.apk (v23+ from official github) and install
3-on PC: download EXACTLY same stock ROM you run on mobile, recovery file format (a .zip). Same version, location, everything.
Open it with any ZIP tool and grab the boot.img file from it.
4-copy the boot.img file from PC to mobile.
On mobile: run Magisk and choose to install / patch a file / point it to boot.img
Magisk will do its job and generate a "patched-boot.img" (details on Magisk github, on instruction / documentation section).
5-copy the PATCHED boot.img from mobile to PC.
On mobile: put it on fastboot mode (power + vol-)
On PC: flash the PATCHED boot.img to mobile BOOT (by using fastboot command line)
6-On mobile: reboot and run Magisk to finish its settings as you prefer.
7-DO NOT re lock your bootloader. If you decide to do that sometime, ONLY do it AFTER a FULL flash of MIUI stock + reboot to check everything is fine (will replace boot + recovery + firmware + kernel + rom + remove root....everything to stock). If booting fine and clean, then only now you should relock bootloader.
And to flash stock MIUI do NOT use TWRP or any other custom recovery, to avoid ARB (anti rollback) problems and others.