Working M31 root method!

Dodgerx01

New member
Oct 15, 2020
1
1
0
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!
 
Last edited:
  • Like
Reactions: zunga

xdausr11

Member
Dec 22, 2018
48
15
18
Thank you all for the details. Good to see that the method worked also with SAR. I can see I had done 2 steps different, so I have hope for another trial.
 

jagt28

New member
Feb 10, 2020
4
1
0
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)

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:

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

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:

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:


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
 
Oct 7, 2020
44
8
18
Perugia
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)

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:

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

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:

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:


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

jagt28

New member
Feb 10, 2020
4
1
0
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).
Everything works fine for me.
Regards
José Antonio
 

AndreM962

Senior Member
Mar 2, 2019
56
1
8
Everyone's talking about magisk_patched.tar, but I can only get magisk_patched.img by patching boot.img. How do I get the magisk_patched.tar file?
 
Oct 7, 2020
44
8
18
Perugia
Everyone's talking about magisk_patched.tar, but I can only get magisk_patched.img by patching boot.img. How do I get the magisk_patched.tar file?
So first you need to have the Firmware you want to install at hand then extract with 7-zip and get 5 files then extract and get more files from the AP file but you just take the boot.img.lz4 file add it to the archive 7-zip tar format then get the boot.img.tar file that you have to carry on the internal memory of your smartphone.install magisk then open magisk and install on the first line of install and update a file and go to the file you have stored on the internal memory and then go to the start and get a new file called magisk_patched.tar that you find in the download folder of the internal memory.
 

AndreM962

Senior Member
Mar 2, 2019
56
1
8
So first you need to have the Firmware you want to install at hand then extract with 7-zip and get 5 files then extract and get more files from the AP file but you just take the boot.img.lz4 file add it to the archive 7-zip tar format then get the boot.img.tar file that you have to carry on the internal memory of your smartphone.install magisk then open magisk and install on the first line of install and update a file and go to the file you have stored on the internal memory and then go to the start and get a new file called magisk_patched.tar that you find in the download folder of the internal memory.
So what you're saying is, I compress the boot.img.lz4 file into a tar file, then I patch that file with the Magisk Manager to get the magisk_patched.tar. Is that correct?
 

AndreM962

Senior Member
Mar 2, 2019
56
1
8
After trying both the above solution and using the magisk_patched.tar provided by the OP, the only difference now is that it's no longer giving me any sort of vbmeta error or rebooting into download mode. What's it's doing instead is rebooting into the bootloader screen and giving me no explanation for why.

Would it make any difference if I only used the patched.tar and didn't use the other files (BP, CS, CSC) in Odin? Would that be better?
 
Oct 7, 2020
44
8
18
Perugia
After trying both the above solution and using the magisk_patched.tar provided by the OP, the only difference now is that it's no longer giving me any sort of vbmeta error or rebooting into download mode. What's it's doing instead is rebooting into the bootloader screen and giving me no explanation for why.

Would it make any difference if I only used the patched.tar and didn't use the other files (BP, CS, CSC) in Odin? Would that be better?
Hi! If you have followed all the steps explained above it should work for you, only that when it returns to the bootloader screen you have to give them a few minutes to boot, and maybe take some pictures and add so let's see what happens.But do you get these two screenshots? If yes then that's okay, just wait a few minutes for it to boot
 

Attachments

Last edited:

AndreM962

Senior Member
Mar 2, 2019
56
1
8
Hi! If you have followed all the steps explained above it should work for you, only that when it returns to the bootloader screen you have to give them a few minutes to boot, and maybe take some pictures and add so let's see what happens.But do you get these two screenshots? If yes then that's okay, just wait a few minutes for it to boot
Sorry, I meant to say the recovery screen. After installing Magisk via ODIN, the phone reboots and goes to a screen saying "this phone is not using the official firmware", before going into the recovery screen. When I select power off and try to restart, it just happens again. So I'm forced to reinstall the official firmware to get my phone working again.
 
Oct 7, 2020
44
8
18
Perugia
Sorry, I meant to say the recovery screen. After installing Magisk via ODIN, the phone reboots and goes to a screen saying "this phone is not using the official firmware", before going into the recovery screen. When I select power off and try to restart, it just happens again. So I'm forced to reinstall the official firmware to get my phone working again.
magisk you don't have to install it via odin, you have to install it directly from the site or in apk format
 

AndreM962

Senior Member
Mar 2, 2019
56
1
8
Alright, I've done it! So what happened was, after installing Magisk, it went into a 'installing update' screen and then into safe mode, and I thought that meant it didn't work. But all I had to do was reboot and then it worked. I'm pretty sure that's what I did with my old phone, too. I just forgot...

One weird thing, though - when I flashed the images and rebooted, I didn't lose any files. Didn't have to reinstall or reconfigure my phone. In fact, the Magisk Manager was still there, and when I opened it, it said Magisk was installed now. Isn't Magisk supposed to make you lose everything?