Motorola Root Guide
Root Motorola devices via the official unlock code system. Covers Edge 60, Edge 50, Edge 40, Edge 30, Moto G series, and legacy Moto devices.
Quick Navigation
- Motorola Overview
- Supported Devices
- Prerequisites
- Get Unlock Code
- Unlock Bootloader
- Root Installation
- Troubleshooting
Related Guides:
- Main Rooting Guide - Universal rooting concepts
- Bootloader Unlocking - Detailed unlock guide
- Magisk Guide - Complete Magisk documentation
- Custom ROMs - Installing custom ROMs
- Root Apps - Best root apps collection
Supported Devices
Click to expand supported Motorola devices
Motorola Edge Series
Edge 60 Series (2025):
- Edge 60, Edge 60 Fusion, Edge 60 Stylus, Edge 60 Pro
- Runs Android 15; eligible for three OS upgrades
- Uses init_boot.img
- Ensure init_boot.img matches your current build number; do NOT use launch firmware if you've already updated
Edge 50 Series (2024):
- Edge 50 Ultra, Edge 50 Pro, Edge 50 Fusion, Edge 50 Neo
- Uses init_boot.img
Edge 40 Series (2023):
- Edge 40 Pro, Edge 40 Neo, Edge 40
- Uses init_boot.img
- Good community support, active LineageOS development
Edge 30 Series (2022):
- Edge 30 Ultra, Edge 30 Fusion, Edge 30 Pro
- Uses boot.img or init_boot.img (check Magisk Ramdisk field)
- Excellent support, many custom ROMs
Older Edge:
- Edge+/Edge (2020-2021)
- Edge 20 series
- Mature support
Moto G Series
Moto G (2024-2025):
- G Power, G Stylus 5G, G85, G75, G55
- Uses init_boot.img
- Many recent Moto G devices on Android 13/14/15 encounter "Preflash validation failed" when flashing images patched with Magisk v27/28+
Moto G (2023):
- Moto G84/G73/G54/G64
- Uses init_boot.img
- Good XDA support
Moto G (2022 and older):
- Moto G82/G72/G62/G52
- Moto G100/G60/G40
- Moto G9 Plus/Power/Play, G8 series
- Uses boot.img
- Strong custom ROM scene
Moto X/Z Series (Legacy)
Moto X:
- X4, X Style, X Play
Moto Z:
- Z4/Z3/Z2/Z Play
Carrier Considerations
Unlockable:
- International/global models
- Retail unlocked (US)
Not Unlockable:
- Carrier-exclusive models (e.g. Verizon, AT&T, Tracfone) are almost never unlockable
- Bootloader unlock codes are not available for Amazon Branded devices
- Prepaid carrier-locked variants
ThinkShield:
- Business/enterprise Motorola devices
- Usually locked down, not rootable
Prerequisites
Critical Requirements
⚠️ BEFORE YOU START
Warranty Void: Once you get the unlock code, your device is no longer covered by the Motorola warranty.
Unlock Code Required: Must request from Motorola's official website. May take minutes to hours.
Data Wipe: Unlocking erases all data including internal storage.
Carrier Check: There are certain restrictions such as carrier-exclusive models. To find out if your phone supports bootloader unlock you will need to visit Motorola's page and proceed to follow the process.
Hardware Requirements
- Motorola device (unlockable model)
- Quality USB cable (try multiple cables if you encounter issues)
- Computer (Windows, macOS, Linux)
- 50%+ battery charge
Software Requirements
On Computer:
Platform Tools
- Download: Android Platform Tools
Motorola USB Drivers (Windows)
- Download: Motorola USB Drivers
Web Browser
- For unlock code request
- Valid email address (Gmail recommended)
On Device:
Magisk APK
- Download: Magisk GitHub Releases
- Android compatibility: Android 6.0 and higher
Motorola Account
- For unlock code request
Device Preparation
Step 1: Enable Developer Options
- Settings > About phone
- Tap "Build number" 7 times
- Enter PIN/password
Step 2: Enable Required Settings
Settings > System > Developer options:
- OEM unlocking: Enable
- USB debugging: Enable
Step 3: Verify ADB
adb devices
# Should show deviceGet Unlock Code
Motorola requires an official unlock code from their website.
Step 1: Gather Device Information
Get Device ID String:
# Reboot to fastboot
adb reboot bootloader
# Get device ID (unique string)
fastboot oem get_unlock_data
# Output will be multiple lines
# Copy ALL lines together as one string
# Remove spaces and (bootloader) prefixesExample output:
(bootloader) 0A40040192024205#4C4D3556313230
(bootloader) 30373731363031303332323239#BD00
(bootloader) 8A672BA4746C2CE02328A2AC0C39F95
(bootloader) 1A3E5#1F53280002000000000000000
(bootloader) 0000000Copy the code part off of each line (exclude the (bootloader) part and remove all spaces) and make it a single string:
0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000DATA SCRUB TOOL
Be careful not to remove part of the unlock key when removing the junk, spaces and extra lines. You can paste it into the online Motorola dataScrubTool to clean it up automatically.
Step 2: Request Unlock Code
Sign in with your Motorola account
Unlocking your device and installing your own software might cause the device to stop working, disable important features and functionality.
Paste the string on the website. Click "Can my device be unlocked?" You'll receive an email with your unlock key.
Check email:
- Try to use Gmail as your account email for Motorola. If you don't receive the unlock code (which should come in about a minute or so), try changing your account email address and requesting the code again.
Step 3: Save Unlock Code
- Copy unlock code exactly
- Save to text file
- Keep safe for next steps
Unlock Bootloader
Step 1: Enter Fastboot Mode
adb reboot bootloaderOr hardware keys:
- Power off
- Hold Volume Down + Power
- Release at fastboot screen
Step 2: Unlock with Code
# Verify fastboot connection
fastboot devices
# Unlock using code from email
fastboot oem unlock UNIQUE_KEY_FROM_EMAILOn Device:
- Warning screen may appear
- Device automatically wipes
- Bootloader unlocks
- Device reboots
Step 3: Verify Unlock
After reboot:
adb reboot bootloader
fastboot getvar unlocked
# Should return: yesOn boot you will see a "Bootloader unlocked" warning - this is normal.
Root Installation
Determine Correct Image
| Device | Android Version | Image to Patch |
|---|---|---|
| Edge 60 series | Android 15 | init_boot.img |
| Edge 50 series | Android 14/15 | init_boot.img |
| Edge 40 series | Android 13/14 | init_boot.img |
| Edge 30 series | Android 12/13 | boot.img or init_boot.img |
| Moto G (2023-2025) | Android 13-15 | init_boot.img |
| Moto G (2022 and older) | Android 12 and below | boot.img |
Open the Magisk app and check the "Ramdisk" field if unsure. If Ramdisk = Yes, use boot.img. If your device has a separate init_boot partition, use init_boot.img.
Method 1: Boot Image Patching (Standard)
Step 1: Get Stock Firmware
- Download from Motorola Rescue and Smart Assistant (Software Fix) or Lolinet Motorola Firmware Mirror
- Extract firmware archive
- Find
boot.imgorinit_boot.img
FIRMWARE VERSION MATCH
If you already installed an official update before rooting: Do NOT extract init_boot.img from the initial/launch firmware. DO extract init_boot.img from the updated firmware that matches your current build number.
Step 2: Transfer to Device
# For newer devices (Android 13+)
adb push init_boot.img /sdcard/Download/
# For older devices (Android 12 and below)
adb push boot.img /sdcard/Download/Step 3: Patch with Magisk
# Install Magisk
adb install magisk.apkOn device:
- Open Magisk
- Install > Select and Patch a File
- Choose boot/init_boot image
- Wait for patching to complete
Step 4: Flash Patched Image
# Get patched image back to PC
adb pull /sdcard/Download/magisk_patched_xxxxx.img ./
# Reboot to fastboot
adb reboot bootloader
# Flash (use the correct partition for your device)
# For devices with init_boot partition:
fastboot flash init_boot magisk_patched_xxxxx.img
# For devices using boot.img:
fastboot flash boot magisk_patched_xxxxx.img
# Reboot
fastboot rebootStep 5: Verify Root
- Open Magisk app
- Should show "Installed" with version number
- Test:
adb shell su
Method 2: Fastboot Boot + Direct Install (Edge 50 Fusion and similar)
Some Motorola devices (especially MediaTek-based ones like the Edge 50 Fusion) don't work with the standard flash method. Use this alternative:
- Unlock bootloader like any other Motorola device
- Install Magisk app
- Patch boot.img with Magisk and transfer to PC
- Execute
adb reboot bootloader - Execute
fastboot boot patched_boot.img - Open Magisk app and select "Direct Install"
- Reboot - device is now rooted
Post-Root Setup
Configure Magisk
Settings:
- Zygisk: Enable
- Enforce DenyList: Enable
DenyList:
- Google Play Services
- Google Play Store
- Banking apps
- Payment apps
Motorola Optimization
Battery:
- Settings > Battery
- Magisk and root apps > Set "Unrestricted"
Background:
- Allow background activity for root apps
- Disable battery optimization for Magisk
Recommended Modules
- Play Integrity Fix (replaces Universal SafetyNet Fix)
- Shamiko (hide root from detection)
- LSPosed (Xposed framework)
- Systemless Hosts (ad blocking support)
OTA Handling
For A/B Devices (All Modern Motorola)
Process:
- Download OTA
- Magisk > Install to Inactive Slot
- Reboot
- Root preserved
WARNING
After rooting, OTA updates may fail with "package verification failed." The only way to update is to download the full firmware package and flash it yourself using Rescue and Smart Assistant or fastboot.
Troubleshooting
Click to expand troubleshooting
Unlock Code Issues
Code Not Received
Solutions:
- Check spam folder
- Wait up to 24 hours
- Re-submit request
- Try to use Gmail as your account email for Motorola
- Contact Motorola support
Code Doesn't Work
Solutions:
- Verify copied correctly - no extra spaces
- Be careful not to remove part of the unlock key when removing the junk, spaces and extra lines
Bootloader Issues
OEM Unlocking Greyed Out
Causes:
- Carrier-locked device
- ThinkShield/enterprise model
- Device not eligible
If greyed out: device likely cannot be unlocked.
Device Shows "Not Eligible" on Motorola Website
- The site often gives false ineligible responses
- The device's CID is one of the factors that can determine if it is eligible for unlocking
- Check your CID with:
fastboot getvar cid - Try submitting again or use a different browser
"Preflash Validation Failed"
This is a common Motorola-specific error when flashing patched images.
Cause: This can mean multiple things including flashing an older image, or DMVerity/Verification still being enabled. If DMVerity/Verification is still enabled and you try to flash a rooted image, it will be denied because the device can detect it's been modified.
Solution 1: Use fastbootd mode Reboot into Fastboot-Fastboot mode (fastbootd) instead of Fastboot-bootloader. While still in bootloader mode, send: fastboot reboot fastboot. While in fastbootd mode, repeat flashing the images - they should succeed this time.
Solution 2: Disable vbmeta verification
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.imgSolution 3: Use the fastboot boot method Instead of flashing directly, use fastboot boot patched_boot.img, then do a Direct Install from within the Magisk app.
Installation Issues
Magisk Not Working After Flash
Solutions:
- On some devices like the Edge 50 Ultra, flashing patched boot.img alone doesn't work - you may need to patch init_boot.img instead
- Verify firmware version matches your current build
- Re-patch and flash
- Clear Magisk data
Bootloop
# Restore stock image
fastboot flash boot stock_boot.img
# Or
fastboot flash init_boot stock_init_boot.img
fastboot rebootUnroot and Restore
Remove Root
# Magisk > Uninstall > Restore ImagesFlash Stock
# Flash stock firmware images
fastboot flash boot stock_boot.img
# Or for newer devices:
fastboot flash init_boot stock_init_boot.img
fastboot rebootRelock Bootloader
RELOCK WARNING
Don't relock the bootloader if it was unlocked by any other method than official. Reflash stock firmware, factory reset, reboot, and make sure everything is working correctly before relocking. Warranty remains void after relocking.
fastboot oem lockCustom ROMs
Popular ROMs
LineageOS:
- Official for many Moto G and Edge devices
- Stable and well-maintained
Pixel Experience:
- Pixel-like interface
- Good performance
crDroid:
- Feature-rich
- Active development
Evolution X:
- Customizable
- Growing support
Best Practices
Security
- Configure DenyList for sensitive apps
- Trusted modules only - verify sources
- Keep Magisk updated - latest versions support new sepolicy binary format introduced in Android 16
- Back up boot images before every update
Community Resources
Official Motorola:
- Bootloader Unlock - Official unlock portal
- Supported Devices Info - Official eligibility info
- Motorola USB Drivers - Official drivers
- Motorola Rescue & Smart Assistant - Stock firmware tool
Developer Community:
- XDA Motorola Forums - Development & guides
- XDA Bootloader Unlock Guide - Comprehensive unlock reference
- Reddit r/MotoG - Moto G community
- Reddit r/Motorola - General Motorola
Awesome Android Root help resources:
Getting Help
Provide:
- Exact Motorola model and codename
- Android version and build number
- Unlock code status
- Exact error messages (especially fastboot output)
- Steps attempted
- Which Magisk version was used to patch
Next Steps
After Rooting:
Essential apps:
Enhance:
Explore ROMs:
- Custom ROM Guide
- LineageOS for stability
- Pixel Experience for clean look