Skip to content

Instantly share code, notes, and snippets.

@paddyzab
Last active August 29, 2015 14:10
Show Gist options
  • Save paddyzab/053e86f1858db3bf7a0d to your computer and use it in GitHub Desktop.
Save paddyzab/053e86f1858db3bf7a0d to your computer and use it in GitHub Desktop.
Pull all png files from device through adb
#!/bin/bash
#Get all of a directory(sdcard), and filter them
for file in `adb shell ls /sdcard/Pictures/Screenshots/ | grep .png`
do
file=`echo -e $file | tr -d "\r\n"`;
# create the directory to store the files in your filesystem
mkdir -p ~/fetched_screenshots
# pull the command
adb pull /sdcard/Pictures/Screenshots/$file ~/fetched_screenshots;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment