How to Root Samsung Galaxy M31s with Magisk [Easy Way]

Rooting an Android OS gives the user a whole lot more control over the OS. You can customize the UI, kill the Background Apps, overclock or downclock the CPU, and add many features and using Magisk and Xposed Modules. Here is the guide to Root Samsung Galaxy M31s.

The one and the only way of rooting any Android device is to use the Magisk. You can either flash the Magisk zip or you can patch the boot.img file of your device and flash it using fastboot. Both of the methods need unlocked bootloader but the later one needs no Custom recovery. This Guide cover the method that involves patching Boot.img and flashing it via fastboot. 

Samsung Galaxy M31s is the budget entry from Samsung in the Asian market. It is powered by the Exynos 9611 chipset along with 6 to 8 GB of RAM. It comes in two variants with the choice of 128GB 6GB RAM, and 128GB 8GB RAM. The front has a Super AMOLED 6.5 inch display with Full HD resolution. The back contains a Quad Camer setup with a primary 64 MP lens accompanied by Ultrawide, macro, and depth sensor. The front has a 32 MP selfie shooter in a notch. It is fueled by a huge 6000 mAh battery with 25 Watt support.

How to Root Samsung Galaxy M31s

Download Section

Stock Firmware for Samsung Galaxy M31s

USB Drivers

Odin Flash Tool

Magisk and Manager

Note: Your KNOX status will be tripped once you Unlock the Bootloader and Root the device.

How to Root Samsung Galaxy M31s with Magisk

Step 1: Unlock the Bootloader.

Step 2: Download Firmware for Samsung Galaxy M31s and Extract AP.tar.md5 file.

Step 3: Patch the Boot.img using Magisk Manager.

Step 4: Flash the Patched Boot.img using PC (Odin).

Step 5: Factory Reset the Device and Boot into the System with Magisk with Right Key Combo.

Step 1: Unlock the Bootloader

Unlocking Bootloader in Samsung devices can be done without PC, just follow these steps:

Unlock Bootloader Samsung Devices

  1. Go to the Settings -> About Phone, and then Tap on “Build Number” 10 times.
  2. Enter your PIN or Password to Enable Developer options.
  3. The Developers Option will appear in Settings, Open it and Enable the “OEM Unlock”.
  4. Boot Into Download mode by Turning OFF your device, connect it to PC via Type-C cable and then hold Volume Down + Power Button. Release all the Button once you see a change in screen and then press Volume Up to go into Download Mode.
  5. Once the Device boot into Download mode, hold the Volume Up Button, this will Wipe all the data in the phone and will unlock the Bootloader.
  6. The phone will reboot to the System, now Connect to the Wifi and Skip the Setup.
  7. Go to Settings -> About Phone and Tap on “Build Number” 7 times.
  8. Go to the Developers Options again and Check if the OEM Unlock is greyed out, if it is, then Bootloader is Unlocked.

Step 2: Extract AP_[device_model_sw_ver].tar.md5 from Firmware

Select AP.tar.md5 file

  1. Download the Stock ROM for your Device given above in the Download Section.
  2. Transfer the file to your PC and extract it, Find the file with the name “AP_[device_model_sw_ver].tar.md5”.
  3. Transfer this File to your Device.

Step 3: Patch the AP.tar.md5 file using Magisk Manager app

Magisk Select and Patch Boot.img file

  1. Download the Magisk Manager from Above and Install it.
  2. Open the App and Tap on Install.
  3. Choose the option “Select and Patch file”.
  4. Find the AP_[device_model_sw_ver].tar.md5 file you extracted and transferred to your device.
  5. Magisk Manager will patch the file and the file will be saved as magisk_patched.tar.

Step 4: Flash the patched boot.img using Odin

Odin Flash tool select AP

  1. Move the magisk_patched.img to your PC.
  2. Download the Odin Flash Tool from Above and Install it.
  3. Boot Into Download mode by Turning OFF your device, connect it to PC via Type-C cable and then hold Volume Down + Power Button. Release all the Button once you see a change in screen and then press Volume Up to go into Download Mode.
  4. Open Odin flash tool and click on AP, select the magisk_patched.tar file.
  5. Select the others BL, CP, and Home_CSC files from the Firmware you downloaded.
  6. Uncheck Auto Reboot in options and Click on Install.
  7. This will flash the patched AP file your device and your Samsung Galaxy M31s is now Rooted.

Step 5: Full Wipe the System and Boot into System with Magisk

  1. Press Power + Volume Down to exit download mode. As soon as the screen turns off, immediately press the combo key Power + Volume Up to boot to recovery. Continue pressing the volume up button until you see the stock recovery screen.
  2. Use the Volume Buttons to Choose Wipe data/factory reset
  3. Now Choose the Reboot System Now and Hold down the Power + Volume Up buttons. As soon as you see the Warning screen, release all the buttons. Your System will now Boot into the System with Magisk
  4. You need to do this every single time you will reboot the device, Here are the Combinations you need to learn

A. Powering up normally → System with no Magisk

B. (Power + Volume Up) → Bootloader warning → Release all buttons →System with Magisk

C. (Power + Volume Up) → Bootloader warning → Keep holding volume up → Actual recovery

That’s it. You have successfully Rooted Samsung Galaxy M31s.

If you are stuck in any step or have any problem, just leave a comment below and we will help you out.

4 thoughts on “How to Root Samsung Galaxy M31s with Magisk [Easy Way]”

Leave a Comment

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