How to root Samsung One UI 5.0 using the Magisk Patched AP

The Android 13 firmware has been the talk of the tech world for some time and Samsung is among the earliest adopters of the new OS build. The fifth variant of the One UI comes with a wide variety of exciting features in addition to many under-the-hood tweaks too. If that wasn’t enough, the users can also root their devices and open a pathway to countless tweaks and modifications. In this guide, you’ll get to know how to root Android 13-based Samsung One UI 5.0 using the Magisk Patched ap.

You can try out a wide variety of modifications to your device once you have rooted it by flashing the Magisk-patched boot.img using Fastboot Commands. Custom ROM flashing, custom recovery installations (like TWRP), and custom kernel flashing are all examples. Additionally, you can flash Magisk Modules, Xposed Framework, Substratum Themes, Viper4Android, and similar apps. But this is only one side of the argument. There are drawbacks to this approach.

An unlocked bootloader is the first step in the rooting process. If you do this, your device’s warranty will be voided and you’ll lose access to any data stored on it. As such, rooting will trigger the Knox, which could prevent apps that rely on it from working. If these shortcomings don’t bother you, the tutorial to root One UI 5.0 can be found beneath.

Steps to root Android 13-based Samsung One UI 5.0 using the Magisk Patched ap

root Samsung One UI 5.0 using the Magisk Patched AP

Step 1: Unlock the bootloader

  1. To start off, enable Developer Options followed by OEM unlocking on your Samsung phone
  2. After that, boot it to the Download Moe
  3. Press and hold the Volume Up key for a couple of seconds until you’re taken to the Device Unlock Mode
  4. Lastly, hit the Volume Up button for confirming the unlocking of the bootloader
  5. Once your device boots up, you should connect it to the Internet and then verify that the OEM unlocking is enabled

Step 2: Download the One UI 5.0 stock firmware

frija tool samsung galaxy m21 stock firmware 768x512 1
Credit: magiskapp.com
  1. Start by downloading the Frija Tool and then extract it to your PC
  2. Relaunch the tool before typing your device’s Model Number and CSC Code
  3. After that, click on the Check Update button and it’ll bring up the latest Android 13 firmware
  4. Click on the Download button and choose the directory where you want to download the firmware and then hit Save
  5. The downloading process will start
  6. Once it is done, the tool will decrypt the firmware
  7. Once the decryption is complete, it’ll spell out the Download Complete message
  8. Head over to the folder where you’ve downloaded the firmware and then extract it
  9. After extraction, you’ll get the AP, CP, BL, CSC, and Home CSC files

Step 3: Install Magisk and then check Ramdisk

Magisk_Module_1

  1. To start, download and install the Magisk app on your smartphone (it is recommended that you should try the Canary build)
  2. Once installed, you should launch the app and then note down the value next to Ramdisk
  3. Note down the YES/NO value as it’ll come in handy later

Step 4: Patch the Samsung AP File

Patch the Samsung AP File

  1. Go to the folder where you had extracted the firmware files
  2. Transfer the AP TAR files over to your device
  3. Then, launch the Magisk App and then tap on the Install button next to Magisk
  4. In case your device doesn’t have Ramdisk, ensure that the Recovery Mode option is enabled
  5. Now, choose Select and Patch a File before navigating to the AP TAR file and then select it
  6. Tap on the “Let’s Go” button located at the top-right corner and then wait for the patching to complete
  7. Once it is done, you’ll get the patched AP file named “magisk_patched_[random_number].tar” under the Downloads folder

Step 5: Send Patched AP TAR to PC using ADB pull

Open CMD

  1. To start off, download Android SDK Platform-tools and then extract them to any convenient location on the PC
  2. After that, go to the platform-tools folder and type in CMD in the address bar before hitting enter to launch the CMD window
  3. Connect your smartphone to the PC using a USB cable (ensure that you’ve enabled USB debugging from Developer Options)
  4. Use the following command for transferring the patched AP file to your PC –
adb pull/sdcard/Download/magisk_patched_[random_strings].tar

Step 6: Boot your device to Download mode

  1. Power off your smartphone
  2. Press and hold the Volume Up + Volume Down keys together
  3. while keeping both these keys pressed, connect your smartphone to the PC using a USB cable
  4. Lastly, leave the two buttons and hit the Volume Up key for booting to Download mode

Step 7: Install Odin

Lates-Odin 3.14.4 Interface

  1. To start off, download the Odin tool and extract it to a convenient location on your PC
  2. Then, go to the folder where you’ve extracted Odin
  3. Double-click on the Odin exe file for launching the tool

Step 8: Flash the patched AP and then root Samsung One UI 5.0

Flash the patched AP with magisk
Credit: github
  1. Launch the Odin tool and click on the BL button
  2. Navigate to the extracted firmware folder before selecting the BL file
  3. Then, click on the AP button and navigate to the patched AP.tar file before selecting it
  4. Then, click on the CP button and navigate to the extracted firmware folder before selecting the CP file
  5. Then, click on the CSC button and navigate to the extracted firmware folder before selecting the CSC file
  6. It is advised that you should flash the normal CSC file instead of the Home_CSC file as there will be a requirement for a factory reset
  7. Once the files are loaded, click on the Start button and the flashing will begin
  8. Once it is done, you’ll get the “PASS!” message and your device will be automatically booted to the OS

Step 9: Boot to Stock Recovery for enabling Magisk

  1. Press the Recovery key combination buttons that you wish to use to boot your smartphone to recovery
  2. Once you see the splash screen, long-press the Volume up key and you’ll be booted to the Recovery mode
  3. Once it is done, Magisk will be enabled and you can reboot the OS

Step 10: Complete the Magisk setup

Magisk additional setup screen

  1. Once your smartphone boots up, launch the Magisk app
  2. It’ll ask for additional setup and you’ll need to tap on “OK”
  3. Magisk will install the additional dependencies
  4. Once done, your device will be rooted automatically

This concludes our tutorial on using Magisk to gain root access on a Samsung device with the One UI 5.0 based on Android 13. Please let us know in the comments if you have any questions about the procedures outlined above.

Aviral Sharma
Aviral Sharma
Aviral Sharma is a talented and passionate writer who has been using words to express his thoughts ever since he learnt how to hold a pen. He is passionate about outer space, history, sports and most importantly technology. Aviral is a regular writer for rootmygalaxy.net and has been getting better by the day. He currently own Samsung Galaxy S24 Ultra, iPhone 13 and a HP Pavilion laptop

Leave a Comment