OK, so do I understand correctly that I can back up and restore my FP4 with this, but not my data folder? What folders would I have to additionally copy via USB to have a full backup of my phone?
Or asked differently: Does this guide work with this TWRP version on FP4?
All user data is on the so-called userdata partition which is always encrypted on FP4, and TWRP currently cannot decrypt it and see the data to back it up. So you can only âback upâ system partitions that contain the Android system but thatâs probably not what youâre looking for.
That guide wonât work for a full backup, all the interesting parts of the system (apart from the A/B partitions) are inside the super partition. Without access to encrypted data in TWRP you canât back up that partition.Edit 2:super isnât encrypted
I backed up all the partitions I could on a running phone using dd, but that wonât produce a complete set of partitions you can use to flash your phone back to normal, since you canât completely back up those special partitions from userspace.
Can we back up the super partition in TWRP? /data doesnât work, sure, but the super partition would be more interesting. The amount of partitions I can choose from in TWRP doesnât really match the partitons actually on deviceâŚ
super is not encrypted so sure. Not 100% sure how well the backup from TWRP itself is but you can definitely just use dd from the command line to just make a 1:1 image of the partition that you should be able to flash back via fastboot.
The dd image will also be the full size of the partition, and not just the system data it contains, maybe itâs possible to use the img2simg tool to shrink it down and convert it into a sparse image.
Backing up super in TWRP fails, I just tried.
I do have backups of the super partition and all the others, but from a running system. I donât know if I can flash those back to my device safely, since we have had problems with AVB in other topics before. At around 100 partitions (with duplicates, full storage device backupsâŚ) the chance for failure seems pretty high to me. Are you sure this works?
Well maybe Iâll just have to flash /e/ and try to go back to vanilla
@Discostu36 You canât backup /data and super from TWRP at this point.
I wouldnât suggest flashing /e/ if you are not sure you want to stay there, if thatâs what youâre asking
My use case is that I can do a factory reset / lose my phone / wreck my mainboard / whatever and then have a backup that I can restore and have everything in place like nothing ever happened.
That wonât be possible, no.
Your best bet is setting up something like Syncthing for your important data or trust Google with your stuff and activate their cloud backup (that will backup app settings for compatible apps as well)
Image is booting correctly in TWRP 3.6.0_11-0
however the file differs from yours:
SHA256 hash di recovery.img:
7f9bc1836f83de679eba2992176ce8d25b1190e0a666d8a3f19e1c689efaf6c9
SHA256 hash di .\twrp-3.6.0_FP4-UNOFFICIAL-20211216.img:
9358dc6e623d213992e1c1c14b340f07524641491453f3c7065b723e4024df46
Is accessing encrypted data a general-TWRP function that is still a work-in-progress, or is this somehow already available and needs to be ported specifically to FP4?
Having this function will help a lot making backups and resolving some stupid mistakes
I donât think TWRP images can be built reproducibly (so the file is really identical) and even if, your sources are very likely newer than the ones I built it with.
Is FP4 a FBE (File-based encryption) or a FDE (full-disk encryption) device?
On the âTroubleshooting/Debuggingâ section, they advice to add a line or two (setprop prepdecrypt.loglevel 2 and setprop prepdecrypt.setpatch true) to have debug logs, did you try that already?
Ok. Iâm not familiar with code compilation, but Iâm eager to learn .
Even if this Github page is ârelatively well documentedâ, I had to read it several times to (kind of) understand what are the steps.
Here I made a summary
Prerequisites
Vendor service binaries and dependencies for FBE : qseecomd, keymaster, gatekeeper
the binaries should be placed in system/bin
check the dependencies with the âldcheckâ script.
1b)
init.recovery.$(ro.hardware).rc file in device tree with symlink for bootdevice included:
I made a fork and Iâm playing with TWRP (my first time ), here the link.
I extracted the binary blobs from my own FP4, booting from a patched image with Magisk.
I have tried several things and managed to compile it, but iâm shooting blind.
Iâm going to review the steps I did with your explanation, it will be very helpful.