Home > Root

How to Root Samsung Galaxy via Magisk Patched AP and TWRP

In this guide, we will show you two different methods to root your Samsung Galaxy device via Magisk and TWRP. The newest additions to the Galaxy family bring a slew of noteworthy goodies and a power-packed specs sheet to the fore. To round it all off, there are tons of nifty AI features to look forward to. However, for tech enthusiasts, this is just the tip of the iceberg as they still have a largely unchartered territory to look forward to.

From welcoming abode a plethora of custom binaries and modules to installing custom kernels, the possibilities stand endless. However, before they can carry out any of these tweaks, they’ll have to root their device via the Magisk Patched AP file or with the help of a custom recovery like TWRP. And in this guide, we will help you with just that. So without any further ado, let’s get started.

Benefits and Risks of Rooting Samsung

root Galaxy S24 Ultra

Once you root your device, you will be in a position to flash a plethora of mods. These include the likes of Fox Magisk ModulesSubstratum ThemesXposed Framework via LSPosed, and Viper4Android among others. Along the same lines, you could also flash a custom kernel and implement your desired CPU profile. However, such tweaks do come with a few risks as well.

To begin with, rooting requires you to unlock the bootloader- which will wipe off all the data and will trip the Knox [while there’s no way to escape this, you could still use some security features using this nifty method]. Likewise, SafetyNet will be triggered [FIXED] which will result in your inability to use banking apps [FIXED]. So if that’s all well and good, then let’s get started with the steps to root your Samsung Galaxy device vis Magisk patched AP file and TWRP.

Should I Root Samsung via Patched AP or TWRP?

root samsung magisk twrp

There exist two different methods through which you could root your Samsung: via TWRP and using Magisk Patched AP. So which method should you opt for? Well, rooting via TWRP is a much faster and easier method as you don’t have to download the stock firmware [which is at the very least 8GB in size].

Likewise, there is no need to extract the firmware, patch the AP, and flash it via Odin. Instead, you could simply flash the Magisk ZIP via TWRP and then install the Magisk APK. With that said, the only reason users opt for the Manual AP Patching method is due to a lack of custom recovery for their device, in which, there is no other way out [not taking into account Kernel SU].

Root Samsung Galaxy via Magisk Patched AP

UPDATE: A new guide on Rooting Samsung via Magisk Patched AP [without TWRP] is now live. Don't forget to check that out as well!

Before starting, please take a backup of all the data on your device. 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 and data by performing the below steps.

STEP 1: Unlock Bootloader

First and foremost, you will have to unlock the bootloader on your device. Do note that doing so will trip Knox and reset your device. If that’s well and good, then you may refer to our guide on How to Unlock the Bootloader on any Samsung Device [New VaultKeeper Method].

STEP 2: Download Stock Firmware

Next up, you will have to download the stock firmware for your device. In this regard, you could use either the Frija Tool or the SamFW website. Just make sure to download the same firmware that is currently installed on your device. Likewise, the CSC number should also be the same. Once you have downloaded the firmware, extract it to any location on your PC. This will give you AP, BL, CP, CSC, and Home_CSC. We will be using these files to root your Samsung via Magisk and TWRP.

STEP 3: Patch Samsung AP via Magisk

  1. Transfer the AP file from the extracted firmware folder over to your device.
  2. Then download and install the latest version of the Magisk App.
  3. Now launch the app and tap on the Install button next to Magisk.
    Root Galaxy S24 Ultra
  4. Now choose Select and Patch a File, navigate to the AP TAR file and select it.
  5. Then tap on the Let’s Go button situated at the top right and wait for the patching to complete.
    Root Galaxy S24 Ultra
  6. Once done, you should get the patched AP file named magisk_patched_ [random_number].tar under the Downloads folder.

STEP 4: Send Patched AP File to PC

You will now have to transfer this patched AP file to your PC. However, in rare cases, the normal USB transfer method is known to cause some issues. Therefore, you could instead opt for the ADB Pull method. Here’s how it could be done:

  1. To begin with, download Android SDK Platform Tools and extract it to any convenient location on your PC.
    install adb platform tools windows
  2. Then head over to this platform-tools folder, type in CMD in its address bar, and hit Enter. This shall launch the CMD window.
    command-prompt-inside-adb
  3. Now connect your device to the PC via a USB cable. Then, enable USB Debugging from Developer Options.
  4. Next up, use the below command to transfer the patched AP file to your PC (make sure to replace the random strings accordingly)
    adb pull /sdcard/Download/magisk_patched_[random_strings]

STEP 5: Boot Device to Download Mode

You will now have to boot your device to Download Mode so that Odin can identify it and hence allow you to carry out the flashing of the patched AP file. So refer to our guide to Boot any Samsung Device to Download Mode. Or refer to our below direct instructions:

METHOD 1: Via Hardware Keys

  1. Start by powering off your device.
  2. Then press and hold Vol Up + Vol Down together and connect your device to the PC via USB cable.
    Root Galaxy S24 Ultra
  3. As soon as you see the Warning message on your device, release the pressed keys.
  4. Finally, press the Volume Up key once and your device will be booted to Download Mode.

METHOD 2: Via ADB

  1. To begin with, download and extract Android SDK Platform Tools on your PC.
  2. Then enable USB Debugging and connect your device to the PC via a USB cable.
  3. Open Command Prompt inside platform-tools and type in the below command:
    adb reboot download
  4. Your device will boot to Download Mode and you may proceed with the flashing.

STEP 6: Install Odin

You may now get hold of the Odin Tool from below. This tool will help you to flash the patched AP file.

  1. To begin with, download the Odin Tool from this link.
  2. Then extract it to a convenient location on your PC.
    Root Galaxy S24 Ultra
  3. After that, head over to the folder where you have extracted the tool.
  4. Finally, double-click on the Odin3_v3.14.4 EXE file to launch the tool.

STEP 7: Flash Patched AP file via Odin and Root Samsung

  1. To begin with, launch the Odin tool on your PC.
  2. Then click on the BL button, navigate to the extracted firmware folder, and select the BL file.
  3. After that, click on the AP button, navigate to the patched AP.tar file, and select it.
    Root Galaxy S24 Ultra
  4. Next up, click on the CP button, navigate to the extracted firmware folder, and select the CP file.
  5. Then click on the CSC button, navigate to the extracted firmware folder, and select the CSC file [the normal CSC, not the HOME_CSC].
  6. Once all the files have been loaded, click on the Start button.
  7. The flashing process will now begin and could take a few minutes.
  8. Once done, you should get the PASS!‘ message. Likewise, your device will automatically boot to the OS.
    Root Galaxy S23 Ultra

STEP 8: Install Magisk Dependencies

  1. First off download and install the latest Magisk APK.
  2. Then launch it. It will ask to carry out additional setup, tap OK.
  3. Magisk will restart your device and install the required dependencies.
  4. Once done, your device will automatically boot to the rooted OS.

That’s it. These were the steps to root your Samsung Galaxy via Magisk Patched AP, let’s now show you how this could be done via TWRP.

How to Root Samsung Devices via TWRP [Without Magisk Patched AP]

The below process will wipe off all the data from your device, so please take a complete device backup beforehand. 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 and data by performing the below steps.

STEP 1: Unlock Bootloader

Your first course of action should be to unlock the bootloader on your device. Do note that doing so will trip Knox and reset your device. If that’s well and good, then you may refer to our guide on How to Unlock Bootloader on any Samsung Device [New VaultKeeper Method].

STEP 2: Install TWRP Recovery

Next up, install the TWRP Recovery on your device. For that, you may either refer to our detailed guide on Install TWRP Recovery Samsung Galaxy [multidisabler/fbedisabler] or check out the below shorter instructions:

  1. Download the TWRP Recovery and vbmeta_disabled TAR files.
  2. Boot your device to Download Mode via ADB or hardware keys. install twrp recovery samsung
  3. Now download and extract Odin Tool on your PC and launch it.
  4. Now load TWRP in the AP slot and vbmeta in the Userdata slot.
  5. Then go to Options tab and uncheck Auto Reboot. Now hit Start.root samsung twrp
  6. The flashing will now start and will only take a couple of seconds.
  7. Once done, press and hold the Power and the Volume Down keys.
  8. When the device powers off, press and hold Power and Volume Up.
  9. Your device will now boot to TWRP. Let’s now remove encryption.
  10. So refer to Multidisabler [steps 11 to 13] or Fbedisabler [steps 14 & 15].root samsung twrp
  11. Type in multidisabler and hit Enter. It will resize the vendor partition.
  12. TWRP will again ask you to type in multidisabler. Do so and hit Enter.
  13. Now go to Wipe > Format Data > Type in YES > hit the blue checkmark.root samsung twrp
  14. Go to Wipe > Advanced Wipe, select the below partitions and wipe them:
    CACHE, DATA, METADATA, KEYDATA, and KEYREFUGE
  15. Once done, go to Reboot and select Recovery. Device will reboot to TWRP.

STEP 3: Flash Magisk via TWRP

  1. To begin with, transfer the Magisk ZIP file to your device.
  2. Then go to Install, select the Magisk ZIP, and then flash it.root samsung twrp
  3. Now go to Reboot > System. The device will boot to the OS.
  4. Install Magisk APK and launch it. Do the Update/Install.
  5. It will now ask you to install some additional dependencies.
  6. Tap OK/Allow and your device will auto-reboot to the OS.
  7. Again launch Magisk, tap Install, and select Direct Install.
  8. Let Magisk do its job and then tap on the Reboot button.
  9. Device will reboot to the rooted OS with Magisk installed.root samsung twrp

That’s it. These were the steps to root your Samsung device via TWRP. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.


Share: