Working M31 root method!

Search This thread

hacko2

New member
Sep 18, 2011
4
0
I had to flash a zip called "hardwareoff_1.1.zip". You can find it within the forums. Since my device has stock recovery (and I prefer to keep it that way), I flashed the zip through Magisk itself and it worked flawlessly. Drop me a PM if you need anything.


i tried to install hardware off and it cause boot loop

Edit: only go well with the patch universal safetynet fix
 
Last edited:

Atharkhan101

Senior Member
  • Dec 1, 2013
    679
    51
    Hyderabad
    Xiaomi Mi Mix Alpha
    Thank you for taking some time to explain the origin of the file, your method is working fine, and it is using magisk to root the device, it worked for my device which had the indian firmware, but its the same as the one rolling in brazil, the concern is that after unlocking the bootloader, factory resetting and installing the magisk created boot file, and running the update from magisk manager (because it requires it for some reason) the check comes out negative, i don't remeber exactly what it said but it was all in red and says that the check failed, honestly i don't understant this part maybe i didn't have to let magisk update & restart (also after trying to open build.prop editor for the first time and granting access it crased a restarted again).
    Anyway, the main reason for me trying to root my device, was to enable camera2api to be able to use gcam ports properly, in which i failed miserably, apparently exynos processors aren't easy to enable camera2api using terminal, which renders the root futile in my case. I locked the bootloader and flashed the official rom again and it's working fine.
    Thank you again and i hope some developer takes his precious time to make a good guide from rooting to usable gcam.
    You mentioned you managed to root your Indian Version. Could you please confirm the version number. That red thing you mentioned I guess it's about safetynet. It never passes. If it passes, it bypass root detection in banking apps, Google pay etc and they will work normally.
     

    Atharkhan101

    Senior Member
  • Dec 1, 2013
    679
    51
    Hyderabad
    Xiaomi Mi Mix Alpha
    Thank you for taking some time to explain the origin of the file, your method is working fine, and it is using magisk to root the device, it worked for my device which had the indian firmware, but its the same as the one rolling in brazil, the concern is that after unlocking the bootloader, factory resetting and installing the magisk created boot file, and running the update from magisk manager (because it requires it for some reason) the check comes out negative, i don't remeber exactly what it said but it was all in red and says that the check failed, honestly i don't understant this part maybe i didn't have to let magisk update & restart (also after trying to open build.prop editor for the first time and granting access it crased a restarted again).
    Anyway, the main reason for me trying to root my device, was to enable camera2api to be able to use gcam ports properly, in which i failed miserably, apparently exynos processors aren't easy to enable camera2api using terminal, which renders the root futile in my case. I locked the bootloader and flashed the official rom again and it's working fine.
    Thank you again and i hope some developer takes his precious time to make a good guide from rooting to usable gcam.
    Is your M31 still rooted or you went to stock unrooted?
     

    Atharkhan101

    Senior Member
  • Dec 1, 2013
    679
    51
    Hyderabad
    Xiaomi Mi Mix Alpha
    I also managed to Root with the same method but after the end I realized that galaxy store, samsung health, magisk did not pass Safetynet checks I reinstalled everything as new, so in my opinion this is still not the right method to do the Root (excuse me the English language because I translated with Google translator).
    You actually rooted right way. Some proprietary apps like Galaxy Store, Samsung health, some banking apps etc will not support rooted devices and you need not to bother because you'll find better alternate in PlayStore. Rooted device is much worth than these little apps.
     

    Atharkhan101

    Senior Member
  • Dec 1, 2013
    679
    51
    Hyderabad
    Xiaomi Mi Mix Alpha
    Finally, I just rooted my m31 phone without twrp!
    Yes, I used the path method, and no I did not get any infinity boot loop.
    It's working perfectly fine, I even installed some magisk modules already like iOS emoji font and unistalled some annoying samsung/google apps!
    I'm not so sure if it will work worldwide, but for ZTO versions (Brazil) it worked.

    This will certainly delete all your files. Make a backup of what you consider important and do at your own risk.
    If you need any evidence that is working or you just let me know how can I help.

    1) First of all, I put my phone on the last firmware version, which for me is M315FXXU2ATIB
    If you're using a version before that and you have no OTA update available, you can download the firmware in specific websites like sammobile.com samfrew.com or stockrom.net and update it by yourself using Odin

    2) With this firmware applied on your phone, make sure to use the boot.img attached on this post and paste it to your phone. Now go to magisk, and choose install, and then "select and patch a file". Magisk will give you a new file.

    3) Unlock developer options, then set OEM unlocking to unlock your bootloader, and enable USB Debugging.
    There's a lot of internet pages teaching this step​

    4) Shutdown your phone. Press and hold volume up and volume down at same time, hold it and then plug usb cable. Release up and down buttons, and on the next screen press Up to go to the bootloader.

    5) Once there, open Odin, click on AP and select the magisk_patched.tar it will take like 2 or 3 seconds. You should see PASS on Odin and your M31 is probably restarting at this point. That's all, your M31 is rooted.

    Big thanks to stockroom.net for the files!

    useful links:
    https://www.stockrom.net/2020/10/sm-m315f-b2-zto-10q-m315fxxu2atib.html
    The 2nd step I did not get. How does the new file look like or named like ?

    The 5th step I did not get. Do you mean we need to copy that magisk_patched.tar in PC or let it be in M31?

    Also how should I extract boot.img of my phone. Please reply
     

    Atharkhan101

    Senior Member
  • Dec 1, 2013
    679
    51
    Hyderabad
    Xiaomi Mi Mix Alpha
    Hello, I have rooted my Galaxy M31. I have M315FXXU2ATIC firmware (Spain). I have extracted by myself the boot.img file. I have not used the one posted by mvini_ab, to be sure that I use the correct one for my device. If you don’t know how to do it, there are many tutorials on the Internet. If you have any problem with this step, ask, and I can also explain.
    The trickier step has been to unlock bootloader, because the tutorials that I have found on the Internet were not very clear. The steps I have followed are below (IMPORTANT: make a backup before following the process, because the phone makes a factory reset in the process).
    1. Unlock developer options.
    2. Set OEM unlocking to unlock your bootloader (settings/developer options)
    view

    3. Shutdown your phone.
    4. Press and hold volume up and volume down at the same time, hold it and then plug USB cable to enter to bootloader:
    view

    5. Long press Volume up to enter device unlock mode:
    view

    6. Press Volume up to confirm the unlock of the bootloader (you may void warranty).
    7. The phone will re-start. Be patient, because it takes several minutes to re-start the phone. The Samsung logo will appear for several minutes. From now on, you will see a warning message every time you power on the phone:
    view

    8. The phone makes a factory reset, so you have to configure everything again.
    9. Unlock developer options.
    10. Enable USB Debugging.
    11. Then, you can follow steps 2), 4), and 5) of mvini_ab original post.
    After flashing with Odin you will get the following warning message:
    view


    Regards,
    Jose Antonio

    PD: I don't know how to post images here, so you can find pictures in this link: https://drive.google.com/drive/folders/1Ja6y4ViNjw48jlsZeHtUGLxxgOC0TgfD?usp=sharing
    Thank you man your step by step procedure is awesome.
     

    Atharkhan101

    Senior Member
  • Dec 1, 2013
    679
    51
    Hyderabad
    Xiaomi Mi Mix Alpha
    Finally I rooted my Galaxy M31 Android 11 One UI 3.1.

    Best rooting method is (I call it Clean Root):

    Assuming you know how to flash firmware / ROM via Odin:

    1. Download the firmware and extract all 5 files.
    2. Flash the firmware (All 5 files) via Odin
    3. Set up phone with Developers options on and USB debugging ON and get connected to Wifi.
    4. Extract the AP file from the downloaded firmware and patch it via Magisk.
    5. In Odin, place all 5 firmware file but in place of AP, put the AP magisk patched file and flash it.
    6. Phone reboots. Let the phone boot up.
    7. Don't close Odin and do not unplug USB cable yet. Being on Odin, just uncheck that AP file and flash those already 4 files showing.
    That's it! You have Galaxy M31 rooted. Install Magisk apk and Root checker apk and you'll find device rooted.

    This method is best because it does not deal with extracting boot.img which I found very tough and risky.

    Google Pay and Banking apps working too with Magisk version 23. Rename magisk and Use magisk hide feature. Perfect.
     
    Last edited:

    Top Liked Posts

    • There are no posts matching your filters.
    • 2
      Mod edit: Translation

      I am from Ukraine, I am not strong in English, please excuse me. I will write in Russian, I hope you will understand.
      After many unsuccessful attempts by various methods, I was overcome by paranoia and I began to do everything that was possible, perhaps not necessary.
      1. Installed the latest Ukrainian region SEK - M315FXXU2ATIC with One UI 2.1 used CSC_OMC_OXM_M315FOXM2ATI6
      2. Copied AP_M315FXXU2ATIC_CL19748244_QB34588175_REV00_user_ low_ship_meta_RKEY_OS10.tar to your phone
      3. Installed CANARY from the forum 4pda.ru/forum/index.php?showtopic=774072 registration required to download
      4. Patched all AP_M315FXXU2ATIC.
      5. Copied magisk_patched.tar to computer
      6 Opened magisk_patched.tar in 7zip and removed everything except boot.img vbmeta.img recovery.img.lz4
      7. Deleted Google account, made a hard reset in the phone
      8. Once again, enter Recovery and again Wipe data / factory reset and Wipe Cache Partition.
      9. Initial setup without registration with Google and Samsung
      10. Shutdown.
      11. Entering the download mode - holding down both volume buttons and then connecting the cable.
      in Odin auto reboot - remove the bird
      12. I asked for magisk_patched.tar = bootloop
      13. Deleted recovery.img.lz4 stitched = bootloop
      14. Removed vbmeta.img I only asked for boot.img
      15. Reboot as soon as the screen goes out immediately enter recovery
      16.Wipe data / factory reset and Wipe Cache Partition again.
      17. Finally, from recovery, reboot into the system.
      Root received. System files are edited (deleted, renamed, file permissions, folders are created, etc.)

      Я из Украины, в английском не силен прошу извинить. Напишу на русском надеюсь разберетесь.
      После многих неудачных попыток разными методами меня охватила паранойя и я начал делать все что можно, возможно и не нужное.
      1. Установил последнюю украинскую регион SEK - M315FXXU2ATIC с One UI 2.1 использовал CSC_OMC_OXM_M315FOXM2ATI6
      2. Скопировал AP_M315FXXU2ATIC_CL19748244_QB34588175_REV00_user_low_ship_meta_RKEY_OS10.tar на телефон
      3. Установил CANARY с форума 4pda.ru/forum/index.php?showtopic=774072 для скачивания необходима регистрация
      4. Patched всю AP_M315FXXU2ATIC.
      5. Скопировал magisk_patched.tar на компьютер
      6 Открыл magisk_patched.tar в 7zip и удалил все кроме boot.img vbmeta.img recovery.img.lz4
      7. Удалил учетную запись Google, сделал полный сброс (hard reset) в телефоне
      8. Еще раз вход в Recovery и снова Wipe data / factory reset and Wipe Cache Partition.
      9. Начальная настройка без регистрации в Google и Samsung
      10. Выключение.
      11. Вход в режим download - зажатые обе кнопки громкости и затем подключение кабеля.
      в Odin auto reboot - снять птичку
      12. Прошил magisk_patched.tar = bootloop
      13. Удалил recovery.img.lz4 прошил = bootloop
      14. Удалил vbmeta.img прошил только boot.img
      15. Перезагрузка, как только экран погас сразу вход в recovery
      16. снова Wipe data / factory reset and Wipe Cache Partition.
      17. И наконец из recovery перезагрузка в систему.
      Root получен. Системные файлы редактируются (удаляются, переименовываются, права файлам, папки создаются и.т.д.)

      I can confirm that the hints of gigabyteua worked!

      What i actually did:
      I followed the instructions of the thread starter (what is mostly like the instruction of topjohnwu.github.io/Magisk/install.html#patching-images)
      But when i did that, i was stuck in download mode which was telling me about a CRC error without letting me out of the download mode.
      So, i deleted (as mentioned by gigabyteua) all files out of my patched firmware file (magisk_patched.tar) except the boot.img.
      I used odin and loaded only the original firmware AP_(...) File (reboot off)
      and directly after that i flashed the magisk_patched (only containing the boot.img).
      then i left download mode by pressinf and holding volume down and power and directly after leaving download mode i pressed and holding power up and power to enter recovery mode.
      Here I Wipe data / factory reset and Wipe Cache Partition
      Boot into system and started the standard initial setup. Installed Magisk manager and was finally left with a rooted M31 phone! *cheers*
      Thanks to mvini_ab and gigabyteua and of course topjohnwu for providing magisk

      (btw i patched with the normal MagiskManager-v8.0.2.apk, used Odin3_v3.14.1 und got the firmware with Frija-v1.4.2)

      edit:
      A last hint:
      I realized, that the SafetyNet check was not successful in the point "ctsProfile" because of the hardwarecheck.
      I just found this little module (https://forum.xda-developers.com/showpost.php?p=83028387&postcount=40658).
      After flashing it via Magisk(+reboot), the SafetyNet check is fully successful.
      Thanks to Displax for that tiny but useful workaround!
      1
      WTF

      U legend
      1
      Hello, I have rooted my Galaxy M31. I have M315FXXU2ATIC firmware (Spain). I have extracted by myself the boot.img file. I have not used the one posted by mvini_ab, to be sure that I use the correct one for my device. If you don’t know how to do it, there are many tutorials on the Internet. If you have any problem with this step, ask, and I can also explain.
      The trickier step has been to unlock bootloader, because the tutorials that I have found on the Internet were not very clear. The steps I have followed are below (IMPORTANT: make a backup before following the process, because the phone makes a factory reset in the process).
      1. Unlock developer options.
      2. Set OEM unlocking to unlock your bootloader (settings/developer options)
      view

      3. Shutdown your phone.
      4. Press and hold volume up and volume down at the same time, hold it and then plug USB cable to enter to bootloader:
      view

      5. Long press Volume up to enter device unlock mode:
      view

      6. Press Volume up to confirm the unlock of the bootloader (you may void warranty).
      7. The phone will re-start. Be patient, because it takes several minutes to re-start the phone. The Samsung logo will appear for several minutes. From now on, you will see a warning message every time you power on the phone:
      view

      8. The phone makes a factory reset, so you have to configure everything again.
      9. Unlock developer options.
      10. Enable USB Debugging.
      11. Then, you can follow steps 2), 4), and 5) of mvini_ab original post.
      After flashing with Odin you will get the following warning message:
      view


      Regards,
      Jose Antonio

      PD: I don't know how to post images here, so you can find pictures in this link: https://drive.google.com/drive/folders/1Ja6y4ViNjw48jlsZeHtUGLxxgOC0TgfD?usp=sharing
      1
      i have sucessfully rooted indian version galaxy m31 you can ask any question if you are facing any issue while rooting or unlocking bootloader
      1
      How did yiu fix the safetyNet error?

      I had to flash a zip called "hardwareoff_1.1.zip". You can find it within the forums. Since my device has stock recovery (and I prefer to keep it that way), I flashed the zip through Magisk itself and it worked flawlessly. Drop me a PM if you need anything.
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone