Permalink
Browse files

Added underlying functionality for more flexible 'find' searches. Cur…

…rently utilizing it to search for jpegs on the sdcard > 200K

Turns out ADB kept adding carriage returns to tar files, which I forgot to clean up.
Now it goes tar -> b64 -> strip carriage returns -> b64 decode -> file.tar

Thanks int0x80 for 'find' idea
  • Loading branch information...
1 parent de5d89d commit 104a4ce98b6e64dc048bf53f215dbf92c650b8f4 @kosborn committed May 9, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 getJpgs.sh
View
@@ -0,0 +1,16 @@
+# p2p-adb
+# https://github.com/kosborn/p2p-adb/
+# @theKos
+# kyle@kyleosborn.com
+
+
+
+DIREXISTS=$(adb shell '[[ -d /sdcard/DCIM/Camera/ ]] && echo 1' | tr -d "\r")
+
+if [ "$DIREXISTS" = "1" ]; then
+ DATAPATH='/sdcard/DCIM/Camera'
+ getSearch "$DATAPATH" "*.jpg" "+200k"
+else
+ echo "Camera directory doesn't exist?"
+fi
+

0 comments on commit 104a4ce

Please sign in to comment.