How to make a sector-by-sector copying Android?

Good afternoon.
There are LineageOS and TWRP on Asus smartphone.
How to make a sector-by-sector backup? And how then to recover?
Just /data is encrypted and TWRP does not open the partition (the copy makes the file, not sector by sector).

There is an option with ADB , but all the instructions says that you need ROOT to have. I tried without ROOT and it works, but how to restore the question...and then turn into a brick after a sector-by-sector recovery.

-
And the second question: how to open an encrypted partition (sector-by-sector copy) in ubuntu ? There is not dm-crypt (sort of).
June 14th 19 at 18:59
1 answer
June 14th 19 at 19:01
Flash using dd to copy the partitions to a USB flash drive from twrp via adb as root by default
Do you mean the terminal in TWRP?
And how to determine where the necessary sections for dd flash? - cortney.Johnston commented on June 14th 19 at 19:04

Find more questions by tags AndroidLineageOSLinux