Skip to content

Instantly share code, notes, and snippets.

@dominikschreiber
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dominikschreiber/f7bf135d697f8c6d7c0e to your computer and use it in GitHub Desktop.
Save dominikschreiber/f7bf135d697f8c6d7c0e to your computer and use it in GitHub Desktop.
various adb utils
#!/bin/sh
# push picture to android device and make it available in gallery
# kudos to https://groups.google.com/forum/#!topic/appium-discuss/QWkhvs_rEtk
PICTURES=/mnt/sdcard/Pictures
adb push $1 $PICTURES
adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file://$PICTURES
#!/bin/sh
# save screenshot from android device directly from command line.
# kudos to http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > $1

adb utilities

Various utility scripts to make life easier using adb. About all have been found somewhere on the internet, a link to the original source/inspiration is included where possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment