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.
Last active
August 29, 2015 14:18
-
-
Save dominikschreiber/f7bf135d697f8c6d7c0e to your computer and use it in GitHub Desktop.
various adb utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment