Last Updated on September 19, 2022 by Mathew Diekhake

The Samsung Galaxy A12 (SM-A125F/DSN) can be rooted with the Magisk Manager. However, it requires the use of a boot image and is not as simple as the same tutorial would be for some other devices. Nevertheless, if you still want to get root access, here is the tutorial.

The following tutorial demonstrates how to root the Samsung Galaxy A12 (SM-A125F/DSN) running on Android 11 and Android 10.

Tip: How to Install ADB on Linux

How to Root Samsung Galaxy A12 (SM-A125F/DSN)

You can root the Samsung Galaxy A12 (SM-A125F/DSN) using Magisk. Here is how to do that:

Warning:

  • If you follow the steps below, it will wipe the data from the Galaxy A12 (SM-A125F/DSN). Thus, you need to backup your data before following this tutorial.
  • We do not recommend rooting the Galaxy 12 unless you are an experienced Android user. This tutorial is not novice-friendly (because it can’t be), and there are several reports of people having issues with their SIM cards and then needing to reinstall firmware again. Sometimes rooting with Magisk is quite simple, and other times arduous. This is one of the more arduous occasions.

Notes:

  • This tutorial wipes all data on the Samsung A12 so you need to back up any data you intend to keep.
  • This tutorial will trip Knox; however, when you enable Magisk Hide it passes Android SafetyNet so you can still use the Google Play Store and all important apps such as Android Pay.

1. Download the firmware for the Galaxy A12. There are several tools to do this. Two of the most reliable are SamFirm_Reborn Tool and Bifrost – Samsung Firmware Downloader Tool.

2. Load Zarchiver from the Google Play Store.

3. Open Zarchiver and find the firmware file you downloaded using one of the tools above.

4. Tap on the firmware and select the option to extract the file from the menu.

5. The only file required to root is the AP file. Tap on the AP file to select it and then rename the file from AP_A125FXX.md5 to AP_A125FXX.tar (removing the .md5 and keeping the .tar in the file extension).

6. After renaming the AP file, tap on it again and choose to extract it.

7. Find the boot.img.lz4 from the extracted AP file and then extract the boot.img.lz4 so you get the boot.img.

8. Install the Magisk Manager on the Galaxy A12 and use Magisk to patch the boot image.

9. Once the boot image is patched, find the magisk_patched.img and rename it to boot.img.tar.

10. Open Zarchiver again and compress the boot.img.tar to boot.tar.

11. Move the (compressed) boot.tar to the computer and rename it boot.img.tar.

12. Boot the Galaxy A12 into Download Mode and open the Odin Flashing Tool.

13. From Odin’s GUI, upload the boot.img.tar to the AP location and then click Start.

14. Wait for Odin to say the flashing has passed and then boot the Galaxy A12 to its stock Recovery Mode.

15. From Recovery Mode, perform a factory reset. (This step is what wipes your data so backup any files you want to keep before proceeding.)

16. Once you reboot the Galaxy A12 out of Recovery Mode, reinstall the Magisk Manager again and follow the prompts.

You may now want to check out some of the best root apps for Android if you like.

In conclusion, that is how to root the Samsung Galaxy A12 (SM-A125F/DSN) with Magisk.