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:
Step-by-Step Installation Walkthrough: Odin AP Flashing
Step 1: Unlock the Samsung Bootloader
- Open Settings -> About Phone -> Software Information and tap Build Number 7 times to unlock Developer Options.
- Open Settings -> Developer Options and toggle on OEM Unlocking and USB Debugging.
- Power off your device completely.
- Hold down both Volume Up + Volume Down buttons simultaneously and connect your phone to your PC via a USB cable.
- The teal Warning screen will appear. Long-press Volume Up to unlock the bootloader.
- 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
- Install the official Magisk APK on your Samsung device.
- Copy the
AP_*.tar.md5file from your computer into your phone's/sdcard/Download/folder. - Open Magisk, tap Install on the Magisk card, select Select and Patch a File, and choose the
APfile. - Magisk will extract
boot.img.lz4,init_boot.img.lz4, andrecovery.img.lz4, injectmagiskinit, disable verity flags invbmeta, and repack the archive into:/sdcard/Download/magisk_patched_[random].tar - Transfer the
magisk_patched.tarfile back to your computer.
Step 4: Flash in Samsung Odin v3.14+
- Reboot your Samsung phone into Download Mode (Power off -> Hold
Vol Up + Vol Down-> Plug in USB -> PressVol Uponce). - Open Odin v3.14.4 on your PC. Verify that the
ID:COMbox lights up blue/teal. - Slot the files into Odin:
- Click BL and select your stock
BL_*.tar.md5. - Click AP and select your
magisk_patched.tarfile. - 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).
- Click BL and select your stock
- CRITICAL STEP: In Odin, click the Options tab and UNCHECK "Auto Reboot".
- 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:
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)
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
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)
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
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)
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)
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)
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)
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)
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)
Related Guides & Next Steps
Explore interconnected tutorials, module guides, and developer references related to this topic:
Universal Install Guide
InstallStep-by-step Fastboot and Odin installation instructions.
Patch AP Tar Images
GuideHow to extract and patch Samsung AP tar packages in Magisk.
Fix Installed: N/A
TroubleshootTroubleshoot Samsung VaultKeeper bootloader relocks and missing root.
Verified against official upstream release Magisk v30.7 on Samsung One UI (Android 13–16). Primary reference: topjohnwu/Magisk on GitHub.