[Nexus 4 Original Android Development] 7wells:
The previous TWRP version 3.3.1-0 for the Nexus 4 (mako) correctly (re)boots as intended. I confirm that (for me) the problem with not being able to (re)boot into recovery or bootloader (but instead into itself) started with the latest TWRP version 3.4.0-0, so I went back to 3.3.1-0. And yes, the workaround works, too.

How can TWRP be used on an encrypted Nexus 4 for backup? Because of the encryption (and TWRP not being able to decrypt the /Data partition), there is no target to save the backup to. I thought that maybe via adb something is possible, but I have bo clue how. Something like this?

adb pull /dev/block/mmcblk0 mmcblk0.img

But how do I know which are which partitions? With adb shell I can see these:

brw------- 1 root root 179, 0 Sep 22 14:18 mmcblk0
brw------- 1 root root 179, 1 Sep 22 14:18 mmcblk0p1
brw------- 1 root root 179, 10 Sep 22 14:18 mmcblk0p10
brw------- 1 root root 179, 11 Sep 22 14:18 mmcblk0p11
brw------- 1 root root 179, 12 Sep 22 14:18 mmcblk0p12
brw------- 1 root root 179, 13 Sep 22 14:18 mmcblk0p13
brw------- 1 root root 179, 14 Sep 22 14:18 mmcblk0p14
brw------- 1 root root 179, 15 Sep 22 14:18 mmcblk0p15
brw------- 1 root root 179, 16 Sep 22 14:18 mmcblk0p16
brw------- 1 root root 179, 17 Sep 22 14:18 mmcblk0p17
brw------- 1 root root 179, 18 Sep 22 14:18 mmcblk0p18
brw------- 1 root root 179, 19 Sep 22 14:18 mmcblk0p19
brw------- 1 root root 179, 2 Sep 22 14:18 mmcblk0p2
brw------- 1 root root 179, 20 Sep 22 14:18 mmcblk0p20
brw------- 1 root root 179, 21 Sep 22 14:18 mmcblk0p21
brw------- 1 root root 179, 22 Sep 22 14:18 mmcblk0p22
brw------- 1 root root 179, 23 Sep 22 14:18 mmcblk0p23
brw------- 1 root root 179, 24 Sep 22 14:18 mmcblk0p24
brw------- 1 root root 179, 25 Sep 22 14:18 mmcblk0p25
brw------- 1 root root 179, 3 Sep 22 14:18 mmcblk0p3
brw------- 1 root root 179, 4 Sep 22 14:18 mmcblk0p4
brw------- 1 root root 179, 5 Sep 22 14:18 mmcblk0p5
brw------- 1 root root 179, 6 Sep 22 14:18 mmcblk0p6
brw------- 1 root root 179, 7 Sep 22 14:18 mmcblk0p7
brw-rw---- 1 system system 179, 8 Sep 22 14:18 mmcblk0p8
brw-rw---- 1 system system 179, 9 Sep 22 14:18 mmcblk0p9

/dev/block # cat /proc/partitions
major minor #blocks name

179 0 15388672 mmcblk0
179 1 65536 mmcblk0p1
179 2 512 mmcblk0p2
179 3 512 mmcblk0p3
179 4 2048 mmcblk0p4
179 5 512 mmcblk0p5
179 6 22528 mmcblk0p6
179 7 22528 mmcblk0p7
179 8 780 mmcblk0p8
179 9 780 mmcblk0p9
179 10 780 mmcblk0p10
179 11 512 mmcblk0p11
179 12 512 mmcblk0p12
179 13 512 mmcblk0p13
179 14 2048 mmcblk0p14
179 15 512 mmcblk0p15
179 16 512 mmcblk0p16
179 17 512 mmcblk0p17
179 18 512 mmcblk0p18
179 19 16384 mmcblk0p19
179 20 16384 mmcblk0p20
179 21 1406852 mmcblk0p21
179 22 26747 mmcblk0p22
179 23 13798400 mmcblk0p23
179 24 512 mmcblk0p24
179 25 495 mmcblk0p25

/dev/block/platform/msm_sdcc.1 # ls -al by-name
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x 2 root root 540 Sep 22 14:18 .
drwxr-xr-x 4 root root 600 Sep 22 14:18 ..
lrwxrwxrwx 1 root root 21 Sep 22 14:18 DDR -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 Sep 22 14:18 aboot -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 Sep 22 14:18 abootb -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 20 Sep 22 14:18 boot -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 Sep 22 14:18 cache -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 Sep 22 14:18 grow -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 20 Sep 22 14:18 m9kefs1 -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 Sep 22 14:18 m9kefs2 -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 Sep 22 14:18 m9kefs3 -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 Sep 22 14:18 metadata -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 Sep 22 14:18 misc -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 20 Sep 22 14:18 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 Sep 22 14:18 persist -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 20 Sep 22 14:18 recovery -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 Sep 22 14:18 rpm -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 Sep 22 14:18 rpmb -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 20 Sep 22 14:18 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 20 Sep 22 14:18 sbl2 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 Sep 22 14:18 sbl2b -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 20 Sep 22 14:18 sbl3 -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 Sep 22 14:18 sbl3b -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 Sep 22 14:18 system -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 20 Sep 22 14:18 tz -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 Sep 22 14:18 tzb -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 Sep 22 14:18 userdata -> /dev/block/mmcblk0p23

~ # ./parted /dev/block/mmcblk0 p
Model: MMC 016G92 (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 1600MB 1441MB ext2 system
22 1600MB 1627MB 27.4MB ext4 cache
23 1627MB 15.8GB 14.1GB userdata
24 15.8GB 15.8GB 524kB DDR
25 15.8GB 15.8GB 507kB grow

Now I wonder which other partitions should I backup (if I knew how ;)) in order to be able to revert back to the "original" LOS 17.1 (incl. OpenGApps + my settings) if needed?

PS: I managed to backup to /sdcard. See there:

https://xdaforums.com/showpost.php?p=83556127&postcount=332