Home > Root

How to Root Samsung Galaxy M31 without TWRP

In this guide, we will show you the steps to root your Samsung Galaxy M31 device without using TWRP Recovery. First off, we will list out the instructions to unlock the device’s bootloader. After this, we will show you how to download and extract your device’s stock firmware. Then we will use the extracted stock firmware’s AP file and patch it via Magisk. This will give us the magisk_patched.tar file. Finally, we will flash this patched AP file via the Odin Tool and your device stands rooted. Follow along for the detailed instructions.

Samsung M series boasts of quite a few noteworthy ones, and most of them belong to the budget segment. While this segment is already saturated with tons of offerings from various OEMs, yet Samsung seems to have created a niche segment for itself. The reason for the same is there for everyone to see. Power-packed devices without burning a hole in your pockets, well what else could a buyer ask.

Furthermore, its underlying OneUI customized skin has also gathered many positive receptions. Along the same lines, these devices have been actively supported in custom development. And the Galaxy M31 is no different either. Be it custom recoveries, custom ROMs, or tons of other mods, the device has a rich collection of many such tweaks.

A large part of the same could be credited to Samsung’s early release of kernel source code, which then makes it easy for the developers to try out their desired tweak. But to effectively carry out most of these tweaks, you would require a rooted device. And in this guide, we will help you achieve just that. So without further ado, here are the detailed instructions to root your Samsung Galaxy M31 device without using TWRP Recovery.



Advantages and Risks of Rooting Samsung Galaxy M31

Once you root your device via Magisk, you would have gained administrative level access. In other terms, you could easily access the system partition on your device. Along the same lines, it gives you the opportunity to install Magisk ModulesXposed FrameworkSubstratum Themes. Likewise, you could also flash Magisk Modules and custom kernels onto your device.

The latter would make it possible to overclock or underclock the CPU or set a different CPU profile. However, rooting your Samsung Galaxy M31 might bring in a few uninvited risks as well. The first requirement for rooting is an unlocked bootloader. Once you do so, your device’s warranty will become null and void. Likewise, you will also lose all the data on your device. The KNOX counter will also be tripped.

This will result in your inability to use apps like Samsung Pay, Secure Folder, etc. Then Widevine Certification will be degraded from L1 to L3 resulting in the ability to watch Netflix. Amazon Prime, etc in HD. With this, you now have a perfect idea regarding the perks and drawbacks of the root. So let’s now proceed to the steps to root your Samsung Galaxy M31 device without using TWRP Recovery.

How to Root Samsung Galaxy M31 without TWRP

The entire instructions are written under separate sections for ease of understanding. Make sure to follow the exact same sequence as listed 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 on Samsung Galaxy M31

First and foremost, you need to unlock the bootloader on your Galaxy M31 device. To do so, please refer to our comprehensive tutorial: How to Unlock Bootloader on any Samsung Device [New VaultKeeper Method]. If you don’t wish to check out that guide, then here are the instructions in short: Start off by Enabling USB Debugging and OEM Unlocking on your device.

unlock-bootloader-samsung-galaxy-m31

Then boot your device to Download Mode and use the Volume Keys to select the option to unlock the bootloader. Your device will then automatically boots up, go to Developer Options, and make sure that OEM Unlock is greyed out. That’s it, the bootloader stands unlocked. Now move over to the next step to root your Samsung Galaxy M31 device without using TWRP Recovery.



STEP 2: Download Samsung Galaxy M31 Stock Firmware

Next up, download the stock firmware for your device. Since Samsung doesn’t host the firmware files on their servers, you would have to take the help of a third-party tool. In this regard, the Frija Tool is the go-to choice. So refer to our detailed guide on How to Download Samsung Stock Firmware/ROM via Frija Tool.  As for this device, the firmware that I have downloaded consists of the following information: [Just make sure to change the CSC code as per your country accordingly before downloading the firmware]. Input these details in the Frija Tool:

  • Model Number: SM-M315F
  • CSC: INS (for India)

galaxy m31 stock firmware frija

If you are using SamMobile to download the firmware, then input the following details (this is in correspondence to the Indian build, the PDA and CSC may vary from region to region):

  • Device Name: Samsung Galaxy M31
  • Model Number: SM-M315F
  • PDA: M315FXXU2BUAC
  • CSC: M315FODM2BUAC

STEP 3: Extract Galaxy M31 AP File from Stock Firmware

  1. Once the firmware file for your device is downloaded, extract it to a convenient location on your PC.
  2. You should now get the following five files in .tar.md5 format:
    AP, BL, CP, CSC, and HOME_CSC

    extracted samsung stock firmware files

  3. Out of these five files, we will use the AP file to patch it via Magisk and then flash it via Odin.

STEP 4: Patch Galaxy M31 AP File via Magisk

Now that you have got the AP firmware file, transfer it to your device’s internal storage. Once that is done, install the Magisk Manager app on your device. Then launch the app and check if it says YES or NO next to Ramdisk. Remember the answer as it will be used at the end to boot your device to the rooted OS.

recovery ramdisk samsung magisk

After this, refer to our detailed guide on how to: How to Patch Samsung AP Firmware via Magisk. The shorter explanation is as follows: Launch the Magisk Manager app on your device. Tap on Install > Select and patch a file > Select the AP firmware file and tap on Let’s Go. The process will take a few seconds. Once done, you should get the magisk_patched.tar file placed inside the Download’s folder. We will now use this file to root your Samsung Galaxy M31 device without using TWRP Recovery.

samsung-galaxy-m31-magisk-patched-tar-file

STEP 5: Boot Samsung Galaxy M31 to Download Mode

The next step requires you to boot your device to the Download Mode. It is needed to boot to this mode so that Odin could interact with your device. So refer to our detailed guide to Boot any Samsung Device to Download Mode. Here are the instructions in short:

download-mode-samsung-galaxy-m31

  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.
  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.

STEP 6: Flash Patched Galaxy M31 magisk_patched.tar via Odin

It’s now time to root your Samsung Galaxy M31 device without using TWRP Recovery. For that, you will have to flash this magisk_patched.tar file (patched AP file) to your device via Odin. To do so, please refer to our comprehensive guide on this topic: How to Flash magisk_patched.tar (patched Samsung AP file) via Odin. For the shorter version, proceed to the below steps:

root-samsung-galaxy-m31-odin-magisk_patched.tar

  1. Start off by transferring the magisk_patched.tar file to your PC where the other firmware files (AP, BL, CP, CSC, and HOME_CSC) are present.
  2. Then connect your Samsung device to the PC via USB Cable (make sure it is booted to Download Mode).
  3. After this, load the following files to the Odin tool:
    • First off, click ‘BL‘ and load the BL firmware file.
    • Then click ‘AP‘ and load the magisk_patched.tar file.
    • After this, click ‘CP‘ and load the CP firmware file.
    • Then click ‘CSC‘ and load the CSC firmware file (the normal CSC file, not the Home CSC file).
  4. While we only need to flash the Patched AP firmware file, but it is never recommended to flash it alone. You should always flash this file along with other firmware files, always!
  5. Moving on, go to the Options section of Odin Tool and uncheck ‘Auto Reboot‘.
  6. Finally, click on Start to begin the process. Once done, you should get the PASS!‘ message.
    flash-success-odin-pass-message
  7. That’s it. You have successfully rooted your Samsung Galaxy M31 device without using TWRP Recovery. It’s time to boot your device to the rooted OS.

STEP 7: Boot Samsung Galaxy M31 to Rooted OS

Now that your device is rooted, it’s time to boot it to the rooted OS. We have an extensive guide on the same topic, including the explanation as to why this needs to be done: How to Boot Rooted Samsung to Recovery Mode and Rooted OS. The shorter explanation follows:

  1. If the Ramdisk Check via Magisk in STEP 4 showed YES, then you directly boot to the rooted OS just by pressing the Power key.
  2. However, if there is no Ramdisk (if the check via Magisk displayed NO in STEP 4), then the steps to boot to the rooted OS are different. Here is what you need to do:
  3. Press and hold the recovery key combinations until the device boots up and you see the Bootloader Unlock warning message. Then release all the buttons and you should be booted to the rooted OS with Magisk installed.

With this, we conclude the guide on how to root Samsung Galaxy M31 without using TWRP Recovery. 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: