[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Dr raman:
If you have a problem with your device, a backup is always handy. Xiaomi is pushing out updates very often, but they lack quality. Most of them were withdrawn. This guide follows this thread closely.

A raw backup, made with adb and to be used with fastboot, needs this prerequisites: Root, busybox, unlocked bootloader, adb enabled.

First, open adb and find out the blockdevices associated with your partitions:

adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
1|jasmine_sprout:/ $ su
jasmine_sprout:/ # ls -al /dev/block/bootdevice/by-name

and you get a complete listing

total 0
drwxr-xr-x 2 root root 1420 1970-09-09 07:27 .
drwxr-xr-x 3 root root 1480 1970-09-09 07:27 ..
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 abl_a -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 abl_b -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 apdp -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 bk1 -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 bluetooth_a -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 bluetooth_b -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 boot_a -> /dev/block/mmcblk0p62
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 boot_b -> /dev/block/mmcblk0p63
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 cache -> /dev/block/mmcblk0p64
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 cmnlib64_a -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 cmnlib64_b -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 cmnlib_a -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 cmnlib_b -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 ddr -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 devcfg_a -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 devcfg_b -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 devinfo -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 dip -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 dpo -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 dsp_a -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 dsp_b -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 frp -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 fsc -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 fsg -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 hyp_a -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 hyp_b -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 keymaster_a -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 keymaster_b -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 keystore -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 limits -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 logdump -> /dev/block/mmcblk0p57
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 logfs -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 mdtp_a -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 mdtp_b -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 mdtpsecapp_a -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 mdtpsecapp_b -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 minidump -> /dev/block/mmcblk0p61
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 misc -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 modem_a -> /dev/block/mmcblk0p58
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 modem_b -> /dev/block/mmcblk0p59
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 modemst1 -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 modemst2 -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 msadp -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 oops -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 persist -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 persistbak -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 pmic_a -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 pmic_b -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 rawdump -> /dev/block/mmcblk0p60
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 rpm_a -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 rpm_b -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 sec -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 splash -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 ssd -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 sti -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 storsec -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 switch -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 system_a -> /dev/block/mmcblk0p65
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 system_b -> /dev/block/mmcblk0p66
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 toolsfv -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 tz_a -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 tz_b -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 userdata -> /dev/block/mmcblk0p69
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 vbmeta_a -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 1970-09-09 07:27 vbmeta_b -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 vendor_a -> /dev/block/mmcblk0p67
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 vendor_b -> /dev/block/mmcblk0p68
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 xbl_a -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-09-09 07:27 xbl_b -> /dev/block/mmcblk0p41

For example you are currently running on slot_b and want to backup the modem firmware. The A2 has no external sd card, so you want to backup into the internal Download folder. So you are looking for the modem_b partition, which is at the /dev/block/mmcblk0p59 location according to above findings. The commands are

adb shell
1|jasmine_sprout:/ $ su
jasmine_sprout:/ # dd if=/dev/block/mmcblk0p59 of=/sdcard/Download/modem_b.img
393216+0 records in
393216+0 records out
201326592 bytes transferred in 3.725 secs (54047407 bytes/sec)

You can pull the .img with adb or use windows explorer to copy the Image from the Download folder to your computer. This file contains the whole dump of the partition, including empty space, and is therefore larger than the typical fastboot image. However, this images are restoreable via fastboot. To use the backup, place the image in the adb/fastboot folder. Bring your A2 into fastboot mode by restarting it and holding the Vol- key. Then use

fastboot flash modem_b modem.img
Sending 'modem_b' (196608 KB) OKAY [ 4.617s]
Writing 'modem_b' OKAY [ 1.423s]
Finished. Total time: 6.048s