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.
- Bootloader unlockCode from MotorolaNot Verizon, AT&T or Tracfone models
- Waiting periodEmail, plus up to a week for the toggle
- WarrantyVoid once the code is issued
- Data wipeYes, when unlocking
- Image to patchVaries by modelCheck the firmware
- Updates with rootPossible (A/B), not advised
Rooting a Motorola: the whole job
- Step 1 · 5 minutesGet your unlock data
- Step 2 · Minutes to a dayRequest the code and unlock
- Step 3 · 20 minutesDownload your stock firmware
- Step 4 · 2 minutesPatch the image in the Magisk app
- Step 5 · 2 minutesFlash the patched image
- Step 6 · 2 minutesFinish setup and check root
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.
-
Razr Ultra 2025 (Razr 60 Ultra)Snapdragon 8 EliteLaunched withAndroid 15Patchinit_boot.img
-
Razr+ 2025Snapdragon 8s Gen 3Launched withAndroid 15PatchCheck firmware
-
Razr 2025 (Razr 60), Edge 2025, Edge 60, 60 Fusion, 60 ProMediaTek Dimensity 7300 to 8350Launched withAndroid 15PatchCheck firmware
-
Moto G 2025MediaTek Dimensity 6300Motorola's own flashfile writes
init_boot.Launched withAndroid 15Patchinit_boot.img -
Moto G Stylus 2025Snapdragon 6 Gen 3Launched withAndroid 15Patchinit_boot.img
-
Moto G Power 2025MediaTek Dimensity 6300Launched withAndroid 15PatchCheck firmware
-
Razr+ 2024 (Razr 50 Ultra)Snapdragon 8s Gen 3Launched withAndroid 14Patchinit_boot.img
-
Razr 2024 (Razr 50)MediaTek Dimensity 7300XLaunched withAndroid 14PatchCheck firmware
-
Edge 2024, Edge 50, Edge 50 FusionSnapdragon 7s Gen 2 / 7 Gen 1No
init_bootpartition despite launching with Android 14.Launched withAndroid 14Patchboot.img -
Edge 50 Pro, Edge 50 UltraSnapdragon 7 Gen 3 / 8s Gen 3Launched withAndroid 14PatchCheck firmware
-
Moto G85Snapdragon 6s Gen 3Launched withAndroid 14Patchinit_boot.img
-
Moto G75, G55, G Stylus 5G 2024VariousLaunched withAndroid 14PatchCheck firmware
-
Edge 40 ProSnapdragon 8 Gen 2Launched withAndroid 13Patchinit_boot.img
-
Edge 40MediaTek Dimensity 8020Launched withAndroid 13PatchCheck firmware
No match. Download your stock firmware and look for init_boot.img: patch it if present, otherwise patch boot.img.
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
- An eligible Motorola. Carrier models from Verizon, AT&T, Tracfone and Cricket generally cannot be unlocked.
- A Motorola account to request the unlock code on Motorola's bootloader unlock page.
- A Windows PC for Motorola's Rescue and Smart Assistant, which downloads your exact stock firmware, plus Google's Platform-Tools.
- A backup. Unlocking erases the phone.
- The Magisk app from the official GitHub release.
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.
-
Get your unlock data
5 minutes- 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.
- 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 -
Request the code and unlock
Minutes to a daySign 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 -
Download your stock firmware
20 minutesIn 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.carriershows the channel, for exampleRETUS. Look inside: if there is aninit_boot.img, that is the file you patch. Otherwise useboot.img. Copy it to the phone. -
Patch the image in the Magisk app
2 minutesIn 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 -
Flash the patched image
2 minutesFlash from the bootloader, not fastbootd:
fastboot getvar is-userspaceshould answerno.Flash$adb reboot bootloader $fastboot flash init_boot magisk_patched-XXXXX_YYYYY.img $fastboot reboot -
Finish setup and check root
2 minutesOpen 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
- 1Download the new firmwareRescue and Smart Assistant
- 2Patch its image againIn the Magisk app
- 3Flash itKeeping your data
- 4Boot and checkMagisk shows its version
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
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.
- Magisk installation guide (topjohnwu)
- Bootloader unlock legal agreement and warning (Motorola)
- Unlock your device: bootloader unlock program (Motorola)
- Rescue and Smart Assistant: rescue and firmware download (Motorola help)
- Magisk issue #8389: Preflash validation failed on Motorola
- Magisk issue #9967: false Safe Mode after charging on Motorola
- Motorola Edge 2024 common device tree, no init_boot (LineageOS)
- Motorola Edge 40 Pro common device tree with init_boot (LineageOS)
- Fastbootd and the bootloader (Android Open Source Project)
- Generic boot partition and init_boot (Android Open Source Project)
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