Home > Root

How to Root Moto X40/Edge 40 Pro via Magisk

In this guide, we will show you the steps to root your Moto X40/Edge 40 Pro via Magisk. It still remains a mystery as to why the Edge series doesn’t usually get the appreciation that it deserves. Offering a near about clean stock usage experience with just the right amount of goodies, and being priced quite aggressively, it seems to have checkmarked all the prerequisites with ease.

However, if we talk about its presence in the tech community, then it has quickly upscaled the popularity charts, with one of the most popular players in the custom ROM already live for this device. Along the same lines, you now also have the opportunity to gain administrative access by rooting your Moto X40/Edge 40 Pro via Magisk which in turn will open the floodgates to a plethora of tweaks. So without any further ado, let’s show you how this could be carried out.

Benefits and Risks of Rooting Moto X40/Edge 40 Pro

Once you root your device, you will be in a position to flash a plethora of mods. These include the likes of Fox Magisk ModulesSubstratum ThemesXposed Framework via LSPosed, and Viper4Android among others. Along the same lines, you could also flash a custom kernel and implement your desired CPU profile. However, such tweaks do come in with a few risks as well.

Root Moto Edge 40 Pro

To begin with, rooting requires you to unlock the bootloader- which will wipe off all the data and could nullify the warranty as well. Likewise, SafetyNet will be triggered [FIXED] which will result in your inability to use banking apps [FIXED]. So if all that’s well and good, then let’s get started with the steps to root your Moto Edge 40 Pro/X40 via the Magisk patched init_boot.img

How to Root Moto X40/Edge 40 Pro via Magisk

Root Moto Edge 40 Pro

Before starting with the process, make sure to take a complete device backup beforehand. 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

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.

install adb platform tools windows

STEP 2: Enable USB Debugging and OEM Unlocking

Next up, you will 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 Moto Edge 40 Pro

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

STEP 3: Unlock Bootloader

Next up, you will also have to unlock the device’s bootloader. Do keep in mind that doing so will wipe off all the data from your device and could nullify its warranty as well. So if that’s all well and good, then please refer to our detailed guide on How to Unlock Bootloader on any Motorola Device

Root Moto Edge 40 Pro

STEP 4: Extract Stock Init_boot

First off, download the stock firmware for your device from below [make sure to download the same version which is currently installed on your device]. Then extract it, copy the init_boot.img, and paste inside the platform-tools folder.

RETCN Region | RETEU Region

STEP 5: Patch Moto X40/Edge 40 Pro Init_Boot.img via Magisk

  1. Download and install the Magisk App on your device.
  2. Then launch it and tap on the Install button next to Magisk.
  3. After that, choose ‘Select and Patch a File’, and navigate to the stock init_boot.img file, and select it.
    Root Moto Edge 40 Pro
  4. Then tap on the Let’s Go button situated at the top right.
    Root Moto Edge 40 Pro
  5. The init_boot.img file will now be patched and placed under the Downloads folder on your device.
  6. Transfer this file to the platform-tools folder on your PC and rename it to magisk_patched_init_boot.img.

STEP 6: Boot 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.
  3. After that, type in the following command in the CMD window to boot your device to Fastboot Mode
    adb reboot bootloader

    Root Moto Edge 40 Pro

  4. To verify the Fastboot connection, type in the below command and you should get back the device ID.
    fastboot devices

    oneplus 7 pro android 13

  5. If you are not getting any serial ID, then please install Fastboot Drivers.

STEP 7: Root Moto X40/Edge 40 Pro via Magisk Patched Init_Boot.img

  1. Flash the patched init_boot to both the init_boot partitions:
    fastboot flash init_boot_a magisk_patched_init_boot.img 
    fastboot flash init_boot_b magisk_patched_init_boot.img
  2. Finally, execute the below command to boot your device to the OS
    fastboot reboot

That’s it. These were the steps to root Moto X40/Edge 40 Pro via Magisk patched init_boot. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.


Share: