This is a complete guide for rooting Xiaomi Pocophone and keeping the stock recovery on it. That means you will still able to receive OTA updates on your device.
Tools you Need
- TWRP 3.2.3-x Unofficial with working DECRYPTION 12/10/2018
- Minimal ADB Fastboot
- Magisk Manager App
- USB Driver
How to Unlock Bootloader on Pocophone F1
Before starting the procedure, we highly recommend you to back up all the files on your device.
- First, go to Settings and tap on About phone.
- Locate the MIUI version and tap on it 6-8 times.
- Go to Additional Settings and open the section Developer Options.
- Make sure you turn on USB Debugging and OEM Unlocking.
- Now go to Settings and open Developer Options.
- Tap on Mi Unlock Status and select Add Account & Device. Then log in with your MI account. (Your Mi account should be verified)
- Now go to MIUI Unlock site and login with your MI account.
- Once you logged in, you should be able to download Unlock bootloader and MI Unlock without any further steps (this was the case when I was performing the procedure).
- If you aren’t able to download the tools right away, apply and wait for confirmation.
- Install Xiaomi USB Drivers (from the link provided above). You can also install it by MI Unlock app settings option.
- Launch MI Unlock app and turn off your phone manually.
- Now press and hold Volume down button and Power button. Your device should enter into Fastboot Mode.
- Connect your Xiaomi device to your PC using a USB cable and click on Unlock.
Boot into TWRP
- Launch Minimal ADB Fastboot terminal as Administrator on your PC.
- Turn off your Xiaomi device.
- Connect the phone to your PC.
- Press and hold Power and Volume down buttons until Fastboot screen shows up.
- Type the following command in your
Minimal ADB Fastboot terminal:
Now your phone should show up. (something like this “9e00a7e3 fastboot”)
- Type the following
fastboot boot <path to your TWRP .img recovery file>
Your phone should boot up into TWRP recovery.
- If it requires a password, click Cancel.
- If it is asking for keeping/system read only, swipe to allow the modifications.
- Type the following command:
Now you have access to Super User shell via ADB.
- While in TWRP, go to Advanced and tap on File Manager.
- Now go to “dev/block/platform/” then open the “soc” folder if it is there.
- Here you can see folders and files. You will need to open the folders and search for the one called “by-name.” (it should be in one of the folders) In my case it was located in /dev/block/platform/soc/1d94000.ufshc.
- Now we need the name of the folder
that contains “by-name”
example: /dev/block/platform/soc/FOLDER NAME/by-name
soc – you should
also have this folder if present.
FOLDER NAME – the folder which “by-name” is located in.
- Into the terminal type the
following command (replace soc and FOLDER NAME respectively):
ls -al /dev/block/platform/soc/FOLDER NAME/by-name
- Now you will see the partitions of
your phone. You will need to locate your boot
lpwxrwxrwx 1 root root 25 Feb 15 1970 boot -> /dev/block/sde45
Pulling your Stock Boot.img
- Launch ADB Shell terminal and type the following command (replace sde45 with your partition – see the step above):
dd if=/dev/block/sde45 of=/sdcard/boot.img
- Now type:
- Then type the following:
adb pull /sdcard/boot.img
Your stock boot.img should be downloaded into your Minimal ADB Fastboot folder.
And you are done.
To install OTA Updates you will need to do one of the following methods.
- Uninstall Magisk using Magisk Manager.
- Install the OTA update.
- Pull boot.img and patch it again
- Now flash the newly patched boot.img or try with the last one you had before the OTA update.
Keep in mind that with this tutorial we are not flashing TWRP. We are just booting the device into TWRP without flashing it. That way we are accessing to Super User via ADB.