[RECOVERY][UNOFFICIAL][3.5.2] TWRP for Galaxy M31

Search This thread

Din_Ha

Member
Dec 23, 2022
7
1
Samsung Galaxy M31
Ae08b8N.png
Disclaimer:
I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.
Please do some research if you have any concerns about features included in this recovery before flashing it!
YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.
Kernel Features:
  • latest kernel source release
  • disabled security stuff/knox/proca/logging/audit/useless features
Recovery Features:
  • TWRP 3.5.2, Android 10
  • Built in 64-bit mode
  • Super partition support
  • Added custom super binary to help with managing super partitions ( more on that in post #3 )
  • Native rw mount dynamic partitions
  • Native GSI flashing
  • Native dynamic partitions resize/wipe/backup/restore
  • Working MTP and ADB only!
How to install?
Prerequisites: Samsung USB drivers, Odin v3.14.1
  1. Make sure OEM Unlock is ON in developer settings;
  2. Turn off the phone;
  3. Press the volume down + volume up button whilst the phone is connected to a pc to boot in download mode;;
  4. Long press vol up then confirm you want to unlock bootloader (this is needed one time only);
    * Please be aware all your data will be erased including internal storage and phone will reboot!!
  5. Let the phone boot normally, pass the setup and connect to internet (wireless or mobile data) in order to unlock RMM;
  6. Make sure OEM Unlock is ON in developer settings;
  7. Turn off the phone;
  8. Use vol down + bixby key + usb cable plugged to a pc to start the phone in download mode, short press vol up to confirm you want to go to download mode;
    * If by any chance you see RMM state=Prenormal or KG state=Prenormal, factory reset data and redo from step 5!
  9. Download TWRP.tar from download link below;
  10. Open odin and place the TWRP.tar file in AP slot and press start. Once you press start, keep holding power and volume up button and the device will reboot to recovery mode.
  11. * If you're coming from stock, go to "Wipe" > ""Format Data" > type "yes" to format data. If you skip this Internal storage won't work in TWRP
  12. Flash the encryption_disabler.zip from the link below to disable internal storage encryption and patch stock recovery restoration.
  13. Additionally, flash TWRP_Bootlogo_patcher to patch warning screens when booting the device.
  14. If you want to root, flash Magisk.
  • If you're coming from other TWRP versions, download TWRP.img, reboot to recovery, tap Install > Install Image > Navigate to downloads folder > select TWRP.img > Select Recovery and swipe to confirm flash. Go to reboot and reboot to recovery and the changes will have taken place.

Downloads:

Sources:
Device Tree: https://github.com/soulr344/android_device_samsung_m31
Kernel Source: https://github.com/soulr344/android_kernel_samsung_m21nsxx/tree/prebuilt
TWRP Source: https://github.com/soulr344/android_bootable_recovery/commits/android-10.0

Credits:
  • TeamWin, corsicanu, ananjaser1211, jesec, epicX67, exynos-nigg, testers and anyone else who made this possible.
Please update it for Android 12 bit 3. Thank you so much
 
  • Like
Reactions: Innosins

YusufTürküm

Member
Jun 21, 2023
8
0
20
Türkiye
Samsung Galaxy M31
I have Android 12 installed on my device. I rooted Magisk from Odin. Bootloader unlocked. How can I install TWRP? Please provide the link and help step by step.
 

Attachments

  • Screenshot_20230621-094357_Device Info HW.jpg
    Screenshot_20230621-094357_Device Info HW.jpg
    399 KB · Views: 40
  • Screenshot_20230621-094340_Device Info HW.jpg
    Screenshot_20230621-094340_Device Info HW.jpg
    367.4 KB · Views: 39
Jan 6, 2021
42
5
put the device in download mode and open odin If the device has the latest android 12 version installed, download twrp and vbmeta here Turn off audo reboot from odin (otherwise it will bootloop) After installing with odin, manually switch to recovery mode are data formats and install magisk root best performing corvus os for games
 
  • Like
Reactions: YusufTürküm
Jan 6, 2021
42
5
put the device in download mode and open odin If the device has the latest android 12 version installed, download twrp and vbmeta here Turn off audo reboot from odin (otherwise it will bootloop) After installing with odin, manually switch to recovery mode are data formats and install magisk root best performing corvus os for games
some google translation errors
 

sanjay6969

New member
Jun 22, 2023
4
0
put the device in download mode and open odin If the device has the latest android 12 version installed, download twrp and vbmeta here Turn off audo reboot from odin (otherwise it will bootloop) After installing with odin, manually switch to recovery mode are data formats and install magisk root best performing corvus os for games
can you please elobarate which twrp and vbmeta I should download from here ?
put the device in download mode and open odin If the device has the latest android 12 version installed, download twrp and vbmeta here Turn off audo reboot from odin (otherwise it will bootloop) After installing with odin, manually switch to recovery mode are data formats and install magisk root best performing corvus os for games
 

sanjay6969

New member
Jun 22, 2023
4
0
bruh these files doesn't work
my phone got stuck in bootloop I had to flash whole firmware to reboot my device
 
put the device in download mode and open odin If the device has the latest android 12 version installed, download twrp and vbmeta here Turn off audo reboot from odin (otherwise it will bootloop) After installing with odin, manually switch to recovery mode are data formats and install magisk root best performing corvus os for games
bruh these files doesn't work
my phone got stuck in bootloop I had to flash whole firmware to reboot my device
follow the instructions here
 
Mar 2, 2023
13
2
17
i first unlocked the bootloader, then installed twrp.tar from odin, but then couldn't reboot to recovery, so reinstalled twrp.tar from odin, Now the phone is rebooting in a loop, first samsung logo comes, then bootloader warning, then samsung logo then again loop. Pls help what do i do, i can't even power off or reboot, it is doing loop automatically on its own
 

Top Liked Posts

  • There are no posts matching your filters.
  • 104
    Ae08b8N.png
    Disclaimer:
    I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.
    Please do some research if you have any concerns about features included in this recovery before flashing it!
    YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.
    Kernel Features:
    • latest kernel source release
    • disabled security stuff/knox/proca/logging/audit/useless features
    Recovery Features:
    • TWRP 3.5.2, Android 10
    • Built in 64-bit mode
    • Super partition support
    • Added custom super binary to help with managing super partitions ( more on that in post #3 )
    • Native rw mount dynamic partitions
    • Native GSI flashing
    • Native dynamic partitions resize/wipe/backup/restore
    • Working MTP and ADB only!
    How to install?
    Prerequisites: Samsung USB drivers, Odin v3.14.1
    1. Make sure OEM Unlock is ON in developer settings;
    2. Turn off the phone;
    3. Press the volume down + volume up button whilst the phone is connected to a pc to boot in download mode;;
    4. Long press vol up then confirm you want to unlock bootloader (this is needed one time only);
      * Please be aware all your data will be erased including internal storage and phone will reboot!!
    5. Let the phone boot normally, pass the setup and connect to internet (wireless or mobile data) in order to unlock RMM;
    6. Make sure OEM Unlock is ON in developer settings;
    7. Turn off the phone;
    8. Use vol down + bixby key + usb cable plugged to a pc to start the phone in download mode, short press vol up to confirm you want to go to download mode;
      * If by any chance you see RMM state=Prenormal or KG state=Prenormal, factory reset data and redo from step 5!
    9. Download TWRP.tar from download link below;
    10. Open odin and place the TWRP.tar file in AP slot and press start. Once you press start, keep holding power and volume up button and the device will reboot to recovery mode.
    11. * If you're coming from stock, go to "Wipe" > ""Format Data" > type "yes" to format data. If you skip this Internal storage won't work in TWRP
    12. Flash the encryption_disabler.zip from the link below to disable internal storage encryption and patch stock recovery restoration.
    13. Additionally, flash TWRP_Bootlogo_patcher to patch warning screens when booting the device.
    14. If you want to root, flash Magisk.
    • If you're coming from other TWRP versions, download TWRP.img, reboot to recovery, tap Install > Install Image > Navigate to downloads folder > select TWRP.img > Select Recovery and swipe to confirm flash. Go to reboot and reboot to recovery and the changes will have taken place.

    Downloads:

    Sources:
    Device Tree: https://github.com/soulr344/android_device_samsung_m31
    Kernel Source: https://github.com/soulr344/android_kernel_samsung_m21nsxx/tree/prebuilt
    TWRP Source: https://github.com/soulr344/android_bootable_recovery/commits/android-10.0

    Credits:
    • TeamWin, corsicanu, ananjaser1211, jesec, epicX67, exynos-nigg, testers and anyone else who made this possible.
    8
    Info about custom super partition helper binary. (Irrelevant because of native logical partitions but yeah, its present)

    It's meant to help with managing partitions inside the super partition itself. It has some functions built in like mount, unmount, flash and format. Here is a brief rundown on what each of them do.

    Partitions that are supported are:
    system, system_root, vendor, odm, product
    Please note that system_root is an alias of system and umount is an alias of unmount.
    All of these commands are runnable through TWRP Terminal ONLY!

    Code:
     super mount partition

    This will mount partition in rw mode in mountpoint in fstab.

    Code:
     super unmount[or umount] partition

    This command will unmount given partition and make it read only.

    Code:
     super format partition
    This command will format given partition as ext4 inside super partition.

    Code:
     super flash partition /path/to/image.img
    Flashes image.img to partition.
    You can also flash GSI (Generic System Image) using this command. Simply run:
    Code:
    super flash system /path/to/gsi.img


    For Custom ROM Developers:

    You can use this as an alternative to mount/format/unmount partitions that are inside super partition normally.
    Code:
    run_program("/sbin/super", "format", "system");  # formats system
    run_program("/sbin/super", "mount", "system");   # mounts system as rw
    run_program("/sbin/super", "unmount", "system"); # unmounts system and makes it ro
    7
    Changelog:
    v1.0
    • Initial Release
    More in github release page

    MISC LINKS
    Telegram Channel
    Telegram Group
    TeamWin Official Website
    7
    FAQ
    Q: TWRP can't mount data partition, what to do?
    A: Make sure you formatted data partition.

    Q: Phone is not booting even after 20 minutes
    A: Try to reboot. If still not booting, make sure you flashed encryption disabler zip / formatted data partition.

    Q: How to format data partition?
    A:

    ymlnQUE.jpg




    Q: Phone is showing only Samsung logo
    A: Try to reboot. If still not booting, consider installing a more recent firmware. If you still don't succeed, post here some details about your device and previous firmware and we might be able to help.

    Q: Why do i need to format data partition?
    A: Because old firmware encrypted your data partition and new rom can't decrypt and use that content / root needs access to data partition to place misc files / phone not booting after flashing root until data partition gets formatted.

    Q: I can't flash anything with TWRP. Internal Storage has some random folders with weird name.
    A: Format Data and flash encryption disabler.
    3
    Hello there,
    I followed all steps and in the end ended up having with the device only showing the Samsung logo after I flashed magisk (magisk version here: https://magisk.me/zip/). I had a 64gb version of the SM-M315 running the latest android 11 version provided by samsung (current date: 10.04.2021). I have not yet managed to escape the bootloop, veen when trying to restart the warnings appear and then the samsung logo displays. I have made a pre-root version backup, but have not yet managed to return to the recovery.

    Edit: I am aware that I have might bricked my device and just wanted to ask if there is anything that I could do just in the case that my assumption is wrong.

    nope, you havent bricked. start by flashing stock rom again, the flash twrp, AND BE SURE to flash encryption disabler and format data. thats all and it should boot. if you skip encryption dissabler, then the stock recovery will auto restore itself(which seems your case)