• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[RECOVERY][UNOFFICIAL] TWRP for Galaxy S21 (Exynos)

Search This thread

nPingu

Senior Member
Jan 23, 2012
54
19
Verona
Hi, thank you for your amazing work!

I rooted my S21 with magisk and installed TWRP with your method. Now I would like to update the firmware without wiping my data.

Here is what I was thinking of doing but I wanted to confront with you to see if everything could work:

1) Download new firmware with Friya
2) Extract AP, put it on S21 and patch it with Magisk
3) Bring it back to PC and flash with Odin, with Home_CSC, patched AP and the other files in original status, NO REBOOT
4) Follow your guide, flashing with Odin the files for TWRP as in your first post
5) REBOOT to recovery
6) Run Multidisabler, wipe cache
7) REBOOT to system

Is this correct? Will this work?

Thanks!
 

afaneh92

Senior Member
Jul 31, 2012
2,626
4,423
Hi, thank you for your amazing work!

I rooted my S21 with magisk and installed TWRP with your method. Now I would like to update the firmware without wiping my data.

Here is what I was thinking of doing but I wanted to confront with you to see if everything could work:

1) Download new firmware with Friya
2) Extract AP, put it on S21 and patch it with Magisk
3) Bring it back to PC and flash with Odin, with Home_CSC, patched AP and the other files in original status, NO REBOOT
4) Follow your guide, flashing with Odin the files for TWRP as in your first post
5) REBOOT to recovery
6) Run Multidisabler, wipe cache
7) REBOOT to system

Is this correct? Will this work?

Thanks!
Hi, disable auto reboot from odin, flash the rom with CSC_HOME, after it finishes reboot to download mode again, reflash twrp and vbmeta_disable_R.tar. reboot to twrp run multidisabler from twrp terminal. Dont format just reboot if multidisabler success.
If you missed twrp or download mode you will get your data encrypted.
 
  • Like
Reactions: nPingu

Maba79

Member
Sep 18, 2017
6
0
First of all, a big thank you for porting TWRP to S21! I've been using TWRP for years and I'm so glad to see it in S21. I'm just little cautious / worried installing an unofficial TWRP into my brand new phone... Hence the questions:

1. I'm a keen Android power user for years and I've played with Odin, customer ROMs, kernels etc. So I know my way around. What might be the worst case scenario should something go wrong, even if I follow your instructions? Boot loop? Soft brick? Anything that flashing stock ROM can't fix?

2. You mentioned in your instructions to disable encryption. Is this phase necessary if you haven't even enabled it yet? I just put into use my new S21 and haven't fiddled with any settings yet.

3. I just updated my S21 with all the recent SW updates OTA. Should I expect any problems with TWRP installation if I have all the recent Samsung updates installed?

4. Is it possible to use TWRP's Android app to update also this unofficial version? Or is flashing the only way to update it?
 

afaneh92

Senior Member
Jul 31, 2012
2,626
4,423
First of all, a big thank you for porting TWRP to S21! I've been using TWRP for years and I'm so glad to see it in S21. I'm just little cautious / worried installing an unofficial TWRP into my brand new phone... Hence the questions:

1. I'm a keen Android power user for years and I've played with Odin, customer ROMs, kernels etc. So I know my way around. What might be the worst case scenario should something go wrong, even if I follow your instructions? Boot loop? Soft brick? Anything that flashing stock ROM can't fix?

2. You mentioned in your instructions to disable encryption. Is this phase necessary if you haven't even enabled it yet? I just put into use my new S21 and haven't fiddled with any settings yet.

3. I just updated my S21 with all the recent SW updates OTA. Should I expect any problems with TWRP installation if I have all the recent Samsung updates installed?

4. Is it possible to use TWRP's Android app to update also this unofficial version? Or is flashing the only way to update it?
Its not a port!
1- Bootloop or soft brick, flashing stock can fix it.
2- you can leave it encrypted but you cant use data partition in twrp.
3- its ok.
4- No.
 

Maba79

Member
Sep 18, 2017
6
0
Thanks for the reply!

One more thing confuses me: You mentioned in your instructions that "Flash magisk apk in twrp." Does this mean installing TWRP also roots device and that you have also included Magisk apk within this TWRP package?

Or do you mean that one should follow standard Magisk's installation instructions found here after TWRP installation?
 
Last edited:

afaneh92

Senior Member
Jul 31, 2012
2,626
4,423
Thanks for the reply!

One more thing confuses me: You mentioned in your instructions that "Flash magisk apk in twrp." Does this mean installing TWRP also roots device and that you have also included Magisk apk within this TWRP package?

Or do you mean that one should follow standard Magisk's installation instructions found here after TWRP installation?
TWRP support flashing magisk apk, treat it like flashable zip.
 

Maba79

Member
Sep 18, 2017
6
0
Hmm... Odin fails to flash.

I got newest version of Odin and I did place twrp-3.5.0_10-1_afaneh92-R-o1s.tar and vbmeta_disabled_R.tar files in their respective location in Odin. I've also enabled the OEM unlocking and set USB debugging mode on accordingly. Odin still fails.

I've flashed before with Odin adn various other Samsung Android devices. Any idea what could be wrong or what am I missing? I haven't fiddled with my new S21 in any other way than enabled the developer mode so far. My model is G991B/DS.
 

afaneh92

Senior Member
Jul 31, 2012
2,626
4,423
Hmm... Odin fails to flash.

I got newest version of Odin and I did place twrp-3.5.0_10-1_afaneh92-R-o1s.tar and vbmeta_disabled_R.tar files in their respective location in Odin. I've also enabled the OEM unlocking and set USB debugging mode on accordingly. Odin still fails.

I've flashed before with Odin adn various other Samsung Android devices. Any idea what could be wrong or what am I missing? I haven't fiddled with my new S21 in any other way than enabled the developer mode so far. My model is G991B/DS.
try patched odin, also make sure bootloader unlocked and your devices is G991B.
and provide odin log.
 

Maba79

Member
Sep 18, 2017
6
0
Thanks, I got it working! I missed the "unlock bootloader" part. My previous Android was S7 and I've never had to unlock any bootloaders...

I found the "Install TWRP App" under Advanced. Is it safe to install & use?

I'm still baffled about No. 7. "Flash magisk apk in twrp."
You mean, I need to first download Magisk apk first, of course? Cause there is no Magisk app already within this TWRP package, right?

EDIT: What I mean is that does the TWRP also root the device? Do I just need to install Magisk "manager" and Magisk apk and then I'm done?
 
Last edited:

Maba79

Member
Sep 18, 2017
6
0
Thanks, I got it working! I missed the "unlock bootloader" part. My previous Android was S7 and I've never had to unlock any bootloaders...

I found the "Install TWRP App" under Advanced. Is it safe to install & use?

I'm still baffled about No. 7. "Flash magisk apk in twrp."
You mean, I need to first download Magisk apk first, of course? Cause there is no Magisk app already within this TWRP package, right?

EDIT: What I mean is that does the TWRP also root the device? Do I just need to install Magisk "manager" and Magisk apk and then I'm done?
Answering to myself: After installing TWRP you can simply download the newest Magisk.apk, re-name it to Magisk.zip, flash it via TWRP (install zip) and reboot your system. After that you'll have your device rooted and Magisk manager installed. It needs to be updated and rebooted immediately and then you're good to go.
 

Maba79

Member
Sep 18, 2017
6
0
Doing my first Samsung Galaxy S21 backup.

Whoa, there are a whole lot more partitions available for backup than with any of my previous Android phones.
Which partitions would you recommend to backup? Data? Boot? How about Super (Incl. System, Vendor, Product, Odm)?
 

afaneh92

Senior Member
Jul 31, 2012
2,626
4,423
Doing my first Samsung Galaxy S21 backup.

Whoa, there are a whole lot more partitions available for backup than with any of my previous Android phones.
Which partitions would you recommend to backup? Data? Boot? How about Super (Incl. System, Vendor, Product, Odm)?
Actually I didnt added all partitions lol
Yes those you said are ok to backup
 

randy施

New member
Aug 11, 2017
3
0
Dear sir, I've downloaded and flashed the latest zip of your recovery, but it turns out that I cannot access to the TWRP mode, and it shuts down automatically, and I try the former one, it works. What's wrong with the new one? My device model is SM-G991N.
 
Last edited:

afaneh92

Senior Member
Jul 31, 2012
2,626
4,423
Dear sir, I've downloaded and flashed the latest zip of your recovery, but it turns out that I cannot access to the TWRP mode, and it shuts down automatically, and I try the former one, it works. What's wrong with the new one? My device model is SM-G991N.
Need to be quick, press vol up and power after device reboot and screen goes black.
 
I need your help.

I followed your first post
stock rom > dev > oem unlock + usb debug > reboot to recovery > bootloader > flash twrp + userdata file = odin fail

new try:
stock rom > dev > oem unlock + usb debug > patching AP file through magisk > copy back to laptop > reboot to recovery > bootloader > flash patched ap file = error in download mode: custom binary(VBMETA) blocked by oem lock > after reboot red error message DEBORE: DN_FAIL_BLOCK_CUSTOM_BIN_OEM

next try:
stock rom > dev > oem unlock + usb debug > patching AP file through magisk > copy back to laptop > reboot to recovery > bootloader > flash patched ap file + original bl + original cp + original csc = stuck at super.img > after reboot red error message DEBORE: DN_FAIL_BLOCK_CUSTOM_BIN_OEM

I think something is wrong with unlock of oem. I activated the option but the phone is still locked.

I noticed something strange when I boot into download mode through recovery.
when I finaly enter the download mode I do not get any options like push vol + to unlock
when I enter download mode I get a message in blue:
ODIN MODE by Param Download
in red:
CAUSE: BL: Recovery Mode Set by key

what the ... is the problem and how can I fix it?

phone: G991B - DBT
firmware: download with frija
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I'll answer my own question :
    By rebooting to bootloader unlock mode (hold volume up + volume down and insert USB cable) then selecting "no", the phone will continue to download mode, from which I should be able to restore to stock. Sorry for the hassle !
    1
    Hi,

    Were you able to check this? I used the latest recovery and went into a bootloop as well. Haven't tried the old recovery yet but can you please check on the latest and help improve? I don't know if you are also working on a custom kernel / custom ROM? I have worked on Oppo Find5 (quite some time ago) but am open to teaming up.

    BR; Naresh
    Im not working on anything other than recovery. I dont have the device. only the Ultra.
    1
    I tried the latest TWRP build for regular S21 G991B and had similar bootloop. Only way for me to get out of it was to return to the previous TWRP build.

    @afaneh92 I think it's because the o1s kernel build compiles the wrong dtbo

    I confirm that
    1
    No vbmeta disable require... Does this mean data encryption works now? And if yes, incl. gsi's? Thank you for your awesome work!
    Not working yet
  • 11
    home.png
    backupname.png

    Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

    Code:
     * Your warranty is now void.
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or your getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * 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.

    Supported Models:
    Galaxy S21 G991B/N.

    Download & Guide:
    1. Unlock your bootloader.
    2. Download S21: o1s.
    3. Reboot to download mode
    4. Put the TWRP TAR for your device with Odin in the AP slot, vbmeta_disabled_R.tar in USERDATA slot and click start.
    5. Reboot to recovery via recovery key combo (Vol up + power + USB connected).
    6. Disable encryption:
    - Go to Advanced > Terminal, type: multidisabler.​
    If vendor complain about free space left on device, will attempt to resize vendor. and it ask to - Run multidisabler again!.​
    - Type: multidisabler again. will see - Finished. when done.​
    - Go back to Wipe > Format Data > type yes.​
    - Reboot to recovery.​
    7. Flash magisk apk in twrp.
    8. Reboot to system, Enjoy.

    Support:
    Live support is available via #twrp on Freenode with your IRC client or just click this link.

    Telegram group

    Bugs:
    - Encryption not fully working.
    - Haptic feedback is currently not working.

    Thanks:
    TWRP team
    @ianmacd for multidisabler

    Sources:
    Kernel tree
    Device tree
    4
    Changelog:
    21.08.2021 - Add Symlinked dynamic partitions to fstab
    - Fix dtbs issue from previous build
    09.08.2021 - Updated to latest kernel source
    - No vbmeta disable require
    - fstab clean up
    03.03.2021 - Initial Release.
    2
    Hi guys..

    Will this work for model G991B/DS?
    Yes
    2
    @afaneh92 The recovery supports flashing Magisk APK out-of-the-box?

    So, no need to rename the .apk to .zip anymore?
    You can flash apk
    I'm kinda casual, with haptic feedback not working do you mean the vibration motor in the phone stops working completely, or? I don't know what encryption not working means either.
    I saw the same issues for the S20 FE.

    Looking at both forums closely currently as I'm deciding which phone to buy dependent on which phone will have a better root experience.
    Vibration not working in twrp only, read more.
    Will this have to be done everytime there is a firmware update?? Or like other devices we can keep twrp and magisk when updating..
    I currently have S20 which I dont have twrp on but can update new firmware and just reboot to odin after flashing new firmware and just flash patched boot.img and all is good. Will the S21 be the same
    Yes need to redo every step.