Xiaomi Poco F1 [ROOT, Unlock Bootloader, with STOCK RECOVERY, OTA UPDATES etc!]

Search This thread

exepowered

Member
Oct 8, 2018
36
42
WARNING: Before attempting to root your device, do note that by unlocking your bootloader and modifying your device with root, ROMs, etc... you are NOT risking voiding your warranty!
I am NOT responsible for what you do to your device either, so follow these instructions at your own risk. Make sure you know what you're doing, it's best to understand the process rather than just copy and paste commands and such.


Hello!
Some people asked me how to root Xiaomi Pocophone F1 with magisk and to keep stock recovery on it, to recive OTA updates etc. so this is the complete guide :)

Sorry for all language misstakes, my english is not perfect, so please, if you have found anything, inform me via private message, so I can edit the post and correct it.


1. Unlock Bootloader Unlocking Bootloader Explanation and Troubleshooting for NEWBIES | thanks to @madsponge26
2. TWRP boot (not flashing, you will keep your stock recovery)
3. Pull stock boot.img from your phone (method II)
4. Boot.img patching (Patching stock boot.img with magisk manager app) (method II)
5. Patched magisk boot.img flashing (method II)

Tools and Information we need
USB Driver
Minimal ADB Fastboot
TWRP 3.2.3-x Unofficial with working DECRYPTION 12/10/2018
Magisk Manager App


How to Unlock Bootloader


Back up Files (Internal Storage)

1. Go to Settings > About phone
2. Find the MIUI Version and press 6-8 times
3. Go to Additional Settings > Developers Options
4. Press and check USB Debugging and OEM Unlocking
5. Go to Settings > Developers Options > Mi Unlock Status > Add Account & Device and log in with your MI account.

6. Go to MIUI Unlock website
7. Login to your MI account
8. You should be able to download Mi Unlock and unlock bootloader without filling any forms or applying for permissions (I was able to do that this way)
- if not, then apply and wait.

*Install Xiaomi USB Drivers from link above or by Mi Unlock app settings option.*

In MI Unlock app:
1. Shut down your phone manually, and hold Volume down key and Power button to enter Fastboot mode.
2. Connect your phone to PC using USB cable and click "Unlock".

***Mi account should verified.



Booting into TWRP, getting ADB SuperUser access, pulling stock boot.img


1. Open Minimal ADB Fastboot terminal AS ADMINISTRATOR!
2. Shut down your phone
NOW FOCUS
3. Connect your phone to your PC and hold Power and Volume Down buttons until Fastboot screen will be visible.
4. Follow the steps:

Put that command in your Minimal ADB Fastboot terminal:
Code:
fastboot devices
Your phone should be visible.
example: ,,7e00a8e3 fastboot"

Code:
fastboot boot <path to your TWRP .img recovery file>
Your phone should be booted into TWRP recovery.
If ask's for password: CLICK CANCEL
If ask's for keeping /system read only: swipe (allow modifications)


UPDATE:
NOW YOU CAN JUST FLASH MAGISK.ZIP AND REBOOT
There was no TWRP with working decryption before.


Method II:

Code:
adb devices
Your phone should be visible.
example: ,,7e00a8e3 recovery"

Code:
adb shell
Here we go! We got access to Super User shell via ADB ^^

and now the magic:

- In TWRP recovery, go to Advanced > File Manager
- Go to "/dev/block/platform/" folder (go into ,,soc" folder, if you have one there)
- Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them. || For me it was /dev/block/platform/soc/1d84000.ufshc and ,,by-name" inside of it.
- At the end, we need name of the folder contains ,,by-name" inside for this string: /dev/block/platform/soc/FOLDER NAME/by-name
- Now go to your ADB Shell terminal and put that command:

soc = you should have this folder too, if not; ignore (please confirm that in comments)
FOLDER NAME = your folder with ,,by-name" inside
Code:
ls -al /dev/block/platform/[COLOR="DarkOrange"][B]soc[/B][/COLOR]/[COLOR="Red"][B]FOLDER NAME[/B][/COLOR]/by-name

Now you should see partitions of your phone.
You need to find your boot partition, for me it was:
Code:
lrwxrwxrwx    1 root         root                16 Feb 15  1970 [B][COLOR="Red"]boot[/COLOR][/B] -> [B][COLOR="Red"]/dev/block/sde45[/COLOR][/B]
--

Pulling our stock boot.img!

Go to your ADB Shell terminal and put that commands:
Replace sde45 with your partition from step above*
Code:
dd if=/dev/block/[B][COLOR="Red"]sde45[/COLOR][/B] of=/sdcard/boot.img

Code:
exit

Code:
adb pull /sdcard/boot.img
Our stock boot.img should be downloaded into our Minimal ADB Fastboot directory!

Code:
adb reboot

Stock boot.img patching and flashing (For Method II only)


1. Save your stock boot.img into phone's internal storage/sdcard
2. Download latest Magisk Manager from MAGISK GITHUB REPO
3. Install Magisk Manager on your phone.
4. Open Magisk Manager, check Keep Force Encryption
5. Click Install > Install > Boot Image Patching > Select your stock boot.img and patch it.
6. Save your patched boot.img to your computer

7. Shut down your phone
8. Open Minimal ADB Fastboot terminal on your PC
9. Connect your phone to your PC and hold Power and Volume Down buttons until Fastboot screen will be visible.
4. Follow the steps:

Enter commands:
Code:
fastboot devices
Your phone should be visible.
example: ,,7e00a8e3 fastboot"

Code:
fastboot flash boot <path to your patched_boot.img>

Code:
fastboot reboot

5. Open Magisk Manager, your phone should be rooted.
6. Download Root Checker from Play Store and check if your device is rooted.


FOR OTA UPDATES:
- Uninstall magisk with Magisk Manager App (Restore Image option)
- Apply OTA update
then:

Method I:
- Boot into twrp (version with working decryption)
- Flash Magisk ZIP again

Method II:
- Pull boot.img and patch it again
- Flash new patched boot.img



If you have any questions or problems, type those in the comment below, I will try to help you :)

Stock Mi Recovery 3.0 for Pocophone F1: GOOGLE DRIVE
 
Last edited:

exepowered

Member
Oct 8, 2018
36
42
Before flashing OTA update, you need to uninstall magisk and install it again after update.
 
Last edited:
  • Like
Reactions: HenriFred

sanjay0501

Senior Member
Apr 25, 2007
281
97
Thanks for a great tutorial, this is what I needed, just a few queries.
1. After ota will I retain root or again the whole process will have to be repeated.
2. In this process if I start with an unlocked bootloader with 8.10.9 beta rom any chance or need to wipe data or internal storage.
3. What if after flashing twrp, I just flash magisk and reboot without flashing force encryption disabler, stock recovery will automatically overwrite twrp, will I lose any data or root.
 

exepowered

Member
Oct 8, 2018
36
42
Thanks for a great tutorial, this is what I needed, just a few queries.
1. After ota will I retain root or again the whole process will have to be repeated.
2. In this process if I start with an unlocked bootloader with 8.10.9 beta rom any chance or need to wipe data or internal storage.
3. What if after flashing twrp, I just flash magisk and reboot without flashing force encryption disabler, stock recovery will automatically overwrite twrp, will I lose any data or root.

1. For now you need to uninstall magisk root before any OTA update, and install it again after it. I don't figured it out yet, how to update OTA and keep magisk.
2. Mi Unlock App will tell you if your internal storage needs to be wiped or not after connecting your phone in fastboot mode.
For me there was a red text that my internal storage will be wiped, for you it will be propably similar.

3. In this tutorial you are not flashing TWRP, you are just booting your phone into TWRP without flashing it to get acess to Super User via ADB and to pull stock boot.img to patch it later with magisk.
Target of this tutorial is to keep stock recovery, so it wont be overwrited because you will be already using it. It shouldn't affect magisk root, but
it would be an good idea to check ,,Keep Force Encryption" in Magisk Manager app before patching boot.img if you are not going to flash Disable Force Encryption zip etc.
 
Last edited:

sanjay0501

Senior Member
Apr 25, 2007
281
97
1. It depends propably on OTA update type. Can't answer for sure now, but OTA is comming on Friday with new version of MIUI 10 Beta so I will check that.
2. Mi Unlock App will tell you if your internal storage needs to be wiped or not after connecting your phone in fastboot mode.
For me there was a red text that my internal storage will be wiped, for you it will be propably similar.

3. In this tutorial you are not flashing TWRP, you are just booting your phone into TWRP without flashing it to get acess to Super User via ADB and to pull stock boot.img to patch it later with magisk.
Target of this tutorial is to keep stock recovery, so it wont be overwrited because you will be already using it. It shouldn't affect magisk root, but
it would be an good idea to check ,,Keep Force Encryption" in Magisk Manager app before patching boot.img if you are not going to flash Disable Force Encryption zip etc.
Thanks for ur help.
 

PePsiGiK

New member
Oct 11, 2018
2
0
Hi, thanks for the tutorial but I have a problem when unlocking my bootloader, when I am on the Mi unlock application and I connect my phone in fastboot mode mi unlock do not recognize my phone and therefore impossible to click unlock.
My computer recognizes the phone well but not the application do you have solutions?
 

WasIstDenn

Member
Jan 2, 2013
17
3
hey dudes, can someone please upload the stock recovery for me?
everytime the phone wants to install an ota it just boots into twrp and i have to manually reboot it from there.
so if i just flash the stock poco recovery the phone would updtate the ota normally and root still would be there?
 
  • Like
Reactions: 22sumit

exepowered

Member
Oct 8, 2018
36
42
hey dudes, can someone please upload the stock recovery for me?
everytime the phone wants to install an ota it just boots into twrp and i have to manually reboot it from there.
so if i just flash the stock poco recovery the phone would updtate the ota normally and root still would be there?

Stock Mi Recovery 3.0 for Pocophone F1: GOOGLE DRIVE

Before OTA update, uninstall magisk via Magisk Manager App, then after update install it again using my guide, otherwise you will get bootloop.
I don't figured it out yet, how to keep magisk live when updating.
 

bizid

Member
Oct 7, 2010
36
3
Stock Mi Recovery 3.0 for Pocophone F1: GOOGLE DRIVE

Before OTA update, uninstall magisk via Magisk Manager App, then after update install it again using my guide, otherwise you will get bootloop.
I don't figured it out yet, how to keep magisk live when updating.

So after uninstalling magisk and applying OTA, we need to do whole process again? pull out boot - patch it and flash it?
at this point it makes more trouble than just installing twrp.
 

anirudh281998

Senior Member
May 3, 2016
201
27
Delhi
For now there is twrp with decryption working so you can flash magisk ZIP, with booted twrp (not flashed).
I used the same boot I had before OTA and there was no problems too.

You extracted the boot image, patched it using magisk, and flashed it using fastboot.
Instead, can't we just install Magisk.zip using twrp? This way it saves us from running all those commands.

For OTA, we can uninstall magisk and flash original stock recovery, then apply ota, then flash twrp and magisk.zip.

Correct me if I am wrong.
Thanks
 

exepowered

Member
Oct 8, 2018
36
42
You extracted the boot image, patched it using magisk, and flashed it using fastboot.
Instead, can't we just install Magisk.zip using twrp? This way it saves us from running all those commands.

For OTA, we can uninstall magisk and flash original stock recovery, then apply ota, then flash twrp and magisk.zip.

Correct me if I am wrong.
Thanks

I know what I have done.
But if the same patched boot.img is not working after uninstalling and OTA update, you can skip other steps and just boot into twrp [version with working decryption] (everything is in my post) and flash ZIP. ZIP does the same thing, it patches boot.img so it's just faster for now. When I was doing this tutorial, there was no twrp with working decryption for poco...

You can try to flash same patched boot.img you had before OTA. Last time it worked for me.

You don't need to flash twrp too...
Just uninstall magisk
Do OTA update
BOOT into twrp (version with working decryption)
Flash magisk.zip
reboot
 
  • Like
Reactions: [email protected]

MasterFURQAN

Senior Member
Dec 12, 2013
802
178
28
Srinagar
Xiaomi Poco F1
Google Pixel 5a
I know what I have done.
But if the same patched boot.img is not working after uninstalling and OTA update, you can skip other steps and just boot into twrp [version with working decryption] (everything is in my post) and flash ZIP. ZIP does the same thing, it patches boot.img so it's just faster for now. When I was doing this tutorial, there was no twrp with working decryption for poco...

You can try to flash same patched boot.img you had before OTA. Last time it worked for me.

You don't need to flash twrp too...
Just uninstall magisk
Do OTA update
BOOT into twrp (version with working decryption)
Flash magisk.zip
reboot
I flash the decryption TWRP and install magisk but the phone bootloops back to recovery no matter what I try. I have to uninstall magisk using the official installer, only then the phone lets me boot into system but obviously I lose root. Any guesses what I should do to get root with formatting storage ?
 

CM-Tester

Senior Member
Oct 20, 2016
345
160
Düsseldorf
Is it equal, on wich (original) ROM/Software-Verisom i´am for unlocking, flashing twrp and rooting ?

Or is it the best, to NOT update the original Rom OTA and after that unlocking, flashing twrp and rooting ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    WARNING: Before attempting to root your device, do note that by unlocking your bootloader and modifying your device with root, ROMs, etc... you are NOT risking voiding your warranty!
    I am NOT responsible for what you do to your device either, so follow these instructions at your own risk. Make sure you know what you're doing, it's best to understand the process rather than just copy and paste commands and such.


    Hello!
    Some people asked me how to root Xiaomi Pocophone F1 with magisk and to keep stock recovery on it, to recive OTA updates etc. so this is the complete guide :)

    Sorry for all language misstakes, my english is not perfect, so please, if you have found anything, inform me via private message, so I can edit the post and correct it.


    1. Unlock Bootloader Unlocking Bootloader Explanation and Troubleshooting for NEWBIES | thanks to @madsponge26
    2. TWRP boot (not flashing, you will keep your stock recovery)
    3. Pull stock boot.img from your phone (method II)
    4. Boot.img patching (Patching stock boot.img with magisk manager app) (method II)
    5. Patched magisk boot.img flashing (method II)

    Tools and Information we need
    USB Driver
    Minimal ADB Fastboot
    TWRP 3.2.3-x Unofficial with working DECRYPTION 12/10/2018
    Magisk Manager App


    How to Unlock Bootloader


    Back up Files (Internal Storage)

    1. Go to Settings > About phone
    2. Find the MIUI Version and press 6-8 times
    3. Go to Additional Settings > Developers Options
    4. Press and check USB Debugging and OEM Unlocking
    5. Go to Settings > Developers Options > Mi Unlock Status > Add Account & Device and log in with your MI account.

    6. Go to MIUI Unlock website
    7. Login to your MI account
    8. You should be able to download Mi Unlock and unlock bootloader without filling any forms or applying for permissions (I was able to do that this way)
    - if not, then apply and wait.

    *Install Xiaomi USB Drivers from link above or by Mi Unlock app settings option.*

    In MI Unlock app:
    1. Shut down your phone manually, and hold Volume down key and Power button to enter Fastboot mode.
    2. Connect your phone to PC using USB cable and click "Unlock".

    ***Mi account should verified.



    Booting into TWRP, getting ADB SuperUser access, pulling stock boot.img


    1. Open Minimal ADB Fastboot terminal AS ADMINISTRATOR!
    2. Shut down your phone
    NOW FOCUS
    3. Connect your phone to your PC and hold Power and Volume Down buttons until Fastboot screen will be visible.
    4. Follow the steps:

    Put that command in your Minimal ADB Fastboot terminal:
    Code:
    fastboot devices
    Your phone should be visible.
    example: ,,7e00a8e3 fastboot"

    Code:
    fastboot boot <path to your TWRP .img recovery file>
    Your phone should be booted into TWRP recovery.
    If ask's for password: CLICK CANCEL
    If ask's for keeping /system read only: swipe (allow modifications)


    UPDATE:
    NOW YOU CAN JUST FLASH MAGISK.ZIP AND REBOOT
    There was no TWRP with working decryption before.


    Method II:

    Code:
    adb devices
    Your phone should be visible.
    example: ,,7e00a8e3 recovery"

    Code:
    adb shell
    Here we go! We got access to Super User shell via ADB ^^

    and now the magic:

    - In TWRP recovery, go to Advanced > File Manager
    - Go to "/dev/block/platform/" folder (go into ,,soc" folder, if you have one there)
    - Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them. || For me it was /dev/block/platform/soc/1d84000.ufshc and ,,by-name" inside of it.
    - At the end, we need name of the folder contains ,,by-name" inside for this string: /dev/block/platform/soc/FOLDER NAME/by-name
    - Now go to your ADB Shell terminal and put that command:

    soc = you should have this folder too, if not; ignore (please confirm that in comments)
    FOLDER NAME = your folder with ,,by-name" inside
    Code:
    ls -al /dev/block/platform/[COLOR="DarkOrange"][B]soc[/B][/COLOR]/[COLOR="Red"][B]FOLDER NAME[/B][/COLOR]/by-name

    Now you should see partitions of your phone.
    You need to find your boot partition, for me it was:
    Code:
    lrwxrwxrwx    1 root         root                16 Feb 15  1970 [B][COLOR="Red"]boot[/COLOR][/B] -> [B][COLOR="Red"]/dev/block/sde45[/COLOR][/B]
    --

    Pulling our stock boot.img!

    Go to your ADB Shell terminal and put that commands:
    Replace sde45 with your partition from step above*
    Code:
    dd if=/dev/block/[B][COLOR="Red"]sde45[/COLOR][/B] of=/sdcard/boot.img

    Code:
    exit

    Code:
    adb pull /sdcard/boot.img
    Our stock boot.img should be downloaded into our Minimal ADB Fastboot directory!

    Code:
    adb reboot

    Stock boot.img patching and flashing (For Method II only)


    1. Save your stock boot.img into phone's internal storage/sdcard
    2. Download latest Magisk Manager from MAGISK GITHUB REPO
    3. Install Magisk Manager on your phone.
    4. Open Magisk Manager, check Keep Force Encryption
    5. Click Install > Install > Boot Image Patching > Select your stock boot.img and patch it.
    6. Save your patched boot.img to your computer

    7. Shut down your phone
    8. Open Minimal ADB Fastboot terminal on your PC
    9. Connect your phone to your PC and hold Power and Volume Down buttons until Fastboot screen will be visible.
    4. Follow the steps:

    Enter commands:
    Code:
    fastboot devices
    Your phone should be visible.
    example: ,,7e00a8e3 fastboot"

    Code:
    fastboot flash boot <path to your patched_boot.img>

    Code:
    fastboot reboot

    5. Open Magisk Manager, your phone should be rooted.
    6. Download Root Checker from Play Store and check if your device is rooted.


    FOR OTA UPDATES:
    - Uninstall magisk with Magisk Manager App (Restore Image option)
    - Apply OTA update
    then:

    Method I:
    - Boot into twrp (version with working decryption)
    - Flash Magisk ZIP again

    Method II:
    - Pull boot.img and patch it again
    - Flash new patched boot.img



    If you have any questions or problems, type those in the comment below, I will try to help you :)

    Stock Mi Recovery 3.0 for Pocophone F1: GOOGLE DRIVE
    3
    That message is because Magisk can't find the stock image backup. Maybe was moved by you or deleted? The only solution is flash the stock boot.img manually and then install the update.

    Thank you!

    I found the stock 10.1.3.0 Global here, I downloaded and found the boot.img

    So installing the stock boot.img via fastboot will let me install OTA and the re-apply Magisk, correct?

    PS:
    I followed these steps, since Magisk was not able to find the stock boot.img

    - downloaded actual MIUI stock ROM, in my case 10.1.3.0, and extracted the boot.img
    - via TWRP I made a backup just to be sure
    - -rebooted in fastboot mode and from PC I flashed the stock boot.img "fastboot flash boot boot.img" and "fastboot reboot"
    - after rebooted I applied the OTA update to 10.2.2.0, in my case
    - rebooted in TWRP and installed the file "DisableForceEncryption_Treble_v18.0.zip" which includes also Magisk 18.0
    - rebooted to system and all previously installed Magisk modules were there.

    I have a stock recovery, but when needed I just reboot in fastboot and from PC I just type "fastboot boot twrp-3.2.3.0-beryllium.img" and I'm in TWRP recovery.

    Thanks who helped me.
    3
    I am wondering about issues that I might face if I proceed with rooting global stable miui 10 like perform ance, lags, battery drain, FCs, random reboots, heat emission. I need to know these issues in order to decide whether it worth it or not.

    Thank you for your support.

    Why would any of this issue appear with root? Rooting your device only gives possible use of "Admin privilege" to the apps you want to use root.
    If you root your device but do not do anything else, nothing will change.
    But e.g. if you want to backup all your apps + data including system apps, you now have the rights to access the required folders on your phone.
    That's pretty much it!
    2
    hey dudes, can someone please upload the stock recovery for me?
    everytime the phone wants to install an ota it just boots into twrp and i have to manually reboot it from there.
    so if i just flash the stock poco recovery the phone would updtate the ota normally and root still would be there?

    Stock Mi Recovery 3.0 for Pocophone F1: GOOGLE DRIVE

    Before OTA update, uninstall magisk via Magisk Manager App, then after update install it again using my guide, otherwise you will get bootloop.
    I don't figured it out yet, how to keep magisk live when updating.
    2
    For now there is twrp with decryption working so you can flash magisk ZIP, with booted twrp (not flashed).
    I used the same boot I had before OTA and there was no problems too.