Home > Root

How to Root Poco F4/Redmi K40S via Magisk

In this guide, we will show you the steps to root your Poco F4/Redmi K40S via Magisk patched boot.img file. Whern it comes to the mid-budget domain, then there’s no denying the fact that the offering from the Poco is the best in this domain. In this regard, its fourth iteration has managed to upscale the popularity charts in no time whatsoever. And it’s not just for the general audiences, the device has something in store for the tech enthusiast as well.

Whether it is flashing a custom or GSI ROM, installing a custom recovery like TWRP, or welcoming abode a plethora of mod, the possibilities stands endless. However, it’s the ability to gain administrative privileges that has always been at the top of the priority queue for many. if you are also in the same boat, then this guide will help you root your Poco F4/Redmi K40S via Magisk patched boot.img file. So without further ado, let’s get started.

Benefits and Risks of Rooting

Once you root your device by flashing the Magisk patched boot.img via Fastboot Commands, you will be in a position to try out a plethora of customizations on your device. These include the likes of flashing custom ROMs, installing a custom recovery like TWRP, or flashing a custom kernel. Along the same lines, you could also flash Magisk Modules, Xposed Framework, Substratum Themes, Viper4Android, and the likes. However, this is just one side of the story.

Pass SafetyNet on Rooted Android 12

Carrying out this process also has its downsides. First off, the process requires an unlocked bootloader. Doing so will wipe off all the data and could nullify the device’s warranty as well. Likewise, WideVine L1 will be degraded to L3, resulting in the inability to stream Netflix in HD [FIXED]. Then the SafetyNet will be triggered [FIXED], which might cause issues with banking apps [FIXED]. So if all that’s well and good, then let’s get started with the steps to root your Poco F4/Redmi K40S via Magisk.

How to Root Poco F4/Redmi K40S via Magisk

root poco f4

The below instructions are listed under separate sections for ease of understanding. Make sure to follow the same sequence as mentioned. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.

STEP 1: Install Android SDK

install adb platform tools windows

First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform-tools folder, which will be used throughout this guide to root your Poco F4/Redmi K40S.

STEP 2: Enable USB Debugging and OEM Unlocking

Next up, you will also have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. On the other hand, OEM Unlocking is required to carry out the bootloader unlocking process.

root poco f4

So head over to Settings > About Phone > Tap on MIUI Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging and OEM Unlocking.

STEP 3: Unlock Poco F4/Redmi K40S Device Bootloader

Next up, you will need to unlock the device’s bootloader. However, doing so will wipe off all the data and could nullify the device’s warranty as well. So if that’s all well and good, then please refer to our guide on How to Unlock the Bootloader on any Xiaomi Device. Once that is done, you may move over to the next step to root your Poco F4/Redmi K40S via Magisk.

root poco f4

STEP 4: Download Poco F4/Redmi K40S Fastboot ROM

Next up, you will have to download the Fastboot ROM for your device. Make sure to download the same version that is currently installed on your device (you could verify the same from your device’s Build Number). As far as the downloading source is concerned, you could get it from the official MIUI site or a third-party site like Xiaomi Firmware Updater (if the official website is blocked in your region).

STEP 5: Get Poco F4/Redmi K40S Stock Boot.img

  1. Once you have downloaded the firmware, extract it to any convenient location on your PC.
    root poco f4
  2. Then go to the Images folder and copy the boot.img file from there.
    root poco f4
  3. Now transfer this boot.img file to your device.

STEP 6: Patch Poco F4/Redmi K40S Boot.img via Magisk

  1. Download and install the latest version of the Magisk App.
  2. Then launch it and tap on the Install button next to Magisk.
  3. After that, choose ‘Select and Patch a File’, navigate to the stock boot.img file, and select it.
    root poco f4
  4. Then tap on the Let’s Go button situated at the top right.
    root poco f4
  5. The boot.img file will now be patched and placed under the Downloads folder on your device.
  6. You should transfer this file to the platform-tools folder on your PC.
    root poco f4

STEP 7: Boot Poco F4/Redmi K40S to Fastboot Mode

  1. Connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
  2. Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
    command-prompt-inside-adb
  3. Type in the following command in the CMD window to boot your device to Fastboot Mode
    adb reboot bootloader

    root poco f4

  4. Now type in the below command to verify the Fastboot Connection
    fastboot devices

    root poco f4

  5. If you get a device ID followed by the fastboot keyword, then the connection stands successful. You may now proceed to the next step to root your Poco F4/Redmi K40S via Magisk.

STEP 8: Flash Magisk Patched Boot & Root Poco F4/Redmi K40S

  1. To begin with, make sure that the patched boot (magisk_patched_boot.img) is present inside the platform-tools folder.root poco f4
  2. Then open the CMD window inside this platform-tools folder.
  3. Now type in the below command to boot your device to the temporary rooted OS.
    fastboot boot magisk_patched_boot.img
  4. Now launch the Magisk app and tap on Install.
  5. Then select Direct Install and tap Let’s Go situated at the top-right.
    root poco f4
  6. Once done, hit the Reboot button situated at the bottom right.
  7. That’s it, your device will now boot to the permanently rooted OS.

That’s it. These were the steps to root your Poco F4/Redmi K40S via Magisk. If you have any queries concerning the aforementioned steps, do let us know in the comments section. We will get back to you with a solution at the earliest.

NOTE: There also exists a method to root your Xiaomi device by directly flashing the Magisk patched boot file. However, that is usually a risky approach and should be avoided. The above approach of first booting the patched file and then permanently flashing it via Direct Install of Magisk is the fail-safe method that you should opt for.

root poco f4

Fix: Poco F4/Redmi K40 Stuck in Bootloop while rooting

If your device is stuck in bootloop, then you might have to disable the verity checks by flashing the vbmeta file. Here’s how it could be done:

  1. First off, extract the vbmeta.img file from the Fastboot ROM that you have downloaded.
    root poco f4
  2. Then transfer this vbmeta file to the platform-tools folder and launch the CMD window inside this folder:
  3. After that, connect your device to the PC and force-boot it to Fastboot Mode.
  4. Now execute the below command to flash vbmeta and disable the verification:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
  5. Once that is done, you may proceed with the rest of the rooting steps (see STEP 8).

Share: