Re-Flashing TWRP for Backups after /e/ Installation

I have recently setup my Galaxy S10 Exynos (model SM-G973F) with /e/ using TWRP which I installed using Odin.

I have noticed that it has been replaced with /e/'s own recovery system which has limited functionality. I was hoping to use TWRP for backups

I saw this post which is a couple of years old now, and one of the commenters, Mr.D, recommended “re-flashing” TWRP and I was wondering if anyone has had experience with this and how successful/problematic it was?

There is also some discussion about what exactly is included in a TWRP backup of an /e/ phone (internal data excluded or not) and whether the phone being encrypted is a problem. If anyone has any advice on this or can point me to any /e/ specific resources to look into I’d really like to learn more before I potentially cause myself some problems.

Thanks!

This happens when the default “Update recovery” is allowed in

Settings > Updater > top right 3 dot menu > Preferences.

It should not lead to any harm if you reflash the correct TWRP with Heimdall and untoggle “Update recovery”.

In current supported versions of /e/OS encryption is enforced by Android (so is not optional). Samsung encryption has proprietary parts.

Perhaps search for encryption in TWRP’s FAQ

Not much to do with /e/OS … a TWRP backup by default will not include the so-called Internal Storage.

Thanks once again, I’ve found that setting and will reflash TWRP with Heimdall and use it. I’ll re-read the TWRP encryption details as well. Will post results.

Appreciate your time and patience!

Thank you also for this. I’m starting to get my head around it.

Much appreciated. This is a great community.

Hi again, I’ve just sat down to attempt to re-flash TWRP but I’ve just realised this will wipe the device. I don’t have anything in internal storage that I’m concerned about, but I don’t want to lose all the apps (particularly with the App Lounge not functioning currently).

I can’t find any first-hand information or someone using on how reliable /e/'s Seedvault backup is? I have used Insular to create separate Personal and Work profiles. So I wonder how likely I am to require starting from the beginning again.

Any advice from anyone with experience or insights?

Thanks as always!

What make you believe this ?

Looking at this on XDA forums. Have I misunderstood?

When coming from stock, unlocking the bootloader will wipe /data, but in your case, the bootloader is already unlocked.

Oh, you’re right. It does say that very clearly in the thread. Will give it a go and report back. Thanks!

I’ve just flashed TWRP for my phone using Odin and the instructions on the XDA forum link above and it worked in the sense that it is booting into TWRP, but beyond that it is stuck in a bootloop and won’t boot into /e/. When I reboot the phone from TWRP into system, it goes through the Samsung start screen, then vibrates once and reboots again back into TWRP. I don’t know how to get it out of the bootloop.

Any further advice?

Just to give some more detail on what I did… I booted the phone into download mode, connecting it to my PC, added the twrp .tar to AP and vbmeta.tar to CP, then clicked Start in Odin and held the recovery key combination for my S10. Odin process completed successfully and phone booted into TWRP and that’s where I am currently, only able to boot into TWRP.

It looks like the data is all still there so I’m hoping there is a way to get it to boot into /e/ (dirtyflash?). I have a backup phone with everything I need on it but it would be great not to have to start again with /e/ from the beginning.

To overwrite the recovery all that is required is to change RECOVERY that is the equivalent of

sudo heimdall flash --RECOVERY /path/to/recovery.img
Not required in this case

The link you followed included to Download [avb disabled vbmeta **.tar**](https://downloads.corsicanu.ro/samsung/vbmeta-27.10.2020/vbmeta.tar) this is what messed with system, maybe this link helps explain https://www.reddit.com/r/Xiaomi/comments/q03e8n/why_disabling_vbmeta_after_unlocking_the/

Your best bet now is to sideload the /e/OS ROM

adb sideload downloaded_file_name.zip

in TWRP documentation for A/B devices with super-partitions also called dynamic partition we find some advices :

  • reinstall boot.img (foundable into the /e/.zip) using TWRP install feature.
  • Alternate Installation Method: Once booted, navigate to the Advanced > Install Recovery Ramdisk option. This will ask you to select the image you want to install TWRP from. Select the TWRP image you just downloaded and copied into device storage. Proceed to install this image.
  • You also need to use the “Fix Recovery Bootloop” option present in the same Advanced Tab. Use that option after you have installed the recovery ramdisk successfully to avoid boot loops happening from installing TWRP Permanently.

Thank you both aibd and piero. I’m learning as I go here which has caused some silly mistakes. I appreciate the advice from both of you.

So it seems I should be using heimdall which will give me more precise control. I have a little linux knowledge so should be able to get through it. So I should not have included vbmeta.img in the flash.

So an A/B device is one with two partitions for updating seamlessly with less issues. Was my device a A-only device until installed TWRP and then /e/ or was it always an A/B device?

Of the two pieces of advice you have given me and some reading I have just done, I have guessed the best way forward would be to try:

  1. Reinstalling boot.img from the /e/ package via TWRP and see how that goes first.
  2. If that doesn’t work, try sideloading the complete /e/.zip using adb

Does this sound like a good approach or should I just try the first option and report back?

Thank again for your support !

I was not able to copy the boot.img file using Windows Explorer so I attempted to copy it using the adb “push” command and I received this output:

* daemon not running; starting now at tcp:5037
* daemon started successfully
adb: error: failed to copy 'boot.img' to '/sdcard/boot.img': remote couldn't create file: Required key not available
boot.img: 1 file pushed, 0 skipped. 37.1 MB/s (57671680 bytes in 1.482s)

Do you know what might be causing this to fail?

I attempted to sideload boot.img to the system but that didn’t work. I was able to sideload the complete /e/.zip package via TWRP and adb which completed successfully on the phone, however it only got to about 48% in the cmd window (with output “Total xfer: 0.94x”).

I then rebooted the phone but the same bootloop is happening as I had before.

When I look at the “sdcard” directory on the phone via TWRP or the internal storage in Windows Explorer, I have around 20 folders that are all random characters. I’m wondering if this means anything to you.

Apologies for all the questions, if there is anything you’d recommend I do or read from this stage to help move this forward I’d be happy to instead of constantly bothering you for answers.

Thanks for your help so far.

You are right, the advice is valuable for “devices with super-partition”…
(i have corrected my post Re-Flashing TWRP for Backups after /e/ Installation - #14 by piero)

Sideload works for .ZIP or .APK files

“/sdcard” is for internal storage location that is encrypted.
Physical SDcard location is “external_sd”

Not sure if restore an encrypted /data partition will works / will be usefull…
→ tell us…

I would suggest you do not risk to compromise your sdcard – internal storage – at this point, but of course @piero is only suggesting you have a look !

is to investigate the difference between the recovery partition on these devices and the boot.img and recovery.img.

I suspect your sdcard is behaving as expected. The linked TWRP is 3.6. I found no TWRP for Android 13.

1 Like

The TWRP I installed was “twrp-3.7.0_9-1-beyond1lte.img.tar”

I haven’t been able to load any files to the phone, either using Windows Explorer, or adb “push” command, to test if I can run the boot.img.

If there are no other options for getting files onto the phone I’m happy to be a test case and see if I can backup and restore.

If there is no TWRP for Android 13 does this mean I don’t have the option of wiping and reinstalling /e/ to start again? If that is the case, is it possible to use TWRP to bring it back to Android 12?