Motorola

How to root a Motorola phone with Magisk

Motorola unlocks bootloaders through an official program: you request a code on Motorola's website and it arrives by email. Carrier models from Verizon, AT&T and Tracfone are excluded, and Motorola voids the warranty the moment it issues the code. The other thing to get right is the image: Motorola is the brand where the Android version tells you least about whether to patch init_boot.img or boot.img.

Last updated 10 sourcesHow we check pages

Check your firmware for init_boot.img before patching

Several Motorola phones launched with Android 14 or 15 but still keep the ramdisk in boot, including the Edge 2024, Edge 50 and Edge 50 Fusion. Others, such as the Moto G 2025 and Razr+ 2024, use init_boot. Open your stock firmware: if it contains init_boot.img, patch that; if not, patch boot.img. Pick your model below to set the commands.

Status checked .

Rooting a Motorola: the whole job

  1. Step 1 · 5 minutesGet your unlock data
  2. Step 2 · Minutes to a dayRequest the code and unlock
  3. Step 3 · 20 minutesDownload your stock firmware
  4. Step 4 · 2 minutesPatch the image in the Magisk app
  5. Step 5 · 2 minutesFlash the patched image
  6. Step 6 · 2 minutesFinish setup and check root
Each stage links to its full instructions below, where you can tick steps off as you go.

Find your model

Rows marked Check firmware have no source we could verify for the partition layout. Look for init_boot.img in your firmware package before patching. Motorola only offers firmware through its Rescue and Smart Assistant Windows app, so unlike our Xiaomi and Pixel checks we couldn't read Motorola packages ourselves.

14 of 14
  • Razr Ultra 2025 (Razr 60 Ultra)Snapdragon 8 Elite
    Launched withAndroid 15
    Patchinit_boot.img
  • Razr+ 2025Snapdragon 8s Gen 3
    Launched withAndroid 15
    PatchCheck firmware
  • Razr 2025 (Razr 60), Edge 2025, Edge 60, 60 Fusion, 60 ProMediaTek Dimensity 7300 to 8350
    Launched withAndroid 15
    PatchCheck firmware
  • Moto G 2025MediaTek Dimensity 6300Motorola's own flashfile writes init_boot.
    Launched withAndroid 15
    Patchinit_boot.img
  • Moto G Stylus 2025Snapdragon 6 Gen 3
    Launched withAndroid 15
    Patchinit_boot.img
  • Moto G Power 2025MediaTek Dimensity 6300
    Launched withAndroid 15
    PatchCheck firmware
  • Razr+ 2024 (Razr 50 Ultra)Snapdragon 8s Gen 3
    Launched withAndroid 14
    Patchinit_boot.img
  • Razr 2024 (Razr 50)MediaTek Dimensity 7300X
    Launched withAndroid 14
    PatchCheck firmware
  • Edge 2024, Edge 50, Edge 50 FusionSnapdragon 7s Gen 2 / 7 Gen 1No init_boot partition despite launching with Android 14.
    Launched withAndroid 14
    Patchboot.img
  • Edge 50 Pro, Edge 50 UltraSnapdragon 7 Gen 3 / 8s Gen 3
    Launched withAndroid 14
    PatchCheck firmware
  • Moto G85Snapdragon 6s Gen 3
    Launched withAndroid 14
    Patchinit_boot.img
  • Moto G75, G55, G Stylus 5G 2024Various
    Launched withAndroid 14
    PatchCheck firmware
  • Edge 40 ProSnapdragon 8 Gen 2
    Launched withAndroid 13
    Patchinit_boot.img
  • Edge 40MediaTek Dimensity 8020
    Launched withAndroid 13
    PatchCheck firmware

Launch versions and chips are from GSMArena's specification pages. The image column comes from LineageOS and community device trees or Motorola flashfiles for each model; we mark a row Check firmware when no such source exists.

Before you start

You will need

What you give up

  • Your warranty, permanently. Motorola's unlock agreement says that obtaining the code voids all warranties, whether or not you then unlock, and even if you relock later.
  • A clean boot screen. An orange warning shows on every boot while the bootloader is unlocked.
  • Strong Play Integrity. An unlocked bootloader fails the device verdict on Android 13 and later. See Play Integrity and root.

Root your Motorola step by step

Each step has a Done box so you can keep your place. Your progress is saved in this browser only.

  1. Get your unlock data

    5 minutes
    1. Enable Developer options (tap Build number seven times) and turn on OEM unlocking and USB debugging. On a new phone the toggle can take up to a week to become available and needs an internet connection.
    2. Reboot to the bootloader (or power off and hold Volume Down + Power) and print your unlock data. Join the lines into one string, removing the (bootloader) prefixes and all spaces.
    Unlock data
    $adb reboot bootloader $fastboot oem get_unlock_data
  2. Request the code and unlock

    Minutes to a day

    Sign in on Motorola's unlock page, paste the string, accept the agreement and request the code. If the phone is eligible, Motorola emails it. Then unlock. This erases all data.

    Unlock
    $fastboot oem unlock UNLOCK_CODE
  3. Download your stock firmware

    20 minutes

    In Rescue and Smart Assistant, open the Flash tab, choose Rescue, select your phone and let it download the firmware (do not run the rescue itself). The package must match your model, software channel and build; fastboot getvar ro.carrier shows the channel, for example RETUS. Look inside: if there is an init_boot.img, that is the file you patch. Otherwise use boot.img. Copy it to the phone.

  4. Patch the image in the Magisk app

    2 minutes

    In the Magisk app tap Install → Select and Patch a File and pick init_boot.img. Copy the patched file back with adb.

    Copy the patched image to the computer
    $adb pull /sdcard/Download/magisk_patched-XXXXX_YYYYY.img
  5. Flash the patched image

    2 minutes

    Flash from the bootloader, not fastbootd: fastboot getvar is-userspace should answer no.

    Flash
    $adb reboot bootloader $fastboot flash init_boot magisk_patched-XXXXX_YYYYY.img $fastboot reboot
  6. Finish setup and check root

    2 minutes

    Open the Magisk app and accept the additional setup. A version number on the Magisk card, for example 31.1 (31100), means root works. Don't go by the App card: its Installed line shows the app's own version even when Magisk isn't running.

Keeping root after updates

The safer update route

  1. 1Download the new firmwareRescue and Smart Assistant
  2. 2Patch its image againIn the Magisk app
  3. 3Flash itKeeping your data
  4. 4Boot and checkMagisk shows its version
Motorola's unlock agreement advises against OTA updates on unlocked phones, so updating from full firmware is the safer path.

Recent Motorola phones have A/B slots, so Magisk's update method can work: Uninstall → Restore Images, install the update without restarting, then Install to Inactive Slot (After OTA). Magisk's documentation only vouches for this method on Pixels, and Motorola's unlock agreement advises against installing Motorola updates on unlocked phones. The safer route is to download the new firmware with Rescue and Smart Assistant, patch its init_boot.img and flash it. Full steps: keeping root after an update.

If the phone does not boot

Recovery

Hold Volume Down + Power to reach the bootloader and flash the untouched image from the same firmware: fastboot flash init_boot init_boot.img. To return completely to stock, run a Rescue in Rescue and Smart Assistant, which reinstalls the firmware and erases the phone. Module bootloops: boot into Magisk's Safe Mode or run adb shell magisk --remove-modules (see fixing a Magisk bootloop).

Errors and fixes

The messages people most often hit on this brand, and what they mean.

“(bootloader) Preflash validation failed”

A long-running Motorola issue in Magisk's tracker (#8389), labelled a regression and reopened in September 2026. Some users report that patching with an older Magisk app version works. Check the issue for the latest status before trying.

Motorola says my device is not eligible

Carrier models (Verizon, AT&T, Tracfone, Cricket and similar) are excluded from the unlock program. There is no official way around it.

OEM unlocking is greyed out

Connect to the internet and wait. On new phones it can take up to a week before the toggle becomes available.

The phone enters Magisk's Safe Mode after charging while off

A bug on some Motorola models (XT2435, XT2533), fixed in Magisk v31.0, so update to v31.1, the current stable release.

The Magisk app shows Not Installed (v31.1) or Installed: N/A (v30.7)

You probably patched boot.img on a phone that uses init_boot.img, or the other way round. Check your firmware package and patch the right one.

fastboot hangs or does not see the phone

Use a USB 2.0 port or a hub, update Platform-Tools, and make sure the phone shows the bootloader screen.

Questions people ask

Does unlocking a Motorola void the warranty?

Yes. Motorola's agreement says requesting the unlock code voids all warranties, even if you never unlock or later relock.

Can I unlock a Verizon, AT&T or Tracfone Motorola?

No. Carrier-exclusive models are not eligible for Motorola's unlock program.

Do I patch boot.img or init_boot.img?

It depends on the model, not the Android version. Look in your firmware package: patch init_boot.img if it is there, otherwise boot.img.

Can I remove the unlocked bootloader warning?

Only by relocking the bootloader, which requires fully stock firmware and wipes the phone.

Will Motorola updates work after rooting?

Possibly, using Magisk's A/B method, but Motorola advises against updating unlocked phones. Flashing the new firmware yourself is more predictable.

Sources

This page is written from the sources below. If anything here disagrees with them, the upstream source is correct.

Found a mistake or something out of date? Tell us and we will check it against the source and fix the page. Confirmed corrections are listed in the corrections log.

Report a problem with this page