Home > Root

How to Root Samsung One UI 4.0 Android 12 via Magisk

In this guide, we will show you the steps to root your Samsung device, running the latest One UI 4.0 based on Android 12, via Magisk. The latest iteration of the OS build has bought in a plethora of goodies for the end-users. These include the likes of a new Material You UI and Wallpaper based theming engine that automatically picks up the major color from the wallpaper and applies it as the device theme. Apart from that, you would also get a new Privacy Dashboard, improvements to the camera app design, and a new widget selection screen.

However, this is what the OS has to offer. You always have the option to extract the maximum potential of your device by stepping into the realms of custom development. Be it for flashing Custom ROMs or installing a custom recovery like TWRP, the possibilities stand endless. Along the same lines, you could also gain administrative privileges and access to the system partition by rooting your device. And in this guide, we will help you with just that. Given here are the detailed instructions to root Samsung devices running One UI 4.0 Android 12 via Magisk. Follow along.


Benefits and Risks of Rooting

root samsung one ui 4.0 android 12 via magisk

Once you root your device by flashing the Magisk patched boot.img via Fastboot Commands, you will be in a position to try out a plethora of customizations on your device. These include the likes of flashing custom ROMs, installing a custom recovery like TWRP, or flashing a custom kernel. Along the same lines, you could also flash Magisk ModulesXposed FrameworkSubstratum ThemesViper4Android, and the likes. However, this is just one side of the story.

Carrying out this process also has its downsides.  The first prerequisite in rooting calls for an unlocked bootloader. Doing so will wipe off all the data on your device and make the warranty null and void. Likewise, rooting will trip the Knox, and apps dependent on it might not function. Then the SafetyNet will be triggered, which might cause issues with banking apps [FIXED]. So if all that’s well and good, then let’s get started with the steps to root Samsung devices running One UI 4.0 Android 12 via Magisk.

How to Root Samsung One UI 4.0 Android 12 via Magisk

The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned below. 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 device’s bootloader. Please take a complete device backup beforehand and then refer to our guide on How to Unlock the Bootloader on any Samsung Device [New VaultKeeper Method]. In short, here’s what you need to do

  1. To begin with, enable Developer Options followed by OEM Unlocking on your device.
  2. Then boot it to the Download Mode.
  3. After this, press and hold the Volume Up key for a few seconds, until you are taken to the Device Unlock Mode.
    root samsung one ui 4.0 android 12 magisk
  4. Finally, hit the Volume Up button to confirm the unlocking of the bootloader.
  5. When your device boots up, connect it to the Internet and verify the OEM Unlocking is enabled.
  6. NOTE: Do not restore the data now as your device will have to undergo a factory reset in the subsequent steps.

STEP 2: Download Samsung One UI 4.0 Stock Firmware

Next up, you will have to download the stock firmware for your device. There are quite a few ways of doing so. For example, you could use the Frija Tool, SamLoader Tool, or websites such as SamMobile. As for this guide, let’s proceed with the Frija Tool. So you may check out our comprehensive guide on How to Download Samsung Stock Firmware/ROM via Frija Tool. Or refer to the below instructions:

  1. To begin with, download the Frija Tool and extract it to any convenient location on your PC.
  2. Then launch the tool and type in your device’s Model Numer and CSC Code. [Read: How to Find My Device’s CSC Code].
  3. Now click on the Check Update button and it shall bring up the latest Android 12 firmware.
    root samsung one ui 4.0 android 12 magisk
  4. Finally, click on the Download button, select the directory where you wish to download the firmware, and hit Save.
  5. The downloading process will now begin. Once done, the tool will then decrypt the firmware.
    root samsung one ui 4.0 android 12 magisk
  6. Once the decryption is complete, it shall spell out the Download Complete message.
    root samsung one ui 4.0 android 12 magisk
  7. Now go to the folder where you have downloaded the firmware and extract it. Upon extraction, you should get the AP, BL, CP, CSC, and Home CSC files. We will be using these files to root your Samsung device running One UI 4.0 Android 12 via Magisk.
    root samsung one ui 4.0 android 12 magisk

 STEP 3: Install Magisk and Check Ramdisk

  1. To begin with, download and install the Magisk App onto your device.
  2. As of now, it is recommended to try out the Canary build.
    root samsung one ui 4.0 android 12 magisk
  3. Once installed, launch the app and note down the value next to Ramdisk [whether YES or NO].
  4. This value will come in handy later on in this guide.

STEP 4: Patch Samsung AP File

We will now be patching the AP file via Magisk which will subsequently be flashed onto your Samsung device running One UI 4.0 Android 12 to root it. So either refer to our detailed guide on How to Patch Samsung AP Firmware via Magisk or check out the below direct instructions:

  1. Head over to the folder where you have extracted the firmware files.
  2. Then transfer the AP TAR file from there over to your device.
  3. After that, launch the Magisk App and tap on the Install button next to Magisk.
    root samsung one ui 4.0 android 12 magisk
  4. If your device doesn’t have Ramdisk, then make sure that the Recovery Mode option is checked.
  5. Moving on, now choose Select and Patch a File, navigate to the AP TAR file and select it.
  6. Then tap on the Let’s Go button situated at the top right and wait for the patching to complete.
    root samsung one ui 4.0 android 12 magisk
  7. Once done, you should get the patched AP file named magisk_patched_[random_number].tar under the Downloads folder.

STEP 5: Send Patched AP TAR to PC via ADB Pull

You will now have to transfer this patched AP file to your PC. However, the normal USB method is known to cause some issues. Therefore, you should instead opt for the ADB Sideload method. Here’s how:

  1. To begin with, download Android SDK Platform Tools and extract it to any convenient location on your PC.
  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 USB  cable. Make sure to 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].tar

STEP 6: Boot your Samsung Device to Download Mode

You will now have to boot your S21 device to Download Mode so that Odin is able to identify it and 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:

  1. To begin with, power off your device.
  2. Then press and hold the Volume Up and Volume Down keys together.
    root samsung one ui 4.0 android 12 magisk
  3. While pressing both these keys connect your device to the PC via USB cable.
  4. Finally, leave both these buttons and hit the Volum Up key to boot to Download Mode.

STEP 7: Install Odin

  1. To begin with, download the Odin Tool from this link.
  2. Then extract it to a convenient location on your PC.
    root samsung one ui 4.0 android 12 magisk
  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 8: Flash Patched AP and Root Samsung One UI 4.0

  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.
    root samsung one ui 4.0 android 12 magisk
  3. After that, click on the AP button, navigate to the patched AP.tar file and select it.
    root samsung one ui 4.0 android 12 magisk
  4. Next up, click on the CP button, navigate to the extracted firmware folder and select the CP file.
    root samsung one ui 4.0 android 12 magisk
  5. Then click on the CSC button, navigate to the extracted firmware folder and select the CSC file.
    root samsung one ui 4.0 android 12 magisk
  6. As of now, it is advised to flash the normal CSC file and not the Home_CSC file because there is a requirement for a factory reset.
  7. Once all the files have been loaded, click on the Start button. The flashing process will now begin and could take a few minutes.
    root samsung one ui 4.0 android 12 magisk
  8. Once done, you should get the PASS!‘ message. Likewise, your device will automatically boot to the OS.
    root samsung one ui 4.0 android 12 magisk

STEP 9: Boot to Stock Recovery to Enable Magisk

Now if your device doesn’t have Ramdisk (see STEP 3), then you will have to boot your Samsung device to Recovery Mode in order to enable magisk. This is because, in the absence of Ramdisk, Magisk had no choice but to install itself in the Recovery partition. So you will now have to boot to the stock recovery.

  1. For that, press the recovery key combination buttons that you use to boot your device to recovery.
  2. Then as soon as you see the splash screen, long-press the Volume Up key and you will be booted to the Recovery Mode.
  3. Once that is done, the Magisk is enabled and you may now reboot to the OS.

STEP 10: Complete Magisk Setup

  1. Once your device boots up, launch the Magisk App.
  2. It will ask for additional setup, tap OK.
    root samsung one ui 4.0 android 12 magisk
  3. Magisk will now install the additional dependencies.
  4. Once done, it will automatically reboot your device.

So with this, we round off the guide on how you could root your Samsung device, running the latest One UI 4.0 based on Android 12, via Magisk. 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:
  • Sn. Hasan: Kurtarma Modda TWRP olabilirmi. Yaptim. yeniden başlsttıgımda Magisk Onaylama kayboldu. Lütfen bu konuda ayrıntılı yazarmisınız. Lütfen Teşekkür ederim…!

  • note 10 n971n

    I did this but literally, nothing happened… i followed the entire thing

  • Mihail Melnic

    would it work on Note 10 ?

  • Its really important to use latest MAGISK CANARY for Android 12 (also to patch the AP!!), otherwise Magisk manager won’t detect magisk as installed after this procedure.

  • de Graaf, Hugo

    I have a Galaxy S10+. After flashing the phone ended up in a boot loop. After putting the phone in recovery mode I did a factory reset. It started up normally, however unrooted. How can I solve this?

  • I have a rooted S21 Ultra with UI 3.1 latest version. Safetynet is working.
    I’m used to manually flash every update that comes out.
    I want to flash the new UI 4 (Android 12), but I’m afraid that it will break Safetynet and maybe other features. Can I just flash the latest update with UI 4.0 and be done with it, or will it break some things that are working for me now?