Samsung One UI 5 / 6 / 7

How to Root Samsung Galaxy with Magisk & Odin

The definitive master guide for rooting Samsung Galaxy smartphones (Galaxy S24, S23, S22, S21, S20, S10, A-Series, Z Fold, and Z Flip) on One UI. Follow our tested step-by-step Odin AP tar patching procedure, understand Knox 0x1 implications, and learn the critical factory reset key timing.

Samsung Galaxy Technical Rooting Profile

  • Supported Models: Galaxy S24 Ultra/+/Base, S23 series, S22, S21, S20, S10, Galaxy A54/A53/A52/A34, Z Fold 6/5/4, Z Flip 6/5/4, Galaxy Tab S9/S8.
  • Flashing Protocol: Samsung Download Mode via Odin v3.14.4 (or Heimdall on Linux/macOS).
  • Target File to Patch: AP_[model]_[build].tar.md5 (Full AP tar package).
  • Hardware Security Impact: Knox Warranty Void (0x1) is permanently tripped.
  • Required Firmware Download Tools: Frija, SamFirm, or Bifrost.

Understanding the Knox Warranty Void (0x1) Hardware e-Fuse

Samsung smartphones contain a physical, hardware-based One-Time Programmable (OTP) electronic fuse called the Knox e-fuse. When you unlock the bootloader and flash custom or patched binaries, this fuse is physically blown:

Knox Security Breakdown
# Stock Factory State: KNOX WARRANTY VOID: 0x0 (Hardware Fuse Intact) # After Unlocking & Flashing Magisk: KNOX WARRANTY VOID: 0x1 (Hardware Fuse Permanently Blown) # Permanent Consequences (Cannot be reverted even by flashing stock): [X] Samsung Pay & Samsung Wallet (Hardware TEE key permanently revoked) [X] Samsung Pass (Biometric credential storage disabled) [X] Secure Folder (Hardware-encrypted container disabled) [X] Knox Mobile Enrollment (Enterprise management disabled) # Recoverable Features (Restorable via Magisk Modules & resetprop): [✓] Samsung Health (Working via KnoxPatch Magisk module) [✓] Secure Wi-Fi / Private Share [✓] Google Wallet / Banking Apps (Working via Play Integrity Fix + Zygisk)

Step-by-Step Installation Walkthrough: Odin AP Flashing

Step 1: Unlock the Samsung Bootloader

  1. Open Settings -> About Phone -> Software Information and tap Build Number 7 times to unlock Developer Options.
  2. Open Settings -> Developer Options and toggle on OEM Unlocking and USB Debugging.
  3. Power off your device completely.
  4. Hold down both Volume Up + Volume Down buttons simultaneously and connect your phone to your PC via a USB cable.
  5. The teal Warning screen will appear. Long-press Volume Up to unlock the bootloader.
  6. Confirm the unlock. Note: This will perform a complete factory wipe of all user data! Allow the phone to boot up and complete basic initial setup without adding Google accounts.

Step 2: Download Stock Samsung Firmware

Download the exact official 4-file or 5-file Samsung firmware corresponding to your phone model and CSC region using open-source tools like Frija or SamFirm. Unzip the downloaded firmware archive to reveal:

  • BL_*.tar.md5 (Bootloader)
  • AP_*.tar.md5 (System, Boot, Recovery, Vbmeta - Transfer this file to your phone!)
  • CP_*.tar.md5 (Modem/Baseband)
  • CSC_*.tar.md5 (Region formatting & Clean wipe)

Step 3: Patch the AP File in Magisk App

  1. Install the official Magisk APK on your Samsung device.
  2. Copy the AP_*.tar.md5 file from your computer into your phone's /sdcard/Download/ folder.
  3. Open Magisk, tap Install on the Magisk card, select Select and Patch a File, and choose the AP file.
  4. Magisk will extract boot.img.lz4, init_boot.img.lz4, and recovery.img.lz4, inject magiskinit, disable verity flags in vbmeta, and repack the archive into:
    /sdcard/Download/magisk_patched_[random].tar
  5. Transfer the magisk_patched.tar file back to your computer.

Step 4: Flash in Samsung Odin v3.14+

  1. Reboot your Samsung phone into Download Mode (Power off -> Hold Vol Up + Vol Down -> Plug in USB -> Press Vol Up once).
  2. Open Odin v3.14.4 on your PC. Verify that the ID:COM box lights up blue/teal.
  3. Slot the files into Odin:
    • Click BL and select your stock BL_*.tar.md5.
    • Click AP and select your magisk_patched.tar file.
    • Click CP and select your stock CP_*.tar.md5.
    • Click CSC and select your stock CSC_*.tar.md5 (do NOT use HOME_CSC for initial root).
  4. CRITICAL STEP: In Odin, click the Options tab and UNCHECK "Auto Reboot".
  5. Click Start. Wait 3–5 minutes until Odin displays a green PASS! message in the top left.

Step 5: The Critical Recovery Reboot & Wipe

Because Auto Reboot was disabled, your phone remains in Download Mode. Follow this timing strictly:

Samsung Critical Key Sequence
# 1. Disconnect the USB cable. # 2. Hold [Power/Side Key] + [Volume Down] to force shutdown. # 3. THE SECOND the screen turns black: -> Immediately release [Volume Down] and hold [Power/Side Key] + [Volume Up]. # 4. Keep holding [Power] + [Volume Up] until the Samsung Stock Recovery menu appears. # 5. In Stock Recovery menu: -> Use Volume keys to select "Wipe data / factory reset" -> Press Power to confirm. -> Select "Reboot system now".

Step 6: Complete Magisk Setup

Once Android boots up, connect to Wi-Fi. You will see a stub Magisk icon in your app drawer. Tap it to download the full app, or install Magisk-v30.7.apk via ADB. Open Magisk and tap OK when prompted to complete the environment setup. The phone will reboot once more and you will have 100% working Magisk root!

Samsung Troubleshooting & Common Odin Errors

Odin shows "Only official released binaries are allowed to be flashed (VBMETA)". How do I fix this?

This occurs when Samsung's VaultKeeper security service relocks the bootloader during setup. To fix this: boot normally into Android, connect to Wi-Fi, go to Developer Options, and verify that "OEM Unlocking" is greyed out and reads "Bootloader is already unlocked". Wait 24–48 hours connected to Wi-Fi if VaultKeeper does not immediately unlock.

My Samsung phone is stuck in a bootloop displaying "vbmeta verification failed".

This happens if you failed to perform a Wipe Data / Factory Reset in Stock Recovery immediately following the Odin flash. Force reboot to recovery using Power + Volume Up (with a USB cable plugged into a PC on Exynos devices) and execute a factory reset.

Model-Specific Rooting Guides

Select your exact hardware model below to view verified partition patching, firmware extraction, and Fastboot/Odin flashing instructions:

Samsung Galaxy S26, S26+ & S26 Ultra

2026

SoC: Snapdragon 8 Elite Gen 5 (US/China) / Exynos 2600 (EU/India/Korea)
Target Partition: init_boot.img + vbmeta.img via Odin (SM-S942/S946/S948)

Action: Open Model Manual →

Samsung Galaxy Z Fold 8, Z Fold 8 Ultra & Z Flip 8

2026

SoC: Snapdragon 8 Elite Gen 5 for Galaxy (All models, Global)
Target Partition: init_boot.img + vbmeta.img via Odin • Bootloader status: pending

Action: Open Model Manual →

Samsung Galaxy S25, S25+ & S25 Ultra

2025

SoC: Snapdragon 8 Elite for Galaxy (Global, No Exynos variant)
Target Partition: init_boot.img + vbmeta.img via Odin (SM-S931/S936/S938)

Action: Open Model Manual →

Samsung Galaxy Z Fold 7 & Z Flip 7

2025 • OEM Unlock Removed

SoC: Fold 7: Snapdragon 8 Elite • Flip 7: Exynos 2500 (incl. US)
Status: One UI 8 removed OEM Unlock toggle globally — see alternatives

Action: Open Rooting Status Guide →

Samsung Galaxy S24, S24+ & S24 Ultra

2024

SoC: Snapdragon 8 Gen 3 for Galaxy / Exynos 2400 (4nm)
Target Partition: AP Tar Package (AP_[model]_[build].tar.md5)

Action: Open Model Manual →

Samsung Galaxy Z Fold 6/5/4 & Z Flip 6/5/4

2022–2024

SoC: Snapdragon 8 Gen 3 / Gen 2 for Galaxy
Target Partition: AP Tar Package (init_boot.img.lz4 + vbmeta.img.lz4)

Action: Open Model Manual →

Samsung Galaxy A55, A54 5G & A35 5G

2023–2024

SoC: Exynos 1480 / Exynos 1380 (5nm Architecture)
Target Partition: AP Tar Package (AP_[model]_[build].tar.md5)

Action: Open Model Manual →

Samsung Galaxy S23, S23+, S23 Ultra & S23 FE

2023

SoC: Snapdragon 8 Gen 2 for Galaxy (Exynos 2200 for S23 FE)
Target Partition: AP Tar Package (AP_[model]_[build].tar.md5)

Action: Open Model Manual →

Samsung Galaxy S22, S22+ & S22 Ultra

2022

SoC: Snapdragon 8 Gen 1 / Exynos 2200 (Xclipse 920 GPU)
Target Partition: AP Tar Package (AP_[model]_[build].tar.md5)

Action: Open Model Manual →

Samsung Galaxy S21, S21+, S21 Ultra & S21 FE

2021–2022

SoC: Exynos 2100 / Snapdragon 888 5G
Target Partition: AP Tar Package (boot.img.lz4 — pre-GKI method)

Action: Open Model Manual →
Source & Verification Standard

Verified against official upstream release Magisk v30.7 on Samsung One UI (Android 13–16). Primary reference: topjohnwu/Magisk on GitHub.