Is it possible to restore data partition backup to an android phone on the fly with just adb shell?
This will work on a linux:

adb shell dd if=/dev/block/mmcblk0p7|sed 's/\r$//' &gt; backup.bin


In MacOS it can be made to work as well, you just need to do it with Perl:

adb shell dd if=/dev/block/mmcblk0p7|perl -pe 's/\x0D\x0A/\x0A/g' &gt; backup.bin