androidlinuxadbphotos

pull only new files (photos) from Android adb to linux os


I've been pulling photos from my android device to my linux OS like this:

$ adb pull <what-to-pull> <where-to-place>

In the future I would prefer to pull only the ones I don't alreay have.

What's the best way to do this?

Maybe I could put all the photos I've downloaded to the same folder and skip the ones with names that already exist in the folder I'm pulling from? How to do that?

Is that even the best way? Does an easier way to do this exist?

If so... how?

I'm on arch linux by the way, in case the distribution effects your suggested answer.


Solution

  • adb shell find "/sdcard/DCIM" -iname "*.jpg" | tr -d '\015' | while read line; do adb pull $line; done;
    

    ^that works well enough.

    From here.