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
- 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 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:
Platform Tools
- Download: Android Platform Tools
Motorola USB Drivers (Windows)
- Usually auto-install
- Or Download from Motorola
Web Browser
- For unlock code request
- Valid email address
On Device:
Magisk APK
- Download: Magisk GitHub
Motorola Account
- For unlock code request
- Valid email
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 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#4C4D3556313
(bootloader) 230800000000000#BD00A0A40310F0
(bootloader) 0A40040192024205#4C4D355631Combine to:
0A40040192024205#4C4D35563132308000000000000#BD00A0A40310F00A40040192024205#4C4D3556313Step 2: Request Unlock Code
Read warnings carefully:
- Warranty void
- Data wipe
- Permanent consequences
Enter device information:
- Device model
- Device ID string (from Step 1)
- Valid email address
Submit request
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: ABCDEF1234567890Step 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 ABCDEF1234567890
# Replace with your actual unlock codeOn Device:
- Warning screen may appear
- Device automatically wipes
- Bootloader unlocks
- Device reboots
Some Motorola devices use:
fastboot flashing unlock
# Then confirm on device screenStep 3: Verify Unlock
After reboot:
adb reboot bootloader
fastboot getvar unlocked
# Should return: yesOr check on boot:
- "Bootloader unlocked" warning (normal)
Root Installation
Determine Correct Image
| Device | Android Version | Image to Patch |
|---|---|---|
| Edge 50 series | Android 14 | 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-2024) | Android 13/14 | init_boot.img |
| Moto G (2022 and older) | Android 12 and below | boot.img |
Check Magisk app "Ramdisk" field if unsure.
Method 1: Boot Image Patching
Step 1: Get Stock Firmware
- Download from Motorola Firmware or XDA
- Extract firmware archive
- Find boot.img or init_boot.img
Step 2: Transfer to Device
# For newer devices
adb push init_boot.img /sdcard/Download/
# For older devices
adb push boot.img /sdcard/Download/Step 3: Patch with Magisk
# Install Magisk
adb install Magisk-v27.0.apkOn device:
- Open Magisk
- Install > Select and Patch a File
- Choose boot/init_boot image
- Wait for patching
Step 4: Flash Patched Image
# 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 rebootStep 5: Verify Root
- Open Magisk app
- Should show installed
- 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:
- Settings > Battery
- Magisk and root apps
- Set "Unrestricted"
Background:
- Allow background activity
- Disable battery optimization
Recommended Modules
- Universal SafetyNet Fix
- Shamiko
- LSPosed
- Systemless Hosts
OTA Handling
For A/B Devices
Process:
- Download OTA
- Magisk > Install to Inactive Slot
- Reboot
- 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 CODEfastboot flashing unlock
- Check device compatibility
Installation Issues
Magisk Not Working
Solutions:
- Verify correct image
- Check Android version
- Re-patch and flash
- Clear Magisk data
Bootloop
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
fastboot flash init_boot stock_init_boot.img
fastboot rebootRelock Bootloader
RELOCK WARNING
Only when completely stock. Warranty already void (doesn't restore).
fastboot oem lock
# Or
fastboot flashing lockCustom ROMs
Popular 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
- Hide Magisk for apps
- Configure DenyList
- Trusted modules only
- Keep updated
Community Resources
Official Motorola:
- Bootloader Unlock - Official unlock
- Motorola Support - General support
Developer Community:
- XDA Motorola Forums - Development
- Reddit r/MotoG - Community
- Reddit r/Motorola - General Motorola
Awesome Android Root help resources:
Getting Help
Provide:
- Exact Motorola model
- Android version
- Unlock code status
- Error messages
- Steps attempted
Next Steps
After Rooting:
Essential apps:
Enhance:
Explore ROMs:
- Custom ROM Guide
- LineageOS for stability
- Pixel Experience for clean look