Skip to content

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 ​

Related Guides:


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 situationWhat to verify before doing anything
International or unlocked modelWhether OEM unlocking appears and whether the device accepts the Download Mode unlock confirmation.
US or Canadian carrier modelCarrier bootloader policy; many variants do not expose an unlock path even when the hardware is similar.
New Galaxy generation or current One UI firmwareThe exact model, CSC/region and firmware build; do not infer support from an older S or A series guide.
Snapdragon versus Exynos variantThe 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:

  1. Samsung USB Drivers

  2. 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.
  1. Stock Firmware
    • Download from SamFrew or Bifrost or Frija
    • Match exact model and region
    • Contains: AP, BL, CP, CSC files

On Device:

  1. Magisk APK

  2. 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

  1. Settings > About phone
  2. Tap Software information
  3. Tap Build number 7 times
  4. Enter PIN/password
  5. 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

bash
adb reboot download

Method 2: Hardware Keys

  1. Power off device completely
  2. Hold Volume Up + Volume Down
  3. Connect USB cable while holding buttons
  4. Press Volume Up to continue
  5. Download mode screen appears

Step 3: Unlock Bootloader ​

On Device:

  1. Long press Volume Up
  2. Bootloader unlock warning appears
  3. Use Volume keys to select "Unlock bootloader"
  4. Press Power to confirm
  5. Device automatically factory resets
  6. 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

  1. Determine exact model and CSC:
bash
adb shell getprop ro.product.model
adb shell getprop ro.csc.countryiso_code
  1. Download matching firmware from SamFrew
  2. Extract firmware ZIP
  3. 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

bash
# Transfer AP file to device
adb push AP_*.tar.md5 /sdcard/Download/

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

On Device:

  1. Open Magisk app
  2. Tap "Install" next to Magisk
  3. Select "Select and Patch a File"
  4. Navigate to Download folder
  5. Select AP file
  6. Tap "Let's Go"
  7. Wait for patching (2-5 minutes)

Output: magisk_patched_[random].tar in Download folder

Transfer patched file back:

bash
adb pull /sdcard/Download/magisk_patched_*.tar ./

Step 3: Flash with Odin

  1. Boot to Download Mode:
bash
adb reboot download
  1. Open Odin as Administrator

  2. Device should show in Odin (blue box with COM port)

  3. 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)
  1. 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.

  1. 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:

  1. Device reboots automatically
  2. When Samsung logo appears, immediately:
  3. Hold Volume Up + Power
  4. Enter Recovery Mode

In Recovery:

  1. Use Volume keys to navigate
  2. Select "Wipe data/factory reset"
  3. Select "Factory data reset"
  4. Confirm with "Yes"
  5. After wipe, select "Reboot system now"

Step 5: Complete Setup and Verify Root

  1. Complete Android setup again
  2. Reinstall Magisk APK
  3. Open Magisk app
  4. May show "Additional Setup Required"
  5. Tap "OK" and reboot
  6. After reboot, Magisk shows:
    • Magisk: Installed (version)
    • App: Latest (version)

Test root:

bash
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:

  1. Dial *#0*# for service mode
  2. Check Knox warranty status
  3. Should show "0x1" (tripped, permanent)

Method 2: TWRP Recovery (Legacy Devices) ​

For older Samsung devices with TWRP support:

  1. Download TWRP for your device from TWRP website
  2. Flash TWRP via Odin (AP slot)
  3. Boot to TWRP recovery
  4. Flash Magisk ZIP
  5. Reboot system

Note: Most modern Samsung devices lack TWRP support due to A/B partitions and encryption changes.

Verify Knox Trip ​

After setup:

  1. Dial *#0*# for service mode
  2. Check Knox warranty status
  3. 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:

  1. Hide Magisk App:

    • Magisk > Settings
    • "Hide the Magisk app"
    • Enter custom name (e.g., "Settings")
  2. Clear App Data:

After DenyList configuration:

bash
# 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
  1. Reboot device

OTA Handling ​

Samsung OTA updates are blocked when rooted.

Unroot for OTA ​

Step 1: Uninstall Magisk

  1. Magisk > Uninstall
  2. Select "Restore Images"
  3. Reboot
  4. Root removed

Step 2: Install OTA

  1. Settings > Software update
  2. Download and install
  3. Device updates normally

Step 3: Re-Root

  1. Download new firmware AP file
  2. Patch with Magisk
  3. Flash with Odin
  4. Root restored

Alternative: Manual Firmware Flash ​

  1. Download latest firmware
  2. Patch AP file
  3. Flash complete firmware with Odin
  4. Factory reset
  5. Root restored and updated

Troubleshooting ​

Bootloader Issues ​

OEM Unlocking Greyed Out

Causes:

  • Carrier-locked device
  • FRP lock active
  • Internet not connected

Solutions:

  1. Remove all accounts
  2. Factory reset
  3. Wait 7 days
  4. Connect to internet
  5. Check again

If still grey: Device is carrier-locked (cannot unlock)

Stuck in Download Mode

Solutions:

bash
# Exit download mode
Hold Volume Down + Power for 10 seconds

# Force restart
Hold Power + Volume Down + Bixby for 10 seconds

Odin Issues ​

Odin Doesn't Detect Device

Solutions:

  1. Reinstall Samsung USB drivers
  2. Try different USB port (USB 2.0)
  3. Run Odin as Administrator
  4. Disable antivirus temporarily
  5. Try different USB cable
  6. Reboot computer

FAIL! Error in Odin

Common causes:

  • Wrong firmware for model
  • Corrupted download
  • Re-Partition checked (uncheck it)
  • Low battery
  • Cable disconnected

Solutions:

  1. Verify firmware matches model exactly
  2. Re-download firmware
  3. Uncheck Re-Partition
  4. Charge device
  5. Use better cable

Stuck at Samsung Logo

Solutions:

  1. Boot to recovery (Volume Up + Power)
  2. Factory reset again
  3. Wipe cache partition
  4. If persists, reflash stock firmware

Root Issues ​

Magisk Shows N/A

Causes:

  • Patched wrong AP file
  • Didn't factory reset
  • Firmware mismatch

Solutions:

  1. Verify correct firmware version
  2. Perform factory reset again
  3. Re-patch and reflash AP

Play Integrity Fails

Solutions:

  1. Enable Zygisk
  2. Configure DenyList properly
  3. Hide Magisk app
  4. Install Play Integrity Fix
  5. Install Shamiko module
  6. Clear Google Play Services
  7. 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 ​

bash
# Magisk > Uninstall > Restore Images
# Root removed, Knox still tripped (0x1)

Flash Stock Firmware ​

Complete restoration:

  1. Download stock firmware
  2. Flash all files with Odin:
    • BL, AP, CP, CSC (not patched)
  3. Perform factory reset
  4. 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:

Community Forums:

Essential Samsung Resources:

Custom ROM Resources:

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:

  1. Essential apps:

  2. Enhance experience:

  3. Consider alternatives:

    • Custom ROM Guide - LineageOS, Evolution X
    • Explore Samsung-specific ROMs
    • Join development community