How to Root Samsung Galaxy M31 using Magisk

Rooting your Samsung Galaxy M31 with Magisk can provide you with additional customization options and control over your device. This step-by-step guide will walk you through the process of unlocking the bootloader, installing Magisk Manager, and flashing Magisk to gain root access on your device.

Key Takeaways

  • Rooting with Magisk gives you access to advanced customization features.
  • Always backup your data before proceeding with rooting your device.
  • Ensure you have the correct device model before starting the rooting process.
  • Follow the instructions carefully to avoid any potential risks.
  • Rooting your device may void the warranty, proceed with caution.

Preparing Your Device

Check Device Model

Before proceeding with the rooting process, it’s crucial to verify that you have the correct model of the Samsung Galaxy M31. Rooting the wrong model can lead to irreparable damage to your device.

To check your device model, go to:

  1. Settings
  2. About phone
  3. Model number

Make sure the model number matches one of the following:

  • SM-M315F
  • SM-M315F/DS
  • SM-M315F/DSN

It’s important to note that rooting can void your warranty and should be done with caution. If your model number is not listed above, do not proceed with the rooting process.

Backup Data

Before proceeding with the rooting process, it’s crucial to back up all the personal data on your Samsung Galaxy M31. Data loss can occur during rooting, and having a backup ensures that your information is safe. You can use Samsung’s built-in backup feature or a third-party app to secure your data.

  • Go to ‘Settings’ and tap on ‘Accounts and backup’.
  • Select ‘Backup and restore’.
  • Choose the data you want to back up and tap ‘Back up now’.

Remember to also backup data stored on your SD card by copying it to a secure location, such as a computer or cloud storage.

Enable Developer Options

To access the Developer Options on your Samsung Galaxy M31, you’ll need to unlock this hidden menu. Navigate to your device’s Settings, scroll down to ‘About phone’, and tap on ‘Build number’ seven times. You will see a message indicating that Developer Options have been enabled.

Once Developer Options are unlocked, you’ll have access to a variety of advanced settings that are crucial for the rooting process. These settings include USB debugging and OEM unlocking, which are essential for the next steps.

Remember, enabling Developer Options is a prerequisite before you can proceed with unlocking the bootloader and rooting your device. Make sure to follow the instructions carefully to avoid any issues.

Unlocking Bootloader

Enable OEM Unlocking

Before proceeding to unlock the bootloader, it’s crucial to enable OEM Unlocking in the Developer Options. This setting allows the bootloader to be unlocked, which is necessary for rooting your device.

To enable OEM Unlocking, follow these steps:

  1. Go to ‘Settings’ on your Samsung Galaxy M31.
  2. Scroll down and tap on ‘About phone’.
  3. Find ‘Build number’ and tap it 7 times to enable Developer Options.
  4. Return to the main ‘Settings’ menu.
  5. Tap on ‘Developer Options’.
  6. Scroll down to find ‘OEM Unlocking’ and toggle it on.

After enabling OEM Unlocking, make sure your device is connected to the internet during the bootloader unlocking process. This is necessary for the device to complete the OEM unlock operation.

Boot into Download Mode

To proceed with rooting your Samsung Galaxy M31, you must boot the device into Download Mode. This special state allows your device to communicate with the Odin tool on your PC, which is necessary for the bootloader unlocking process.

Ensure your device is completely powered off before attempting to enter Download Mode. Once off, follow these steps:

  1. Press and hold the Volume Down + Volume Up buttons simultaneously.
  2. While holding these buttons, connect your phone to your PC using a USB cable.
  3. Continue to hold the buttons until you see a warning screen.
  4. At the warning screen, release all buttons.
  5. Press the Volume Up button to confirm and enter Download Mode.

Remember, entering Download Mode can potentially harm your device if not done correctly. It’s crucial to follow these instructions precisely to avoid any issues.

Unlock Bootloader

Before proceeding, ensure that your device’s battery is at least 50% charged to prevent any interruptions during the process. Unlocking the bootloader will erase all data on your device, so it’s crucial that you’ve backed up your data beforehand.

To unlock the bootloader on your Samsung Galaxy M31, follow these steps:

  1. Turn off your device.
  2. Press and hold the Volume Up + Volume Down buttons, then connect your phone to a PC using a USB cable.
  3. Long press the Volume Up button when you see the warning screen to enter Download Mode.
  4. Once in Download Mode, the bootloader can be unlocked by following the on-screen instructions.

After unlocking the bootloader, your device may take longer to reboot. This is normal, as the system is initializing with the new bootloader status.

Installing Magisk Manager

Download Magisk Manager APK

Before you can proceed with rooting your Samsung Galaxy M31, you need to download the Magisk Manager APK. This application is not available on the Google Play Store, so you’ll have to download it from a reliable source. Ensure that you download the latest version of Magisk Manager to avoid any compatibility issues.

  • Visit the official Magisk GitHub repository or a trusted website.
  • Look for the ‘Magisk Manager APK’ file.
  • Download the APK to your device.

It’s crucial to verify the authenticity of the APK file before downloading to protect your device from malicious software. Always download from official sources or well-known developers.

Install Magisk Manager

Once you have the Magisk Manager APK downloaded, it’s time to install it on your Samsung Galaxy M31. Navigate to the APK file using a file manager and tap on it to begin the installation process. If you encounter a prompt asking to allow installation from unknown sources, grant the permission to proceed.

Follow these steps to install Magisk Manager:

  1. Tap on the Magisk Manager APK file.
  2. If prompted, allow installation from unknown sources.
  3. Follow the on-screen instructions to complete the installation.
  4. Once installed, open Magisk Manager from your app drawer.

After installation, Magisk Manager will require additional permissions to function properly. It’s crucial to grant these permissions for Magisk to manage root access effectively.

Grant Necessary Permissions

After installing Magisk Manager, it’s crucial to grant the necessary permissions for the app to function correctly. These permissions allow Magisk Manager to access parts of your system that are required for the rooting process.

  • Open Magisk Manager on your device.
  • A pop-up will request permissions; these typically include storage and other system permissions.
  • Tap ‘Allow’ for each permission request to ensure Magisk Manager operates without hindrances.

Ensuring that all permissions are granted is essential for a smooth rooting experience. Without these permissions, Magisk Manager may not work as intended, potentially leading to issues during the rooting process.

Flashing Magisk

Download Magisk ZIP

Before proceeding to flash Magisk on your Samsung Galaxy M31, you need to download the Magisk ZIP file. Ensure you download the latest stable version of Magisk to avoid compatibility issues and to benefit from the latest features and bug fixes.

To download the Magisk ZIP file, follow these steps:

  1. Visit the official Magisk GitHub repository.
  2. Navigate to the ‘Releases’ section.
  3. Look for the latest release and download the ‘’ file, where ‘XX.X’ represents the version number.

Make sure to save the downloaded ZIP file to a location on your device that you can easily access when in custom recovery mode.

After downloading the Magisk ZIP file, the next step is to boot your device into custom recovery. This will allow you to flash the ZIP and root your device.

Boot into Custom Recovery

Once you have all the necessary files and your bootloader is unlocked, it’s time to boot your Samsung Galaxy M31 into custom recovery mode. This is a critical step for flashing Magisk and gaining root access.

To boot into custom recovery, follow these steps:

  1. Power off your device completely.
  2. Press and hold the Volume Up + Power buttons simultaneously.
  3. Release the buttons when the Samsung logo appears.
  4. Your device should now enter custom recovery mode.

In custom recovery, use the volume buttons to navigate and the power button to select. It’s essential to be familiar with your specific recovery’s interface as it may vary.

Once in custom recovery, you’re ready to flash the Magisk ZIP file to root your device. Ensure you have the file on your device’s internal storage or an SD card for easy access during the flashing process.

Flash Magisk ZIP

Once you have the Magisk ZIP file downloaded, the next step is to flash it onto your Samsung Galaxy M31. This process will modify the system partition to install Magisk and allow you to gain root access.

Ensure your device has enough battery charge before proceeding to avoid any interruptions during the flashing process.

To flash the Magisk ZIP, follow these steps:

  1. Boot your device into the custom recovery mode. This is usually done by holding a combination of the power and volume buttons during startup.
  2. In the recovery menu, select ‘Install’ or ‘Install ZIP from SD card’ depending on your recovery.
  3. Navigate to the location where you saved the Magisk ZIP file.
  4. Select the Magisk ZIP file and confirm the flash. This will start the installation process.

After the installation is complete, it’s crucial to reboot your device. This will finalize the rooting process and start your device with Magisk installed, giving you root access.


In conclusion, rooting your Samsung Galaxy M31 using Magisk is a straightforward process that allows you to unlock the full potential of your device. By following the step-by-step guide provided in this article, you can customize your device, install custom ROMs, and enjoy a range of advanced features. Remember to proceed with caution and always backup your data before rooting. Happy rooting!

Frequently Asked Questions

Is rooting my Samsung Galaxy M31 safe?

Rooting your device can void the warranty and may lead to security risks. Proceed with caution.

Can I unroot my Samsung Galaxy M31 after rooting with Magisk?

Yes, you can easily unroot your device by using the ‘Uninstall’ option in Magisk Manager.

Will rooting my Samsung Galaxy M31 cause data loss?

Rooting itself does not cause data loss, but it’s recommended to backup your data before proceeding.

Is it legal to root my Samsung Galaxy M31?

Rooting may void the warranty and violate the terms of service of your device. Check your local laws before rooting.

Can I still receive OTA updates after rooting with Magisk?

Yes, you can still receive OTA updates after rooting with Magisk, but you may need to re-root after each update.

What are the benefits of rooting my Samsung Galaxy M31 with Magisk?

Rooting with Magisk allows you to customize your device, install root-only apps, and enhance system performance.

Leave a comment