Skip to content

Instantly share code, notes, and snippets.

@mikroskeem
Created December 10, 2014 22:26
Show Gist options
  • Save mikroskeem/3cddcffa03c4f3a4ab4f to your computer and use it in GitHub Desktop.
Save mikroskeem/3cddcffa03c4f3a4ab4f to your computer and use it in GitHub Desktop.
Gets images from 500 Firepaper cache
#!/system/bin/sh
bbox=$(which busybox)
fivehundredpath="/data/data/eu.chainfire.firepaper.fivehundredpx"
firesave="/sdcard/firesave"
[ ! -x "$(which su)" ] && echo "You don't have root!" && exit 1
[ ! -x "$bbox" ] && echo "You don't have busybox installed(Or it's not in \$PATH?)." && exit 1
[ ! -d "$fivehundredpath" ] && echo "You haven't runned 500 Firepaper or it's not installed!" && exit 1
[ ! -d "$firesave" ] && mkdir "$firesave"
echo "Copying..."
su -c "cp $fivehundredpath/files/image* $firesave/"
echo "Renaming..."
for k in $(ls $firesave); do mv $firesave/$k $firesave/$(echo $k.jpg); done
echo "Done! Enjoy :)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment