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.

How to Pass Magisk SafetyNet on Rooted Android 11Root Android 11 via Magisk Patched boot.img (without TWRP)Fix Magisk patched boot.img issue while Rooting Android 11Disable DM-Verity or Android Verified Boot without TWRP

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.

Detailed Steps to Fix adb is not recognized ErrorFix: pip is not recognized as an internal or external commandHow to Fix Unauthorized Device with ADB Commands [3 methods]How to Fix Error: Cannot load recovery.img

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.

Prerequisites

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

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

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.

How to Update Magisk ZIP and Magisk Manager (without TWRP)Fix Magisk Module Bootloop without TWRP Recovery[Update: Added Magisk 21] Everything About Magisk- Manager, Modules and MoreHow to Fix TWRP Error 20 GApps after flashing LineageOS

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.

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

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.

[GUIDE] Flash ROMs/Magisk/TWRP/Kernels on A/B Partition DevicesHow to Flash Various Files in A/B Partition DevicesInstall Custom ROMs on any Android Device- Includes A/B PartitionHow to Fix FAILED (remote: unknown command) Error

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.

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

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.

Fix TWRP Error 7 (While Flashing Custom ROM via TWRP)How to Fix FAILED (remote: unknown command) ErrorHow to Permanently Install TWRP without TWRP ZIP File (only using TWRP.img file)Root Android Devices Without TWRP Recovery

About Chief Editor

How to Root any Samsung device via Magisk and Odin - 78How to Root any Samsung device via Magisk and Odin - 76How to Root any Samsung device via Magisk and Odin - 93How to Root any Samsung device via Magisk and Odin - 55How to Root any Samsung device via Magisk and Odin - 42How to Root any Samsung device via Magisk and Odin - 47How to Root any Samsung device via Magisk and Odin - 67How to Root any Samsung device via Magisk and Odin - 47