[Xiaomi 12S Ultra] Nabicook:
A very well known disclaimer : your warranty is void after doing this. And I am not responsible for any damage caused on your device. It's all on you.

Make sure to have your google play store apk downloaded somewhere.

Unlocking the bootloader will wipe all data AND your play store.

but you don't have to use xiaomi google play service installer or such.

This phone has built in google service, and just the play store goes away by factory reset.

1.Mi Unlock - link​

Download the tool on pc, enable developer options on your phone

(My device - All specs - tap miui version 7 times).

Go to dev options(Additional Settings) and enable OEM unlocking.

Right below, there is Mi Unlock Status.

Link the device to your Mi account.

From this moment, you have to wait 168 hours

WITHOUT logging out Mi account on your phone

or adding another device on your Mi account.

Else, the counter will reset.

The counter is server-sided.

No need to worry about restarting or turning off the device during this period.

Goto Mi account and add your PHONE NUMBER to the account.

Else, you will face loading loop on Mi unlock tool after typing in the verification code.

Once that is done, boot to fastboot

(turn off device, then hold power and volume down, or use 'adb reboot fastboot')

and use Mi unlock tool to make sure you see

"try again after 168 hours" message.

That's it. Come back after 168 hours(1 week) and unlock your phone using the tool.

Your bootloader will be unlocked now.

ADB/Fastboot - just in case you don't have it

go setup fastboot for later steps.

2.Rooting​

There are two ways of rooting now that we have a twrp.

/

Method A : (TWRP Root) way easier.​

TWRP - please refer to my post

download twrp, and use fastboot.

fastboot boot twrp-3.6.2_A12-thor-unofficial.img

(or your img name)

Once you boot into twrp,

go to "Advanced" and "flash this twrp."

when it's done, do not reboot,

go back and in the same Advanced menu, install magisk(not alpha). That's it!

Now reboot to the system,

you will see brown magisk app that basically does nothing but infinite download,

ignore the app and get yourself a magisk app below,

once installed and opened it, magisk will tell you to reboot once more.

Now you are fully rooted!

Magisk - link​

/

Method B : (Magisk root)​

if you are going to use twrp, just follow method A else you have to go back to the bootloader again and do all that stuff. Twrp method does all at once.

Magisk patched boot img - 13.0.7 Latest (Magisk original 25.2)

or the same file attached below.

Magisk Patched boot.img - 13.0.5(Magisk canary)

Basically download the ROM, get boot.img out of it, and use Magisk to patch it.

Now put your device to fastboot mode, place boot.img to your ADB folder (C:/adb) and type these one by one.

fastboot flash boot_ab boot.img

fastboot reboot

now you have a rooted device!

3. Safetynet Fix -link updated.​

Apply this patch via Magisk

Enable Zygisk, enforce DenyList,

and then toggle these options in cofiguration.

View attachment 5678797

Now you should be able to pass the Safetynet test.

Also add you banking apps or anything it shouldn't detect root and Magisk.

Feel free to leave any questions below.

For advanced Users, I am testing out Konabess since they added SD 8+ gen 1 support. Let me know your thoughts! I can confirm that the tool works, but havent tested enough to verify if it acutally works.

Go use KonaBess if you are into serious tweaking! It works