root samsung magisk patched tar odin

How to Root any Samsung device via Magisk and Odin

In this guide, we will show you the steps to root any Samsung device via Magisk and Odin. So here is how we would be carrying out this tutorial. To begin with, we will show you how to unlock the bootloader on your Samsung device, [keeping Vaultkeeper in mind]. After this, we will show you the steps to download the stock firmware via Frija. We will then extract this firmware and get the AP file.

This file will be then patched via Magisk, giving us the magisk_patched.tar file. We will then boot your Samsung device to Download Mode and flash this patched AP file (magisk_patched.tar) via Odin. Finally, we will list out the steps to boot your device to the rooted OS and carry out a few optional tweaks. We have also prepared separate guides for each of these steps.

So if you are a newcomer then it is highly recommended that you check out each of those guides as well (we will be linking them to this guide at the required places). On the other hand, if you are quite familiar with rooting Samsung devices, then you may skip those extra detailed guides and only stick with the instructions mentioned here to root your Samsung device via Magisk and Odin. Follow along for the detailed instructions.

Rooting a Samsung device: The Benefits

Once you unlock the bootloader on your device, you have literally opened the floodgates to a plethora of tweaks. These include the ability to flash custom binaries, custom ROMs, a custom recovery like TWRP, or gain access to the system partition. The latter is also known as rooting the device. In this regard, other OEMs simply requires you to get hold of the stock boot.img file, patch it via Magisk, and flash it via Fastboot Commands.

However, with Samsung things stands different (as already explained in the introductory paragraph). Anyways, once you have achieved root, you could flash Magisk Modules, Substratum Themes, Xposed Frameworks, and countless other mods.  Likewise, flashing a custom kernel is also a possibility. These are just some of the benefits to root your Samsung device via Magisk and Odin. However, there are a few risks associated with this method, as mentioned below.

Risks of Rooting a Samsung device

First and foremost, your device warranty will become null and void. Along the same lines, apps like Google Pay and Netflix will not be able to function properly. The KNOX counter will also be tripped. This will result in your inability to use apps like Samsung Pay, Secure Folder, etc. Furthermore, the implementation of security measures such as Prenormal RMM State, DEFEX, Vaultkeeper might further complicate the matter.

Likewise, the unlocking process will wipe off all the data from your device. So proceed ahead at your own risk. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device by performing the below steps. With that said, let’s get on with the guide to root your Samsung device via Magisk and Odin.

How to Root any Samsung device via Magisk and Odin

Before we list out the instructions, there are a few prerequisites that your device needs to qualify. Make sure to qualify all these requirements before proceeding ahead.


  • To begin with, take a complete device backup. The process will wipe off all the data from your device, so take a backup beforehand.
  • Also, enable USB Debugging on your device. This will make your device recognizable by your PC in ADB mode. So head over to Settings > About Phone > Software Information > Tap on Build Number 7 times > Go back to Settings > Developer Options > Enable USB Debugging.
    usb debugging samsung
  • Next up, check whether your device has Ramdisk or not. For that, launch the Magisk Manager app on your device and check if it says YES or NO next to Ramdisk. Remember the answer as it will be used at the end to boot your device to the rooted OS.
    recovery ramdisk samsung magisk

That’s all the requirements as of now. Rest of the files (such as Odin and Frija Tool are linked below under their respective sections). On that note, let’s now begin with the guide to root your Samsung device via Magisk and Odin. We have broken down the below instructions into separate sections for ease of understanding.

STEP 1: Unlock Samsung Phone’s Bootloader

The entry point for the customizations, the first requirement is that your device needs to have an unlocked bootloader. If you haven’t done so, then refer to our guide: How to Unlock Bootloader on any Samsung Device [New VaultKeeper Method]. The shorter explanation is as follows:

unlock bootloader confirmation samsungEnable USB Debugging and OEM Unlocking on your device. Then boot your device to Download Mode and use the Volume Keys to select the option to unlock the bootloader. Your device will then automatically boots up, go to Developer Options, and make sure that OEM Unlock is greyed out. That’s it. You may now proceed to the next step to root your Samsung device via Magisk and Odin.

STEP 2: Download Samsung Stock Firmware

You will now have to download your device’s stock ROM. You should refer to our comprehensive tutorial for the same: How to Download Samsung Stock Firmware/ROM via Frija Tool. For a shorter version, download the Frija Tool, enter your device’s model number and CSC number (you could get it from About Phone > Software Information), and click Download.

firmware frija tool imformation

Once the firmware is downloaded, extract it to a convenient location on your PC. This should give you the following five files in .tar.md5 format: AP, BL, CP, CSC, and HOME_CSC. We will be using the AP file out of this to root your Samsung device via Magisk and Odin.

STEP 3: Patch AP File via Magisk

It’s now time to patch the stock AP firmware file that we had just got from the stock firmware. So head over to our detailed guide on this topic: How to Patch Samsung AP Firmware via Magisk. The shorter explanation is that you need to transfer the extracted AP file to your device.

Patch Samsung AP Firmware via Magisk patched tar

Then launch the Magisk Manager app on your device. Tap on Install > Select and patch a file > Select the AP firmware file and tap on Let’s Go. The process will take a few seconds, and once done, you should get the magisk_patched.tar file placed inside the Download’s folder. This file will now be used to root your Samsung device via Magisk and Odin.

STEP 4: Boot your Samsung Device to Download Mode

download mode in samsung

You will now have to boot your Samsung device to the Download Mode so that Odin can interact with it. Different devices follow different procedures for the same, so you may refer to our guide: How to Boot any Samsung Device to Download Mode.

STEP 5: Flash Patched AP file (magisk_patched.tar) via Odin

This step requires you to install the Patched AP file (magisk_patched.tar) file onto your Samsung device via Odin. Here’s the complete coverage on this topic: How to Flash magisk_patched.tar (patched Samsung AP file) via Odin. The shorter explanation: First off transfer the magisk_patched.tar file to your PC where the other firmware files (AP, BL, CP, CSC, and HOME_CSC) are present.

flash magisk_patched.tar ap firmware root odin

Then connect your Samsung device to the PC via USB Cable (make sure it is booted to Download Mode). After this, load the following files to the Odin tool:

  • First off, click ‘BL‘ and load the BL firmware file.
  • Then click ‘AP‘ and load the magisk_patched.tar file.
  • After this, click ‘CP‘ and load the CP firmware file.
  • Finally, click ‘CSC‘ and load the CSC firmware file (the normal CSC file, not the Home CSC file).

Flash magisk_patched.tar (patched Samsung AP file) using Odin

  1. Once all the files have been loaded, go to the options section of the Odin Tool
  2. Then uncheck ‘Auto Reboot‘.
  3. Finally, click Start to begin the process.
  4. Once done, you should get the PASS!‘ message.

With this, you have successfully performed the steps to root your Samsung device via Magisk and Odin. You may now remove the device from the PC but do NOT reboot it. Refer to the next section for the complete instructions to reboot the right way.

STEP 6: Reboot to Rooted Samsung OS

Now that all the steps are completed, it’s time to boot your device. We have an extensive guide on the same topic, including the explanation as to why this needs to be done: How to Boot Rooted Samsung to Recovery Mode and Rooted OS. The shorter explanation follows:

  • To begin with, if the Ramdisk check via Magisk showed YES, then you could directly boot your device to the OS via the Power key.
  • However, if there is no Ramdisk (if it showed NO in Magisk), then the steps are slightly different. To begin with, check out the hardware key combination for your device that you use to boot it to the Recovery Mode. As an example, Galaxy S10 uses the Power + Bixby + Volume Up to boot it to recovery mode.
  • So get hold of the key combinations and then do as follow: “Press and hold the recovery key combinations until the device boots up and you see the Bootloader Unlock warning message. Then release all the buttons and you should be booted to the rooted OS with Magisk installed.”
  • Once your device boots to the OS, launch the Magisk Manager app, and you ‘might’ get a Required Additional Setup dialog box. Tap on OK and Magisk will install the required dependencies. Your device will then automatically reboot.

As to why this happens, it is because since your device doesn’t have Ramdisk, then Magisk has no choice but to install it to the recovery partition. That is why we took the help of the recovery mode route to boot to the rooted OS. All this has been explained in depth in the guide that we have linked above (check it out again: How to Boot Samsung to Rooted OS), it’s definitely worth a read.

On that note, we conclude the guide on how to root any Samsung device via Magisk and Odin. If you have any queries, do let us know in the comments section below. We will get back to you with a solution at the earliest.

About Chief Editor

8 thoughts on “How to Root any Samsung device via Magisk and Odin”

    1. Hi Alvin, did you let the Frija Tool complete the decryption process before extracting? Frija usually takes up to 3-4 minutes for the decryption process after downloading the firmware. if you try extracting in between, then you would get only half the files from the firmware.

  1. Good day.

    my magisk_patched.tar file is a big zip this supose to be like that?

    I did the AP patch and went to downloads to copy the magisk_patched.tar file but its a zip file.

    please help

  2. Abdulhafiz Idris

    Hi. Just wanted to thank you for the taking your time to help us with this steps. You even simplified it too. Thank you.

  3. After getting the Pass message from Odin, phone did not automatically reboot. I held down the power button to boot as Ramdisk check via Magisk had showed YES but nothing happened so I held down the Vol- and side key to cancel it. It is now stuck in a bootloop and won’t go into download mode regardless of any combination of buttons

  4. Many thanks for this very helpful procedure. I would like to add something that I found helpful while trying to root an S10+ with magisk 26.1. After flashing the initial stock rom I had to wait for the phone to finish updating itself (can be accelerated by preventing a full update to all apps) and reach a stable state before generating the patched AP file with magisk. Comparing patched AP tar files while this stable state was not yet reached has shown that they were different. This is probably caused by some signatures having to match the existing state of the phone.
    Another potentially helpful point is to use a patched Odin (not sure if this is necessary, after the first few failed attempts I have resorted to always using the latest patched Odin)
    Lastly bad USB cables can prevent a successful patched firmware upload.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.