[Xiaomi Mi 11 Ultra] TNTBomber178:
Welcome to my thread. Today I am going to teach you how to install a custom recovery on the device and how to recover the original boot files on the phone to modify them. After modifying those files you will have root on the device. A lot of time and effort has been put into getting this to work. The custom recovery that we will be using is TWRP Recovery.

Note: Modifying your device will void the manufacturer's warranty.

All modifications made to your device are done at your own risk and you claim full

responsibility if the device is damaged or if data is lost.​

First, we are going to enable OEM Unlock and USB Debugging. To do so, you will follow the steps below.

1. Sign in to your Mi Cloud Account on your phone.

2. Tap the “Settings” menu on your Mi 11 Ultra, then tap the “About Phone” option.

3. Tap the “MIUI Version” option several times until you see the “You are now a developer” message.

4. Tap the “Additional Settings” Menu, then tap the “Developer options” on your phone.

5. Activate the “OEM Unlock” option, then activate the “USB Debugging” option on your phone.

6. Tap the “Mi Unlock Status” option.

7. Tap “Agree” and then tap the “Add account and device” option on your phone.

8. Turn off your phone, then press the volume down button and the power button simultaneously to put your phone into fastboot mode.

9. Connect your phone to your PC via a USB cable.

10. Download the miflash ZIP file.

11. Extract the miflash unlock tool ZIP file. You will find the Mi USB Driver.exe file and the miflashunlock.exe file after extracting it.

12. Install the Mi USB driver on your PC.

13. Run the miflashunlock.exe file on your PC.

14. Tap the Agree button and then Sign in with your Mi Account after running the miflash_unlock.exe.

15. Click the “Unlock” button, then click the “Unlock anyway” button within the miflash tool to start the process.

16. Click the “Reboot phone” button after you see the “Unlocked successfully” message.

Downloads:

Unlock tool: https://en.miui.com/unlock/download_en.html

Additionally, we will need to have TWRP flashed to the recovery of the phone.

1. We will need to have ADB installed on the computer so download the 15 Second ADB Installer.

2. Run the ADB-Setup.exe.

3. Open a CMD terminal as an Administrator.

4. Type in the command: CD C:/ADB.

5. Type in the command: ADB Devices, make sure that there is a device showing up.

6. Download the TWRP.img to the ADB folder located on C:/ADB.

7. Make sure that you do not have a password or code lock on the device. There can not be any lock on the lock screen.

8. Type the command ADB Reboot Bootloader.

9. Type the command Fastboot Boot TWRP.img.

10. Navigate to the Advanced menu of TWRP and tap on “Install Recovery Ramdisk”.

11. Navigate back to the main menu then tap on Reboot and tap on Recovery.

Downloads:

15 Second ADB Installer: https://xdaforums.com/t/official-to...vers-15-seconds-adb-installer-v1-4-3.2588979/

TWRP image: https://drive.google.com/drive/folders/1ztP266XjxteVk8pxcD7-sD-IxihmODPV?usp=sharing

Now we will copy the three boot files on the phone and make backups.

1. Navigate to Mount on the root menu or TWRP.

2. Select the System Partition and Data partition then go back to the menu.

3. Navigate to Advanced then Terminal.

4. Type the command dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img.

5. Type the command dd if=/dev/block/bootdevice/by-name/boot_a of=/sdcard/boot_a.img.

6. Type the command dd if=/dev/block/bootdevice/by-name/boot_b of=/sdcard/boot_b.img.

7. After all the commands have been entered you can now exit back to the system by rebooting to the system in the Reboot menu.

8. Next, we will install Magisk on the phone to modify the boot files, download the Magisk.apk file on your phone.

9. Open the apk and install the Magisk.apk on the device. You will have to enable Unknown Sources if you have not already.

10. Open Magisk and select install on the Magisk tab.

11. Under Method tap the Select and Patch a File and select the boot.img file.

12. Press the LET'S GO button after you have selected the file. (Make sure to note down the name of the Output file for each file).

13. Repeat steps 11 and 12 for boot file boot_a.img and boot file boot_b.img.

Downloads:

Magisk: https://github.com/topjohnwu/Magisk/releases

Now we will flash the boot files to the phone and we will be rooted!

1. Copy the files you just made from the storage of the phone under /Internal shared storage/Download/(Filenames) to the ADB folder located on C:/ADB

2. Restart the phone and once the phone screen turns off hold the Volume Down button to boot into fastboot.

3. Now this is where it is very crucial to ensure you know what each file corresponds to for the boot files. Type in the command Fastboot flash boot (Modified file name for boot.img).

4. Type in the command Fastboot Flash Boot_a (Modified file name for boot_a.img).

5. Type in the command Fastboot Flash Boot_b (Modified file name for boot_b.img).

6. Then type the command Fastboot reboot

7. Load Magisk and verify that it is indeed installed.

8. Boom rooted!