adb backup -shared -all -f ./Backupfilename.ab
Howto mount it on a computer
dd if=Backupfilename.ab skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=OutfileimageEXT4.img
do this with all the ab files it creates, change the if= to the next file, leave the parameters as is.
Mount
sudo mount -t ext4 -o loop OoutfileimageEXT4.img /media/username/mountpoint_for_your_image