how can i monitor netcat transferring from android to my linux machine

i used this command on android device ( sender ) to make a full dump for my device :

dd if=/dev/block/mmcblk0 | busybox nc -l -p 8888

on receiver side i use this command :

nc 8888 > device_image.dd

i need to watch the progress with pv how can i do it ? thank

  • Just a side note: unless you can guarantee that mmcblk0 isn't being modified as you are reading it, you will end up with an inconsistent dump, which will be of dubious usefulness. – dhag Feb 20 '18 at 18:27

Inserting pv in your receive-side pipeline should allow you to observe progress:

nc 8888 | pv >device_image.dd

If you had pv available on the sending side, you could also use it there:

dd if=/dev/block/mmcblk0 | pv | busybox nc -l -p 8888

But pv probably won't be available on your Android device unless you installed it there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.