How to root Moto X40/Moto Edge 40 Pro using Magisk Patched Init_Boot

Motorola isn’t always the first name that comes to mind when thinking of the custom development scene. Those spots are reserved for the likes of Pixel, OnePlus, Samsung, and more.

For the last few years, Motorola has been coming out with some exceptional handsets. One of the biggest examples is its latest Edge Series, featuring the Moto X40 or Moto Edge 40 Pro.

The devices in the Edge Series are fairly active in the custom development scene too. From flashing custom ROMs to installing the latest custom recovery to the prospect of mods and tweaks, they have a lot to offer. However, before you can get your hands on these tweaks, you will have to root your Moto X40 or Moto Edge 40 Pro using Magisk Patched Init_Boot.

If you’re not sure how to do that, then this guide will be perfect for you. In this guide, you will get to know how to root Moto X40/Moto Edge 40 Pro using Magisk Patched Init_Boot.

Steps to root Moto X40/Moto Edge 40 Pro using Magisk Patched Init_Boot

root Moto X40/Moto Edge 40 Pro using Magisk Patched Init_Boot

 Step 1: Install Android SDK

Firstly, you’ll need to install the Android SDK Platform Tools on your PC. It’s the official ADB and Fastboot binary offered by Google. You’ll need to download it and extract it to a convenient location on your PC.

Step 2: Enable USB Debugging and OEM Unlocking

To start off, you’ll need to enable Developer Options on your smartphone. Go to settings -> About phone -> tap on build number 7 times -> return to Settings -> System -> advanced -> developer options -> Finally enable USB debugging and OEM Unlocking.

Step 3: Unlock the bootloader on your Moto Edge 40 Pro

There is often an element of confusion regarding this step but to put it into perspective, you’ll need to unlock the bootloader on your device. Remember, unlocking the bootloader on your Motorola device will mean wiping off all the data on your phone and nullifying the device’s warranty.

Step 4: Extract Moto Edge 40 Pro Init_Boot

You will have to get hold of the stock firmware for your Moto Edge 40 Pro from a trusted website. Once you’ve downloaded the file, extract the init_boot.img file to the platform-tools folder.

Step 5: Patch init_boot.img via Magisk

  • Download and install the Magisk app
  • After that, launch it and tap the “Install” button next to Magisk
  • Once you’ve done that, choose the option “Select and Patch a File” and navigate to the stock init_boot.img file
  • Select the file
  • After that, tap on the “Let’s Go” button located at the top right
  • The init_boot.img file will be patched and placed in the “Downloads” folder of your Moto Edge 40 Pro
  • You need to transfer the file to the platform-tools folder and rename the file to “magisk_patched_init_boot.img”

Step 6: Boot your device to Fastboot Mode

  1. Connect your phone to the PC via USB cable
  2. Ensure that USB debugging is enabled
  3. After that, head over to the platform-tools folder and type in CMD in the address bar before hitting Enter
  4. It’ll launch the Command Prompt
  5. Type in the following command in the CMD window for booting your device to Fastboot Mode
adb reboot bootloader
  1. Then, type in the below command to verify the Fastboot Connection
fastboot devices
  1. If you’ve got a device ID followed by the fastboot keyword, the connection will be successful

Step 7: Root your Moto Edge 40 Pro using Magisk Patched Init_Boot

  • Type the following command in the CMD window for flashing the patched init_boot.img file –
fastboot flash init_boot

fastboot flash init_boot magisk_patched.img
  • Ensure that you’re replacing magisk_patched.img with the appropriate name of the patched init_boot.img file
  • If this command didn’t work, you’ll have to manually flash the init_boot to both slots via the below command –
fastboot flash init_boot_a magisk_patched_boot.img

fastboot flash init_boot_b magisk_patched_boot.img
  • Your Moto Edge 40 Pro will boot to the rooted OS
  • If this doesn’t happen, you should manually do this using the below command –
fastboot reboot

This concludes the process of rooting the Moto X40/Moto Edge 40 Pro using Magisk patched boot.img. Should you have any questions or need clarification about the steps outlined above, please feel free to leave that in the comment section down below.

Aviral Sharma
Aviral Sharma
Aviral Sharma is a talented and passionate writer who has been using words to express his thoughts ever since he learnt how to hold a pen. He is passionate about outer space, history, sports and most importantly technology. Aviral is a regular writer for rootmygalaxy.net and has been getting better by the day.

Leave a Comment