Skip to content

Motorola Root Guide

Root Motorola devices via official unlock code system. Covers Edge 50, Edge 40, Edge 30, Moto G series, and legacy Moto devices.

Quick Navigation

Related Guides:


Supported Devices

Click to expand supported Motorola devices

Motorola Edge Series

Edge 50 Series (2024):

  • Edge 50 Ultra
  • Edge 50 Pro
  • Edge 50 Fusion
  • Growing support
  • Uses init_boot.img

Edge 40 Series (2023):

  • Edge 40 Pro
  • Edge 40 Neo
  • Edge 40
  • Good community
  • Active development

Edge 30 Series (2022):

  • Edge 30 Ultra
  • Edge 30 Fusion
  • Edge 30 Pro
  • Excellent support
  • Many custom ROMs

Older Edge:

  • Edge+/Edge (2020-2021)
  • Edge 20 series
  • Mature support

Moto G Series

Moto G Power/Stylus (2024):

  • G Power (2024)
  • G Stylus 5G (2024)
  • Budget-friendly
  • Basic root support

Moto G Series (2023):

  • Moto G84/G73/G54
  • Popular mid-range
  • Good XDA support
  • Multiple ROMs

Moto G Series (2022):

  • Moto G82/G72/G62/G52
  • Excellent community
  • Many custom ROMs
  • Active development

Legacy Moto G:

  • G100/G60/G40
  • G9 Plus/Power/Play
  • G8 series
  • Strong custom ROM scene

Moto X/Z Series (Legacy)

Moto X:

  • X4, X Style, X Play
  • Classic Motorola
  • Good ROM support

Moto Z:

  • Z4/Z3/Z2/Z Play
  • Modular phones
  • Active community

Carrier Considerations

Unlockable:

  • International models
  • Retail unlocked (US)
  • Most regions globally

Not Unlockable:

  • Verizon (most models)
  • AT&T (some models)
  • Sprint/Boost/Cricket variants
  • Prepaid carrier-locked versions

ThinkShield:

  • Business/enterprise Motorola
  • Usually locked down
  • Not rootable typically

Prerequisites

Critical Requirements

⚠️ BEFORE YOU START

Warranty Void: Motorola explicitly voids warranty upon unlock. No reversal.

Unlock Code Required: Must request from Motorola website. Process takes time.

Data Wipe: Unlocking erases all data including internal storage.

No Insurance: Warranty and service completely void after unlock.

Carrier Check: Verify your device can be unlocked. Many US carrier models cannot.

Hardware Requirements

  • Motorola device (unlockable model)
  • Quality USB cable
  • Computer (Windows, macOS, Linux)
  • 50%+ battery charge

Software Requirements

On Computer:

  1. Platform Tools

  2. Motorola USB Drivers (Windows)

  3. Web Browser

    • For unlock code request
    • Valid email address

On Device:

  1. Magisk APK

  2. Motorola Account

    • For unlock code request
    • Valid email

Device Preparation

Step 1: Enable Developer Options

  1. Settings > About phone
  2. Tap "Build number" 7 times
  3. Enter PIN/password

Step 2: Enable Required Settings

Settings > System > Developer options:

  • OEM unlocking: Enable
  • USB debugging: Enable

Step 3: Verify ADB

bash
adb devices
# Should show device

Get Unlock Code

Motorola requires official unlock code from their website.

Step 1: Gather Device Information

Get Device ID String:

bash
# 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) prefixes

Example output:

(bootloader) 0A40040192024205#4C4D3556313
(bootloader) 230800000000000#BD00A0A40310F0
(bootloader) 0A40040192024205#4C4D355631

Combine to:

0A40040192024205#4C4D35563132308000000000000#BD00A0A40310F00A40040192024205#4C4D3556313

Step 2: Request Unlock Code

  1. Visit Motorola Bootloader Unlock

  2. Read warnings carefully:

    • Warranty void
    • Data wipe
    • Permanent consequences
  3. Enter device information:

    • Device model
    • Device ID string (from Step 1)
    • Valid email address
  4. Submit request

  5. Check email:

    • Unlock code sent to email
    • May take minutes to hours
    • Check spam folder

Email contains unique unlock code (example):

Your unique unlock code: ABCDEF1234567890

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

bash
adb reboot bootloader

Or hardware keys:

  1. Power off
  2. Hold Volume Down + Power
  3. Release at fastboot screen

Step 2: Unlock with Code

bash
# Verify fastboot connection
fastboot devices

# Unlock using code from email
fastboot oem unlock ABCDEF1234567890
# Replace with your actual unlock code

On Device:

  • Warning screen may appear
  • Device automatically wipes
  • Bootloader unlocks
  • Device reboots

Some Motorola devices use:

bash
fastboot flashing unlock
# Then confirm on device screen

Step 3: Verify Unlock

After reboot:

bash
adb reboot bootloader
fastboot getvar unlocked
# Should return: yes

Or check on boot:

  • "Bootloader unlocked" warning (normal)

Root Installation

Determine Correct Image

DeviceAndroid VersionImage to Patch
Edge 50 seriesAndroid 14init_boot.img
Edge 40 seriesAndroid 13/14init_boot.img
Edge 30 seriesAndroid 12/13boot.img or init_boot.img
Moto G (2023-2024)Android 13/14init_boot.img
Moto G (2022 and older)Android 12 and belowboot.img

Check Magisk app "Ramdisk" field if unsure.

Method 1: Boot Image Patching

Step 1: Get Stock Firmware

  1. Download from Motorola Firmware or XDA
  2. Extract firmware archive
  3. Find boot.img or init_boot.img

Step 2: Transfer to Device

bash
# For newer devices
adb push init_boot.img /sdcard/Download/

# For older devices
adb push boot.img /sdcard/Download/

Step 3: Patch with Magisk

bash
# Install Magisk
adb install Magisk-v27.0.apk

On device:

  1. Open Magisk
  2. Install > Select and Patch a File
  3. Choose boot/init_boot image
  4. Wait for patching

Step 4: Flash Patched Image

bash
# Get patched image
adb pull /sdcard/Download/magisk_patched_xxxxx.img ./

# Boot to fastboot
adb reboot bootloader

# Flash
# For Android 13/14
fastboot flash init_boot magisk_patched_xxxxx.img

# For Android 12 and older
fastboot flash boot magisk_patched_xxxxx.img

# Reboot
fastboot reboot

Step 5: Verify Root

  1. Open Magisk app
  2. Should show installed
  3. Test: adb shell su

Post-Root Setup

Configure Magisk

Settings:

  • Zygisk: Enable
  • Enforce DenyList: Enable
  • Hide Magisk: For banking

DenyList:

  • Google Play Services
  • Banking apps
  • Payment apps

Motorola Optimization

Battery:

  1. Settings > Battery
  2. Magisk and root apps
  3. Set "Unrestricted"

Background:

  • Allow background activity
  • Disable battery optimization
  • Universal SafetyNet Fix
  • Shamiko
  • LSPosed
  • Systemless Hosts

OTA Handling

For A/B Devices

Process:

  1. Download OTA
  2. Magisk > Install to Inactive Slot
  3. Reboot
  4. Root preserved

Troubleshooting

Click to expand troubleshooting

Unlock Code Issues

Code Not Received

Solutions:

  • Check spam folder
  • Wait 24-48 hours
  • Re-submit request
  • Use different email
  • Contact Motorola support

Code Doesn't Work

Solutions:

  • Verify copied correctly
  • Check for extra spaces
  • Try without hyphens
  • Re-request code

Bootloader Issues

OEM Unlocking Greyed Out

Causes:

  • Carrier-locked device
  • ThinkShield enabled
  • Business/enterprise model

If grey: Device likely cannot unlock

Unlock Command Fails

Solutions:

  • Verify code exactly
  • Try both commands:
    • fastboot oem unlock CODE
    • fastboot flashing unlock
  • Check device compatibility

Installation Issues

Magisk Not Working

Solutions:

  1. Verify correct image
  2. Check Android version
  3. Re-patch and flash
  4. Clear Magisk data

Bootloop

bash
fastboot flash boot stock_boot.img
# Or
fastboot flash init_boot stock_init_boot.img
fastboot reboot

Unroot and Restore

Remove Root

bash
# Magisk > Uninstall > Restore Images

Flash Stock

bash
# Flash stock firmware images
fastboot flash boot stock_boot.img
fastboot flash init_boot stock_init_boot.img
fastboot reboot

Relock Bootloader

RELOCK WARNING

Only when completely stock. Warranty already void (doesn't restore).

bash
fastboot oem lock
# Or
fastboot flashing lock

Custom ROMs

LineageOS:

  • Official for many Moto G
  • Stable and maintained

Pixel Experience:

  • Pixel-like interface
  • Good performance

crDroid:

  • Feature-rich
  • Active development

Evolution X:

  • Customizable
  • Growing support

Best Practices

Security

  1. Hide Magisk for apps
  2. Configure DenyList
  3. Trusted modules only
  4. Keep updated

Community Resources

Official Motorola:

Developer Community:

Awesome Android Root help resources:

Getting Help

Provide:

  • Exact Motorola model
  • Android version
  • Unlock code status
  • Error messages
  • Steps attempted

Next Steps

After Rooting:

  1. Essential apps:

  2. Enhance:

  3. Explore ROMs: