[Galaxy S 4 Mini Android Development] smartxdev:
Hi! Thanks [MENTION=4940125]dulemars[/MENTION] and [MENTION=5280400]ne0zone75[/MENTION] for information. I'll get to it in a moment...

First of all, I want to provide some update on the TWRP functionality.

There was some claims lately that there are some problems with the encrypted backups, so I decided to test it out:

I've performed a full (all partitions) encrypted backup with the latest TWRP version here (19.05.14) and tried to restore all partitions.

And in case a correct password was provided before restoring - restore completed successfully, system working. :good:

So, for now it seems like all the encryption stuff is working for both file system and backups.

(As far as I tested... no responsibility taken!)

I also tested compression alone and then both compressing and encrypting backup.

Both backup and restore for all configurations worked just fine.

Here is some info on space-time consumption

(general relativity uninvolved ;), though the results are relative to my device, yours' may vary):

Backing up:

Unencrypted backup, no compression: time 100%, space 100%

Unencrypted backup, compressed: time 225%, space 60-70%

Encrypted backup, no compression: time 125%, space 101%

Encrypted backup, compressed: time 250%, space 61-71%

Restoring:

All backup restored with almost the same speed, while restoring compressed/encrypted backups took a bit longer.

But the difference was surprisingly small, compared to the backing up process.

To sum that up:

Encrypting the backup has minor impact on backup time, and negligible impact on size

Compression doubles the backup time, but reduces the size by a third. Which is worth it (at least from my point of view...)

And for daily use it seems fine for me to go with encrypted file system and encrypted+compressed backups.

---------------------------------------------------------------

Now, regarding my own confusions on filesystem encryption mechanism mentioned in recent posts:

What [MENTION=4940125]dulemars[/MENTION] said is actually what I was hoping to hear: once the filesystem is encrypted and unlocked in TWRP, any backup/restore may take place, and system security won't be compromised (as long as kernel supports it).

[MENTION=5280400]ne0zone75[/MENTION], regarding "Format Data", I'm glad to hear it confirms my recent findings.

As for encryption advices:

Custom Kernel - I do use f4ktion 1.4.0 kernel for it's governors, to conserve battery. And as far as I know it supports encryption fine.

NANDroid backups - can't agree more with what you said.

Regarding enabling "data journaling" for /data, I'll read on it. (maybe I'll PM you on this...)

Now, according to [MENTION=4940125]dulemars[/MENTION]'s understanding it should be fine restoring /system as well.

Is there any specific reason that I should avoid it in the spoken case?

Since not all configs' are in /data in my situation. I have some root apps storing components and settings in /system, etc.

Re-configuring all from scratch will be very very time consuming at this stage, so I hope it can be avoided.

Unless there is a reasonable concern on a potential serious vulnerability to the encryption in doing the following:

->format data, wipe cache, wipe system -> clean CM11+f4k kernel+gapps install -> encrypt device -> unlock in TWRP ->

-> restore /boot (f4k kernel), /system (configured CM11), /data, /efs, /modem​

Please, tell me what do you think???