How to Root Samsung Devices via Magisk Patched AP

root samsung

root samsung

In this guide, we will show you the steps to root your Samsung Galaxy device via the Magisk patched AP file. The devices from the South Korean conglomerate are currently among the popular devices in this domain, with its S series proving to be the MVP for this OEM. With that said, the device usually receives a mixed response from tech enthusiasts.

Two major reasons for the same are the underlying chipset and the region barrier [you cannot unlock the bootloader of the North American edition of these devices]. Apart from that, issues with Knox is another major concern as to why some geeks maintain a safe distance from this device. But for a subset of users out there, they could keep all these drawbacks aside because the perks associated with it far outweigh the caveats involved.

In this regard, while you could carry out tons of customization and high-level tweaks on your device, it is the ability to gain administrative privileges by rooting your Samsung device via Magisk which is the preferred one for the masses. So without further ado, let’s show you how this could be carried out.

Rooting a Samsung Device is Different

The usual approach of rooting an Android device involves patching the stock boot/init_boot file via Magisk and flashing it via Fastboot. However, when it comes to Samsung devices, then this method will not work, instead, you’ll have to extract the AP file from the firmware, patch it via Magisk, and then flash it via Odin. Moreover, you cannot simply flash the patched AP, you’ll have to flash all the other firmware files as well [AP, BL, and CSC].

While users were coming to terms with these changes, there’s yet another change that we are witnessing recently. Instead of only using the AP file, you now have to additionally use the BL file as well. In this regard, you have to extract BL, get vbmeta, pack it with AP, and then flash it via Odin. This new approach is only applicable across newer Samsung devices, such as S23, 24, and so on.

Another major difference and perhaps the biggest drawback as well is that rooting a Samsung device requires a data wipe, which isn’t the case with any other device out there. With that said, here are all the important things worth keeping in mind before you start off with the steps to root your Samsung device via Magisk patched AP file:

  1. You cannot unlock the bootloader of the North American (Canada and the USA) edition of Samsung devices. So rooting those devices is not possible.
  2. Rooting a Samsung device will wipe off all the data on your device. This is because the rooting process requires the CSC file to be flashed via Odin [instead of the Home_CSC file].
  3. Many Knox-related features might no longer work even if you unroot your device, return to stock, and relock the bootloader!
  4. You will not be able to install OTA updates on your rooted device as well. Your only course of action will be to How to Download Samsung Stock Firmware [Frija and SamFW], extract it, patch the AP, and then flash the entire firmware [patched AP, BL, CP, and Home_CSC/CSC] via Odin.download samsung firmware
  5. If you are just installing an update, such as monthly security patches or incremental OS upgrades, then you may use the Home_CSC instead of the CSC as a data wipe is not required.
  6. Also remember that you should never flash the stock boot/init_boot, recovery, or vbmeta partitions when rooted. If there’s a need to get this job done, then you should always flash the entire firmware [BL, CPO, and CSS].
  7. Moreover, never just flash the patched AP for root as Odin might shrink the size of the data partition. You should also flash BL, CP, and CSC along with patched AP to obtain root.

How to Root Samsung Devices via Magisk Patched AP

Before starting, please take a backup of all the on your device as the process will result in the device getting a factory reset. Thedroidwin will not be held responsible if something happens to your device after carrying out the below steps.

STEP 1: Enable USB Debugging and OEM Unlock

Your first course of action should be to enable both the aforementioned options, USB Debugging will help your PC identify the device in ADB Mode whereas OEM Unlock will allow you to unlock the bootloader the bootloader. So let’s enable both these toggles using the below-listed steps:

  1. First off, head over to Settings > About Phone > Software Information.
  2. Then tap on Build Number 7 times. This will enable Developer Options.samsung oem unlocking
  3. Go to Settings > Developer Options > Enable USB Debugging from there.
  4. Likewise, enable the OEM Unlocking toggle from the same menu as well.

STEP 2: Check Ramdisk

Another one of those unique rooting rules that only applies to Samsung devices, you’ll also have to verify whether your device has Ramdisk or not. Here’s how it could be done:

  1. Download and install the latest Magisk APK onto your device.
  2. Then launch the app and refer to the value next to Ramdisk.
  3. Note it down somewhere as it will be used later on in this guide.root samsung

STEP 3: Unlock Bootloader Samsung

Your next course of action should be to unlock the bootloader on your Samsung device. Again, the usual fastboot flashing unlock command is not going to work here, instead, you’ll have to take a different approach, as explained below:

  1. First off, power off your device and unplug it from PC [if it’s connected].
  2. Then press and hold the Vol Up + Vol Down keys together.
  3. While holding both keys, connect your device to the PC via a USB cable.
    download mode samsung
  4. As soon as you see the Warning message on your device, release the pressed keys.
  5. Now press the Volume Up key once and your device will be booted to Download Mode.
  6. From the Download Mode, press and hold the Volume Up key for a few seconds.
  7. This will take you to the Unlock Bootloader screen.unlock bootloader rsamsung
  8. Use the Volume Up button to reply to the affirmative.
  9. The process will now begin and will be completed within a few seconds.
  10. Once done, the device will automatically boot to the OS.

STEP 4: Download Samsung Firmware

You will now have to download the stock firmware for your device, the same version that is currently installed on your device. While you could download the firmware either via Frija or SamFw, however, the former will only let you download the latest available firmware.

root samsung

However, if you are on an older build and are not planning to update to the latest version for some reason, then you’ll have to use the SamFw website. If you are already on the latest OS, then you may use either of the two methods, as explained in our guide on How to Download Samsung Stock Firmware [Frija and SamFW].

STEP 5: Extract Firmware

  1. Next up, you’ll have to extract the downloaded firmware.
  2. So right-click on the firmware and extract it via the built-in Windows extraction tool or the 7ZIP software.
  3. Once done, copy the AP file from there and transfer it to your device.root samsung

STEP 6: Patch AP

Let’s now patch the AP file via Magisk which will subsequently be used to root your device.

  1. First off, transfer the extracted AP file to your device.
  2. Then launch the Magisk app and tap on Install > Select and patch a file.root samsung
  3. Now choose the AP firmware file and tap on Let’s Go. The patching will take a few seconds,
  4. Once done, you should get the magisk_patched.tar file placed inside the Download folder.
  5. We will now be using this file to root your Samsung device via Magisk and Odin.

STEP 7: Boot to Download Mode

You’ll now have to boot your device to Download Mode so that you could flash the patched AP file via Odin. For that, you may either refer to our detailed guide or check out the below shorter instructions.

  1. First off, power off your device and unplug it from PC [if it’s connected].
  2. Then press and hold the Vol Up + Vol Down keys together.
  3. While holding both keys, connect your device to the PC via a USB cable.
    download mode samsung
  4. As soon as you see the Warning message on your device, release the pressed keys.
  5. Now press the Volume Up key once and your device will be booted to Download Mode.

STEP 8: Flash Patched AP via Odin

We will now be flashing the patched AP [along with the rest of the firmware files BL, CP, and CSC] to your device via Odin. Do note that we arr using the CSC and not the Home_CSC because a wipe is a must while rooting Samsung.

  1. First off, download and extract the Odin Tool on your PC.extract launch odin
  2. Then transfer the magisk_patched.tar file to your PC where the other firmware files (AP, BL, CP, CSC, and HOME_CSC) are present.
  3. Now connect your Samsung device to the PC via USB Cable.
  4. Then 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.
  5. Once all the files have been loaded, go to the Options tab and uncheck Auto Reboot.auto reboot odin root samsung
  6. Finally, click Start to begin the process. Once done, you should get the PASS!‘ message.root samsung

With this, you have successfully performed the steps to root your Samsung device via Magisk and Odin. However, do NOT reboot your device now, instead directly move over to the next step.

STEP 9: Reboot to Rooted Samsung OS [For Non-Ramdisk Users]

  1. If the Ramdisk check that we performed earlier via Magisk showed YES, then you could directly boot your device to the OS via the Power key. Agree to do a factory reset if asked.
  2. On the other hand, if there is no Ramdisk [if it showed NO in Magisk], then you’ll have to take the help of the recovery mode.
  3. First off, check the hardware key combination for your device that you use to boot it to the Recovery Mode.root samsung
  4. Then 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.
  5. Once your device boots to the OS, launch the Magisk app, and you’ll get a Required Additional Setup dialog box. Tap on OK and Magisk will install the required dependencies. Your device will then automatically boot to the OS.

That’s it. These were the steps to root your 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 as soon as possible.

How to Root Samsung Devices via Boot/Init_Boot

As discussed earlier, newer Samsung devices such as S23 and S24 follow a different path when it comes to rooting. Instead of simply patching the AP and flashing it via Odin, you’ll have to extract the AP, get the init_boot.img, and then patch it via Magisk, and flash it via Odin. And that’s not it.

You also need to extract the BL file, extract the vbmeta, patch it via Magisk and flash it via Odin. But instead of doing this task indivusally for both these files we will combine both the init_boot and vbmeta into one single TAR file, patch it via Magisk, and flash it to the AP slot of Odin.

  1. To begin with, carry out the STEPS 1 to 3 listed in the above section.samsung oem unlocking
  2. Then download the stock firmware for your device via Frija/SamFW.
  3. Now extract the firmware and you’ll get AP, BL, CP, CSC, and Home_CSC.root samsung
  4. Extract the AP file via 7ZIP and you’ll get the init_boot.img.lz4 file.
  5. Likewise, extract the BL file via 7ZIP and get the vbmeta.img.lz4 file.
  6. Now select both these files, right-click on them, and select 7ZIP – Add to Archive.
  7. Then select the Archive Format as “tar”, name the file AP, and hit OK.
  8. You’ll get the AP.tar file. Transfer it to your device.
  9. Then launch the Magisk app and tap on Install > Select and patch a file.root samsung
  10. Now choose the AP.tar file and tap on Let’s Go. The patching will take a few seconds.
  11. Once done, you should get the magisk_patched.tar file placed inside the Download folder.
  12. Now launch Odin and load this patched AP file along with BL, CP, and CSC files.
  13. Then boot your device to Download Mode so that we could flash the files via Odin.
    download mode samsung
  14. Once that is done, let’s load the firmware files to Odin, as explained below:
    • 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.
  15. Once all the files have been loaded, go to the Options tab and uncheck Auto Reboot.auto reboot odin root samsung
  16. Finally, click Start to begin the process. Once done, you should get the PASS!‘ message.root samsung
  17. Now, if your device has Ramdisk [test result in Magisk], then you may reboot the device to the OS. Once it boots up, launch Magisk and it might ask you to carry out additional setup, tap OK, and wait for the process to complete.
  18. On the other hand, if the Ramdisk showed No, then DO NOT reboot your device. Instead, refer to STEP 9 in the above section and complete the rest of the steps.

That’s it. These were the steps to root your Samsung device via init_boot and vbmeta [AP and BL] files and Magisk. All your queries regarding the same are welcomed in the comments section below.


Leave a Reply

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