2023 June 8th Thursday

How to Root Samsung Galaxy A21s using Magisk

In this guide, we’ll take a deep dive into the process of rooting the Samsung Galaxy A21s using Magisk. Rooting provides users with a level of access to their device’s software that is not typically available, allowing for greater customization and performance optimization. If you’re looking to unlock the full potential of your device or simply curious about the rooting process, this guide is here to help.

Throughout this article, I’ll be showing you two methods of rooting your Samsung Galaxy A21s, both with and without TWRP recovery. Whether you’re a seasoned rooting pro or a newcomer to the scene, this guide is designed to make the process as simple and straightforward as possible. So, without further ado, let’s get started and see what rooting your Samsung Galaxy A21s with Magisk can do for you.

How to Root Samsung Galaxy A21s using Magisk
How to Root Samsung Galaxy A21s using Magisk

Installing TWRP on Samsung Galaxy A21s

TWRP, or Team Win Recovery Project, is a custom recovery tool that provides users with a number of additional options and features. With TWRP installed, you’ll be able to flash custom ROMs, perform full backups of your device, and much more. Additionally, TWRP allows you to reboot into different modes, including system, bootloader, and download mode, giving you even more control over your device.

I’ve already written a full article on how to install TWRP on your Samsung Galaxy A21s. Simply follow the instructions in the article to get started, and you’ll soon be able to root your phone using TWRP.

Read this: Install TWRP custom recovery on Samsung Galaxy A21s

Rooting Samsung Galaxy A21s using TWRP and Magisk

If you’ve already installed TWRP recovery on your Samsung Galaxy A21s, then you’re ready to start rooting your device using Magisk. This section will guide you through the process, step by step, so that you can have your phone rooted and ready to go in no time. So, let’s get started and see what rooting your Samsung Galaxy A21s with Magisk and TWRP can do for you!

  • Download Magisk Zip file and keep on internal storage.
  • Reboot your phone to TWRP recovery mode. (Keep pressing the “Volume Up” buttons and connect phone to pc using data cable).
  • Press install button on TWRP recovery.
TWRP Recovery
TWRP Recovery
  • Select your downloaded Magisk Zip file.
Install Magisk using TWRP
Install Magisk using TWRP
  • After select the file swipe to flash.
Swipe to conform Install
Swipe to conform Install
  • After successfully flash reboot phone to system.
Reboot System using TWRP
Reboot System using TWRP
Magisk App
Magisk App

Now that you have successfully installed Magisk using TWRP recovery on your Samsung Galaxy A21s, you can enjoy the benefits of rooting your device. You can now install custom ROMs, custom mods, and take full advantage of your device’s capabilities.

Rooting Samsung Galaxy A21s without TWRP

In this guide, I’m providing a second option for rooting your Samsung Galaxy A21s in case TWRP recovery is not available for your device. This process can be a bit more complicated, but with careful attention to the steps outlined below, you should be able to root your phone without any issues. So, let’s get started and explore how you can root your Samsung Galaxy A21s without TWRP recovery.

Unlock Developer Options on Samsung Galaxy A21s

  • Go to Phone Settings on your Samsung Galaxy A21s.
  • Scroll down and select About phone.
  • Next, select Software information.
  • Tap on the Build number multiple times.
  • Enter your phone’s lock screen Password.
  • You will now see the “Developer mode has been enabled!” toast message on the phone screen.

Enable is the OEM unlocking option on Samsung Galaxy A21s

  • Go to Phone Settings on your Samsung Galaxy A21s.
  • Scroll down and select Developer options.
  • Toggle ON the OEM unlocking option.
Enable the OEM Unlocking
Enable the OEM Unlocking

Unlocking the Bootloader

After enabling OEM unlocking, follow these steps to unlock the bootloader on your Samsung Galaxy A21s:

  • Power off your phone.
  • Press and hold the Volume Up and Volume Down buttons.
  • Connect your phone to your PC using the data cable.
  • Once you see the bootloader warning screen, press and hold the Volume Up button to unlock the bootloader on your device.

Confirming Bootloader Unlock

You will be prompted to confirm whether you want to unlock the bootloader, use the volume buttons to navigate to ‘Yes’ and press the power button to confirm.

Downloading Stock Firmware for Samsung Galaxy A21s

Before we proceed with rooting your Samsung Galaxy A21s, it’s important to have the correct stock firmware for your device. You can download the stock firmware from a reputable website like Samfw.com.

To ensure that you get the correct firmware for your device, you will need two pieces of information: the model number and the CSC (Consumer Software Customization) code or regional code. You can easily find your phone’s model number by going to Settings → About phone. With these two pieces of information, you can download the correct stock firmware for your Samsung Galaxy A21s.

Download 7zip and LZ4 Tools

After downloading the firmware, we need to extract it. To extract the firmware, we need to use a lz4 extract tool, which can be downloaded from the link provided below.

Download: 7zip Tool
Download: LZ4 Tool

To make sure you can extract the firmware file properly, you need to download and install the 7zip software on your PC. Once installed, use it to extract the LZ4 tool downloaded. This will make it easier for you to extract the firmware file and access the files inside it.

Preparing Patched Boot Image file

  • Extract the “AP” firmware package using 7zip.
  • Open the extracted folder and again Extract AP firmware file.
Samsung Firmware Extract
Samsung Firmware Extract
  • Now you will find boot.img.lz4 file.
Get the boot.img file form Samsung Firmware
Get the boot.img file form Samsung Firmware
  • Copy boot.img.lz4 to LZ4 Installed folder.
Copying boot.img.lz4 file from Samsung Firmware
Copying boot.img.lz4 file from Samsung Firmware

Converting boot.img.lz4 to boot.img File

  • Open the lz4 extracted folder.
  • Drag the boot.img.lz4 file to the lz4.exe program.
Converting boot.img.lz4 to boot.img file
Converting boot.img.lz4 to boot.img file
  • This step converts the file to .img format.

Patching the boot.img Firmware File with Magisk

  • Download and install the Magisk App on your phone.
  • Open the Magisk App.
  • Tap on the INSTALL button.
Install button on Magisk App
Install button on Magisk App
  • Select “Patch a file”.
  • Choose the boot.img file from your device.
Patching the boot.img with Magisk
Patching the boot.img with Magisk
  • Tap “LET’S GO” after the file is selected.
  • The patched file will be located in the Downloads folder.
  • Connect your phone to the PC and copy the magisk_patched.img file to your PC.

Converting .IMG File to .TAR for ODIN Flash Tool

  • Download and install the 7zip software on your PC.
  • Select the magisk_patched.img file.
  • Right-click the mouse and go to “7zip” > “Add to archive”.
Add to archive on 7zip
Add to archive on 7zip
  • In the “Archive format” option, select “TAR”.
Add to archive file using 7zip
Add to archive file using 7zip
  • Click “OK” to complete the conversion of the .IMG file to a .TAR file for ODIN flash tool.

Boot your Samsung Galaxy A21s into Download Mode

  • First, power off your phone.
  • Press Button Volume Up, Volume Down and connect your phone to your PC using data cable.
  • You will now see the Bootloader warning screen.
  • Long press Volume Up button to unlock bootloader.
  • If your device bootloader already unlock just press one time volume up button.
  • Following this method you enter to download mode.
Samsung Download Mode
Samsung Download Mode

Flashing Magisk_Patched.tar with Odin Flash Tool

  • Run Odin Tool.
  • Reboot your phone to download mode.
  • Connect your Samsung Galaxy A21s device to a PC/Laptop.
  • You will see ID:COM section light up blue. It means the port is working.
Odin Tool Port Connection
Odin Tool Port Connection
  • BL: Select the firmware file starting BL.
  • AP: Select the Magisk Patched AP firmware file (magisk_patched.tar)
  • CP: Select the firmware file starting CP.
  • CSC: Select the firmware file starting CSC.
Flashing Firmware using Odin Tool
Flashing Firmware using Odin Tool
  • Once done, click Start to begin the flashing process.
  • The first boot will take some time.
  • After on phone you will see in app drawer Magisk APK installed.

Conclusion

In conclusion, we have shown you how to root your Samsung Galaxy A21s using TWRP and Magisk and also without TWRP recovery. By following the step-by-step instructions provided in this guide, you should now be able to gain full control over your device and unlock its full potential. Remember to always read and follow the instructions carefully, and if you have any questions, feel free to ask on comment box. Keep in mind that rooting your device may void the warranty and also be aware of the risks involved.

Leave a Reply

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