How to Root a Samsung Galaxy: Odin, AP & Magisk
There is no single Samsung rooting procedure. Bootloader availability, chipset, CSC/region, Android version and One UI release determine whether a Galaxy device can be rooted. This guide explains the checks first, then covers Download Mode, Odin AP-file patching and Magisk for models that are actually eligible.
Quick Navigation
- Samsung-specific risks
- Model and region compatibility
- Prerequisites
- Bootloader Unlock
- Root Installation
- Troubleshooting
Related Guides:
- Main Rooting Guide - Universal rooting concepts
- Bootloader Unlocking - Model and region checks
- Magisk Guide - Complete Magisk documentation
- Samsung troubleshooting - Odin, Download Mode and root failures
Samsung Rooting Challenges
BOOTLOADER ELIGIBILITY CHANGES BY MODEL
Samsung does not offer one unlock policy for every Galaxy device. Some international models expose OEM unlocking, while many carrier-branded US/Canadian variants do not. Newer Galaxy generations and One UI releases can change what is available, so verify the exact model number, CSC/region and firmware before updating or attempting to root.
Do not treat a guide for one Galaxy model as proof that another model or region is unlockable.
⚠️ Samsung-Specific Risks
- Knox permanently tripped (0x1) – Cannot be reversed, affects Samsung Pay, Health, Secure Folder
- Warranty completely void – Samsung will refuse all service once Knox is tripped
- Carrier restrictions – US carrier models (Verizon, AT&T) often cannot unlock bootloader
- Banking & financial app detection – Enhanced root detection via Play Integrity and SafetyNet
- OTA updates blocked – Official updates will fail unless root is temporarily uninstalled
- Samsung Cloud & Find My Mobile – May flag device as compromised
💡 Want root WITHOUT tripping Knox?
On a subset of specifically verified Galaxy builds, the GhostLock bug (CVE-2026-43499) may provide temporary root with the bootloader still locked. That is not a general Samsung rooting method: root is lost on reboot and support depends on the exact firmware. See Root Without Unlocking the Bootloader for the current limitations.
Device Compatibility
Samsung rooting is complex and model-dependent. International Exynos devices and some international Snapdragon devices are more likely to expose an unlock path, but the model number and region are decisive.
| Device situation | What to verify before doing anything |
|---|---|
| International or unlocked model | Whether OEM unlocking appears and whether the device accepts the Download Mode unlock confirmation. |
| US or Canadian carrier model | Carrier bootloader policy; many variants do not expose an unlock path even when the hardware is similar. |
| New Galaxy generation or current One UI firmware | The exact model, CSC/region and firmware build; do not infer support from an older S or A series guide. |
| Snapdragon versus Exynos variant | The chipset and regional firmware, because rooting instructions and unlock availability can differ. |
Incompatible / Restricted Devices
VERIFY, DO NOT ASSUME
A missing or permanently greyed-out OEM Unlocking option is a stop sign, not a problem to work around with a random Odin file. If the exact model and region cannot be verified as unlockable, do not flash a patched AP file.
KNOX CONSEQUENCES (Permanent)
- Knox EFUSE physically burned - cannot be reversed
- Samsung Pay/Wallet, Secure Folder, Samsung Pass permanently disabled
- Warranty permanently void
- Some banking apps may refuse to run even with root hiding
Before attempting: Check your model's unlockability on XDA Forums for your specific variant.
Prerequisites
Critical Requirements
BEFORE YOU START
Knox Will Trip: Permanently and irreversibly. Think carefully.
Data Wipe: Unlocking erases everything. Backup first.
Warranty Void: Samsung will refuse all service.
Banking Apps: May not work even with root hiding.
US Carrier Models: Most cannot unlock bootloader at all.
Hardware Requirements
- Samsung Galaxy device (international or unlocked US)
- Windows computer (Odin requires Windows)
- Quality USB cable (Samsung original recommended)
- 50%+ battery charge
Software Requirements
On Computer:
Samsung USB Drivers
- Download: Samsung Developers
- Install before connecting device
Odin Flash Tool
- Download the stock Odin package from the XDA Odin thread; this guide's AP-patching steps do not require patched Odin.
- The thread warns that packages labeled Odin 3.14.4 are fake. Follow the exact-device instructions for the required version, and do not trust a filename alone.
- Compare the archive's SHA-256 with a hash from an independently trusted source, if available. Scan the archive with up-to-date security software, but do not treat a clean scan as proof of authenticity.
- Patched Odin builds modify behavior and can bypass checks; use one only when device-specific instructions explicitly require it. Extract the archive before running Odin.
- Stock Firmware
On Device:
Magisk APK
- Download: Magisk GitHub
- Latest stable version
File Manager
- Samsung My Files (pre-installed)
- Or any from Play Store
Device Preparation
Step 1: Verify Model and Build
Settings > About phone:
- Model number (e.g., SM-G998B, SM-S918U)
- Android version
- Build number
- Baseband version (for CSC region)
Step 2: Enable Developer Options
- Settings > About phone
- Tap Software information
- Tap Build number 7 times
- Enter PIN/password
- Developer options now available
Step 3: Enable Required Settings
Settings > Developer options:
- OEM unlocking: Enable (critical)
- USB debugging: Enable
Step 4: Backup Everything
- Samsung Cloud backup
- Google Photos for images
- SMS backup
- Export contacts
- Save authenticator codes
- Note installed apps
Unlock Bootloader
Step 1: Verify OEM Unlock Available
Settings > Developer options > OEM unlocking
If greyed out:
- Carrier-locked device (cannot unlock)
- Wait 7 days after factory reset
- Remove all Google accounts
- Connect to internet
Step 2: Enter Download Mode
Method 1: ADB
adb reboot downloadMethod 2: Hardware Keys
- Power off device completely
- Hold Volume Up + Volume Down
- Connect USB cable while holding buttons
- Press Volume Up to continue
- Download mode screen appears
Step 3: Unlock Bootloader
On Device:
- Long press Volume Up
- Bootloader unlock warning appears
- Use Volume keys to select "Unlock bootloader"
- Press Power to confirm
- Device automatically factory resets
- Shows "Custom binary blocked by FRP lock" (normal)
Device restarts and wipes completely.
Root Installation
Method 1: AP File Patching (Primary Method)
Step 1: Download Firmware
- Determine exact model and CSC:
adb shell getprop ro.product.model
adb shell getprop ro.csc.countryiso_code- Download matching firmware from SamFrew
- Extract firmware ZIP
- Files inside:
- AP_[model]_[version].tar.md5 (system image)
- BL_[model]_[version].tar.md5 (bootloader)
- CP_[model]_[version].tar.md5 (modem)
- CSC_[model]_[version].tar.md5 (region data)
Step 2: Transfer and Patch AP File
# Transfer AP file to device
adb push AP_*.tar.md5 /sdcard/Download/
# Install Magisk APK
adb install Magisk-v27.0.apkOn Device:
- Open Magisk app
- Tap "Install" next to Magisk
- Select "Select and Patch a File"
- Navigate to Download folder
- Select AP file
- Tap "Let's Go"
- Wait for patching (2-5 minutes)
Output: magisk_patched_[random].tar in Download folder
Transfer patched file back:
adb pull /sdcard/Download/magisk_patched_*.tar ./Step 3: Flash with Odin
- Boot to Download Mode:
adb reboot downloadOpen Odin as Administrator
Device should show in Odin (blue box with COM port)
Load firmware files:
Click each button and select files:
- BL: Original BL file (unchanged)
- AP: Magisk-patched AP file (patched)
- CP: Original CP file (unchanged)
- CSC: Original CSC file (NOT HOME_CSC)
- Configure Odin Options:
Options tab:
- ✅ Auto Reboot
- ✅ F. Reset Time
- ❌ Re-Partition (uncheck!)
CRITICAL SETTING
Auto Reboot MUST be checked for newer Samsung devices. If unchecked, manual boot to recovery required.
- Click START
Odin flashes files:
- Shows progress bar
- Takes 3-5 minutes
- "PASS!" appears in green when complete
Step 4: Mandatory Factory Reset
CRITICAL STEP
For One UI 4.0+ (Android 12+), factory reset required to complete root properly.
Immediate after flash completes:
- Device reboots automatically
- When Samsung logo appears, immediately:
- Hold Volume Up + Power
- Enter Recovery Mode
In Recovery:
- Use Volume keys to navigate
- Select "Wipe data/factory reset"
- Select "Factory data reset"
- Confirm with "Yes"
- After wipe, select "Reboot system now"
Step 5: Complete Setup and Verify Root
- Complete Android setup again
- Reinstall Magisk APK
- Open Magisk app
- May show "Additional Setup Required"
- Tap "OK" and reboot
- After reboot, Magisk shows:
- Magisk: Installed (version)
- App: Latest (version)
Test root:
adb shell
su
id
# Should show: uid=0(root)SUCCESS!
If Magisk shows both installed and su works, you're rooted!
Step 6: Verify Knox Trip
After setup:
- Dial
*#0*#for service mode - Check Knox warranty status
- Should show "0x1" (tripped, permanent)
Method 2: TWRP Recovery (Legacy Devices)
For older Samsung devices with TWRP support:
- Download TWRP for your device from TWRP website
- Flash TWRP via Odin (AP slot)
- Boot to TWRP recovery
- Flash Magisk ZIP
- Reboot system
Note: Most modern Samsung devices lack TWRP support due to A/B partitions and encryption changes.
Verify Knox Trip
After setup:
- Dial
*#0*#for service mode - Check Knox warranty status
- Should show "0x1" (tripped, permanent)
Post-Root Setup
Configure Magisk
Step 1: Basic Settings
Magisk > Settings:
- Zygisk: Enable (required for hiding)
- Enforce DenyList: Enable
- Hide Magisk app: Rename to avoid detection
Step 2: Configure DenyList
Critical for Samsung due to Knox detection:
Add to DenyList:
- Google Play Services (all)
- Google Play Store (all)
- Samsung apps:
- Samsung Health
- Samsung Members
- Samsung Galaxy Store
- Samsung Pay (won't work anyway)
- Banking apps
- Payment apps
- Any Knox-dependent apps
Step 3: Install Essential Modules
Recommended for Samsung:
- Play Integrity Fix - For banking apps
- Shamiko - Enhanced root hiding
- Systemless Hosts - Ad blocking
Samsung-Specific Root Hiding
Additional Steps:
Hide Magisk App:
- Magisk > Settings
- "Hide the Magisk app"
- Enter custom name (e.g., "Settings")
Clear App Data:
After DenyList configuration:
# Clear Google Play Services
pm clear com.google.android.gms
# Clear Play Store
pm clear com.android.vending
# Clear Samsung Health
pm clear com.sec.android.app.shealth- Reboot device
OTA Handling
Samsung OTA updates are blocked when rooted.
Unroot for OTA
Step 1: Uninstall Magisk
- Magisk > Uninstall
- Select "Restore Images"
- Reboot
- Root removed
Step 2: Install OTA
- Settings > Software update
- Download and install
- Device updates normally
Step 3: Re-Root
- Download new firmware AP file
- Patch with Magisk
- Flash with Odin
- Root restored
Alternative: Manual Firmware Flash
- Download latest firmware
- Patch AP file
- Flash complete firmware with Odin
- Factory reset
- Root restored and updated
Troubleshooting
Bootloader Issues
OEM Unlocking Greyed Out
Causes:
- Carrier-locked device
- FRP lock active
- Internet not connected
Solutions:
- Remove all accounts
- Factory reset
- Wait 7 days
- Connect to internet
- Check again
If still grey: Device is carrier-locked (cannot unlock)
Stuck in Download Mode
Solutions:
# Exit download mode
Hold Volume Down + Power for 10 seconds
# Force restart
Hold Power + Volume Down + Bixby for 10 secondsOdin Issues
Odin Doesn't Detect Device
Solutions:
- Reinstall Samsung USB drivers
- Try different USB port (USB 2.0)
- Run Odin as Administrator
- Disable antivirus temporarily
- Try different USB cable
- Reboot computer
FAIL! Error in Odin
Common causes:
- Wrong firmware for model
- Corrupted download
- Re-Partition checked (uncheck it)
- Low battery
- Cable disconnected
Solutions:
- Verify firmware matches model exactly
- Re-download firmware
- Uncheck Re-Partition
- Charge device
- Use better cable
Stuck at Samsung Logo
Solutions:
- Boot to recovery (Volume Up + Power)
- Factory reset again
- Wipe cache partition
- If persists, reflash stock firmware
Root Issues
Magisk Shows N/A
Causes:
- Patched wrong AP file
- Didn't factory reset
- Firmware mismatch
Solutions:
- Verify correct firmware version
- Perform factory reset again
- Re-patch and reflash AP
Play Integrity Fails
Solutions:
- Enable Zygisk
- Configure DenyList properly
- Hide Magisk app
- Install Play Integrity Fix
- Install Shamiko module
- Clear Google Play Services
- Reboot
Note: Due to Knox trip, some apps may always fail.
Samsung Apps Detect Root
Reality:
- Samsung Health: Limited functionality
- Samsung Pay: Will not work (Knox 0x1)
- Secure Folder: Disabled permanently
- Samsung Pass: Unusable
No workaround for Knox-dependent features.
Unroot and Restore
Remove Root Only
# Magisk > Uninstall > Restore Images
# Root removed, Knox still tripped (0x1)Flash Stock Firmware
Complete restoration:
- Download stock firmware
- Flash all files with Odin:
- BL, AP, CP, CSC (not patched)
- Perform factory reset
- Device stock but Knox still 0x1
Knox Status
KNOX CANNOT BE RESET
Once Knox trips to 0x1, it is permanent. Flashing stock firmware does NOT reset Knox counter. The efuse is physically blown.
Community Resources
Official Samsung Resources:
- Samsung Firmware - Stock firmware downloads
- Frija Tool - Firmware downloader
- Samsung Developers - Drivers and tools
Community Forums:
- Samsung XDA Forums – Device-specific development
- Odin stock and patched downloads – Community thread with package-specific warnings; choose the build required for your device
- One UI Mods Community – Samsung customization
- r/Samsung – Latest device discussions
- Samsung Firmware Database – Firmware downloads
Essential Samsung Resources:
- Samsung Smart Switch – Backup tool
- SamFrew – Firmware downloads
- Heimdall – Open-source alternative
Custom ROM Resources:
- LineageOS - Official builds
- XDA ROM Development - Custom ROMs
Getting Help
When asking for help, provide:
- Exact model number (SM-XXXXX)
- Region/CSC code
- Current firmware version
- One UI version
- Exact error messages
- Odin log if applicable
- Steps already attempted
Next Steps
After Rooting Your Samsung:
Essential apps:
- Root Apps Collection - Curated list
Enhance experience:
- Ad Blocking Guide - System-wide blocking
- Debloating Guide - Remove Samsung bloat
- LSPosed Guide - App modifications
Consider alternatives:
- Custom ROM Guide - LineageOS, Evolution X
- Explore Samsung-specific ROMs
- Join development community