[LeEco Le Max 2 ROMs, Kernels, Recoveries, & Other ] ThE_MarD:
Heyyo [MENTION=3782246]kayyappan[/MENTION], it is possible using DD commands.

For example, to backup an image of persist partition it would be

dd if=/dev/block/sda2 of=/sdcard/Download/persist_backup.img

And checking partition name symlinks and size...

le_x2:/dev/block/platform/soc/624000.ufshc/by-name # ls -l
total 0
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 aboot -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 abootbak -> /dev/block/sde17
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 apdp -> /dev/block/sde29
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 bluetooth -> /dev/block/sde22
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 boot -> /dev/block/sde18
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 bootconfig -> /dev/block/sdf7
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 cache -> /dev/block/sda3
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 cdt -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 cmnlib -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 cmnlib64 -> /dev/block/sde27
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 cmnlib64bak -> /dev/block/sde28
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 cmnlibbak -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 ddr -> /dev/block/sdd3
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 devcfg -> /dev/block/sda6
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 devcfgbak -> /dev/block/sda7
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 devinfo -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 dip -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 dpo -> /dev/block/sde31
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 dsp -> /dev/block/sde13
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 factory -> /dev/block/sdf6
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 frp -> /dev/block/sda8
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 fsc -> /dev/block/sdf5
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 fsg -> /dev/block/sde7
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 fsg_gap -> /dev/block/sde8
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 hyp -> /dev/block/sde5
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 hypbak -> /dev/block/sde6
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 kernellog -> /dev/block/sdf14
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 keymaster -> /dev/block/sde23
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 keymasterbak -> /dev/block/sde24
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 keystore -> /dev/block/sda5
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 letvconfig -> /dev/block/sdf10
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 letveui -> /dev/block/sdf11
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 letvreserve -> /dev/block/sdf13
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 letvsecure -> /dev/block/sdf12
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 mdtp -> /dev/block/sde15
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 misc -> /dev/block/sda4
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 modem -> /dev/block/sde12
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 modemst1_gap -> /dev/block/sdf2
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 modemst2 -> /dev/block/sdf3
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 modemst2_gap -> /dev/block/sdf4
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 msadp -> /dev/block/sde30
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 persist -> /dev/block/sda2
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 pmic -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 pmicbak -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 recovery -> /dev/block/sde20
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 recoveryconfig -> /dev/block/sdf9
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 reserve -> /dev/block/sdd1
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 rootconfig -> /dev/block/sdf8
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 rpm -> /dev/block/sde1
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 rpmbak -> /dev/block/sde2
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 sec -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 splash -> /dev/block/sde32
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 ssd -> /dev/block/sda1
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 sti -> /dev/block/sde33
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 system -> /dev/block/sde19
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 tz -> /dev/block/sde3
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 tzbak -> /dev/block/sde4
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 userdata -> /dev/block/sda9
lrwxrwxrwx 1 root root 16 1970-01-10 03:03 vendor -> /dev/block/sde34
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 xbl -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 1970-01-10 03:03 xblbak -> /dev/block/sdc1

le_x2:/dev/block/platform/soc/624000.ufshc/by-name # cat /proc/partitions
major minor #blocks name

254 0 524288 zram0
8 0 57073664 sda
8 1 8 sda1
8 2 32768 sda2
8 3 262144 sda3
8 4 1024 sda4
8 5 512 sda5
8 6 128 sda6
8 7 128 sda7
8 8 512 sda8
8 9 56776396 sda9
8 16 4096 sdb
8 17 4052 sdb1
8 80 32768 sdf
8 81 2048 sdf1
8 82 1024 sdf2
8 83 2048 sdf3
8 84 1024 sdf4
8 85 4 sdf5
8 86 4 sdf6
8 87 4 sdf7
8 88 4 sdf8
8 89 4 sdf9
8 90 512 sdf10
8 91 512 sdf11
8 92 512 sdf12
8 93 512 sdf13
8 94 10240 sdf14
8 32 4096 sdc
8 33 4052 sdc1
8 48 131072 sdd
8 49 32 sdd1
8 50 4 sdd2
8 51 1024 sdd3
8 64 5242880 sde
8 65 512 sde1
8 66 512 sde2
8 67 2048 sde3
8 68 2048 sde4
8 69 512 sde5
8 70 512 sde6
8 71 2048 sde7
8 72 1024 sde8
8 73 16 sde9
8 74 512 sde10
8 75 512 sde11
8 76 112640 sde12
8 77 16384 sde13
8 78 1024 sde14
8 79 32768 sde15
259 0 1024 sde16
259 1 1024 sde17
259 2 65536 sde18
259 3 4194304 sde19
259 4 65536 sde20
259 5 4 sde21
259 6 1024 sde22
259 7 512 sde23
259 8 512 sde24
259 9 256 sde25
259 10 256 sde26
259 11 256 sde27
259 12 256 sde28
259 13 256 sde29
259 14 256 sde30
259 15 4 sde31
259 16 102400 sde32
259 17 2048 sde33
259 18 634300 sde34

We can see that /dev/block/sde34 is the vendor partition.

So the backup command would be...

dd if=/dev/block/sde34 of=/sdcard/Download/vendor_backup.img

And to restore it would be the opposite..

dd if=/sdcard/Download/vendor_backup.img of=/dev/block/sde34

As for adding CLI commands? Tbh that would be more on the lines of requesting TWRP features. I just focus on TWRP support for X2.