Unlock Bootloader and Root Samsung Galaxy M51 using Magisk

Samsung is looking to mark its presence in the lower mid-range segment of the Indian market. With this plan, just recently, after launching in Germany last week, Samsung has unveiled the Samsung Galaxy M51 in India. This device will go head-on against the Oneplus Nord, and it has a lot going for itself. Samsung fans looking for a phone in this segment now have an excellent choice to consider.

If you happen to be one of the owners of the Galaxy M51 smartphone and are looking for ways to unlock the bootloader and root your phone then, you are at the right place. In this post, we will guide you on how to unlock the bootloader and root your Samsung Galaxy M51. In order to avoid any issues, we would advise you to follow the steps mentioned in this post. So, that being said, let us get straight into the article itself:

Unlock Bootloader and Root Samsung Galaxy M51 using Magisk

Samsung Galaxy M51 Specifications

Samsung is a pioneer in displays, and they are not holding back with the M51 either. We get a 6.7-inch FHD+ Super AMOLED Infinity O display with an aspect ratio of 20:9. The selfie camera is housed in a small center punch hole at the top. The peak brightness is a bit low, though, at just 420 nits. And we only get the dated Corning Gorilla Glass 3 protection in the front. Under the hood, we get the capable Snapdragon 730G, which is a bit old but still a competent processor. It can handle most games and heavy-duty tasks easily.

With the Samsung Galaxy M51, we also get Android 10 onboard running on top of One UI 2.1. And we get two RAM options with this device, a 6GB base variant and an 8GB upper variant. The internal storage remains the same at 128GB. In terms of optics, we get a quad-core setup at the back with a 64MP Sony primary sensor, a 12MP ultra wide-angle sensor, a 5MP depth sensor, and a 5MP macro sensor. On the front, we get a 32MP selfie shooter. The front camera support 4K video recording along with Front Slow Motion Video, AR Doodle, and AR Emoji.

The Galaxy M51 is not a 5G compatible device, and you get only 4G(LTE) here along with the other basic connectivity options like Wi-Fi, Bluetooth v5.0, GPS/ A-GPS, USB Type-C, and a 3.5mm headphone jack. You don’t get the modern In-display fingerprint sensor, though. Instead, you get a side-mounted fingerprint sensor. The base variant is priced well at 24999 INR, and the 8GB variant is priced at 26999 INR. And it will go on sale on the 18th of September at Amazon and Samsung.com.


Now before we go ahead and root the Galaxy M51, let us make a list of pre-requisites that are required to unlock it:

Charge your phone

You need to make sure that your Galaxy M51 is charged to about 60% before operating it for unlocking the bootloader to avoid any boot loop issues during the unlocking process.

You need a PC or Laptop

We would be running certain ADB and Fastboot commands that can be executed via PC or a laptop. So, we would need a computer in order to unlock the bootloader.

Take a complete backup

Before rooting, one of the most important things that you need to do on your phone is to take a complete backup of your phone. For that, you can follow the guide by clicking the link below:

Download USB Drivers

In order to make your Galaxy M51 get recognized by your PC, you need to have proper USB Drivers appropriate to your phone installed on your computer. And for that, you can follow the link below to download the correct Samsung USB Drivers on your PC.

Install ODIN in PC

Odin is used to flashing stock firmware file (in .tar or .tar.md5 formats) on Android-based Samsung devices and supports any Windows 10, 8.1, 8, 7, XP PC. You can install the latest Odin tool on your PC from the link given below:

Download Firmware

You can use either of the links below to download the firmware for your Galaxy M51.


Before we begin with the rooting of the device, I would strongly recommend you to create a backup of your device storage and all your files stored on your device. Rooting the smartphone will wipe off the entire data on your device and will void warranty. Moreover, it is advised to follow the steps mentioned in this post very carefully to avoid permanent damage or to brick your device. If anything goes wrong the author or GetDroidTips is not responsible for it.

Steps to Unlock Bootloader on Galaxy M51

Once you are ready with everything that is mentioned in the list of pre-requisites above, you can go ahead and root your Samsung Galaxy M51 by following the steps below:

Step 1: Activate the Developer option

  1. Enable the Developer Option on your device. To do this go to Settings>> About>> Software Information>> More.
  2. Tap on the Build Number 7-8 times until you see a message “Developer option enabled.”

Step 2: Enable USB Debugging, OEM Unlocking and Developer option

  1. Now head back to Settings>> Developer Option>>Enable USB Debugging as well as OEM unlocking.

Step 3: Unlock Bootloader on your device

  1. In order to unlock the bootloader on your Galaxy M51, turn off your phone.
  2. Press the button combo: Hold Volume up + Volume down and plug your phone to your PC.
  3. Now long-press the Volume Up button to unlock the bootloader.

To Know More: Follow our guide to unlock the bootloader on any Samsung Galaxy smartphone

Steps To Root Galaxy M51 using Magisk

Before starting the rooting process, make sure to unlock the device bootloader at first. Then you can continue with the next steps.

Please Note:

Please Note:

  • Rooting will block the official OTA updates
  • After Rooting, it may void the warranty of your phone
  • Supported model:
    • Galaxy M51: SM-M515F

Download Firmware

After you have downloaded the exact firmware file based on your device model number, you can extract the boot.img file to patch it via the Magisk manager app.

Guide to Extract Boot Image File and rename to .tar file

Steps to Create a Patched boot image using Magisk Manager

  • First, download and install the latest Magisk Manager app.
  • Next, connect your device to the PC via the USB cable.
  • Copy only the boot.img file from the extracted folder to your device storage.
  • Now, open the Magisk Manager app and select INSTALL and choose to install again.
  • Then tap on “Patch Boot Image File”.

  • Go to internal storage and select your device boot image that you moved earlier.
  • Now, wait for Magisk to start patching the boot image.
  • Once the boot image has been patched, copy the “patched_boot.img” from the internal storage and replace it in the same extracted ROM folder on your PC.

Now, follow the second step to flash the patched boot image file.

  • Odin flash tool accepts files in .tar format. So, you have to use 7zip and archive it to .tar format. You can even rename the file as boot.img.tar as shown in the below screenshot.

Steps To Install the Patched Boot Image tar file on Galaxy M51

Now, follow the final or second method to install the patched boot image file on your Galaxy handset. But first, follow the requirements.


  • ROM Supported for – Samsung Galaxy M51 model only. Don’t try it on other devices.
  • Keep your device battery charged up to 60% at least before doing anything.
  • Take a full backup without the root of the device’s internal storage.
  • A Windows PC or Laptop and a USB cable are required.
  • Download the Latest ODIN tool and install it on your computer.
  • Download and Install the latest Samsung USB Drivers on your computer.
  • Copy the patched boot image file into the ADB & Fastboot directory.

Instructions to Root Galaxy M51 Using Magisk

After following the pre-requirements and unlocking the bootloader, in order to Root Galaxy M51 Using Magisk, let’s take a look at the rooting steps.

  • When you connect the USB cable you will see a blue sign in Odin.

  • Now, load the patched boot.tar file in the AP section.

  • Go to Option and see whether the Auto Reboot and F-Reset Time selected or not). If not then select these two. Don’t select re-partition.

  • Now, tap on the Start button to root your device.
  • Your device will reboot when the process will complete.
  • Then wait for a few minutes. The first boot will take some time.
  • You’re done. Enjoy!

So, there you have it from my side in this post. I hope you guys were able to successfully unlock the bootloader and root the Galaxy M51 using the guide above. Let us know in the comments below if you come across any issues while following the above-mentioned steps. Until the next post…Cheers!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.