Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 10 lines (8 sloc) 0.393 kb
1 2 3 4 5 6 7 8 9 10
#!/bin/sh -x

sdcard=/sdcard/DCIM/Camera/
to=/data/DCIM/Camera/

adb shell find $sdcard -mindepth 1 -maxdepth 1 | sed "s!$sdcard/*!!" | tr -d '\r' | sort > /tmp/dcim.android
test -d $to || mkdir $to
find $to -mindepth 1 -maxdepth 1 | sed "s!$to!!" | sort > /tmp/dcim.disk
diff -uw /tmp/dcim.android /tmp/dcim.disk | grep -- "^-" | sed 's/^-//' | \
xargs -i sh -xc "adb pull $sdcard/{} $to/{}"
Something went wrong with that request. Please try again.