Skip to content

Instantly share code, notes, and snippets.

@FreddyPoly
Created July 29, 2019 10:46
Show Gist options
  • Save FreddyPoly/63bf9279c4d96a5f5013a3b6b24aff95 to your computer and use it in GitHub Desktop.
Save FreddyPoly/63bf9279c4d96a5f5013a3b6b24aff95 to your computer and use it in GitHub Desktop.
[ANDROID] Take screenshots and videos
# Take a screenshot from an Android device connected:
1 - Takes the screenshot
2 - Pull the screenshot from the device to the computer
3 - Deletes the screenshot on the device
For a file named `screen.png`
`adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png && adb shell rm /sdcard/screen.png`
# Take a video from an Android device connected:
1 - Start recording
`adb shell screenrecord /sdcard/video.mp4`
2 - Stop recording
CTRL + C
3 - Pull the video from the device to the computer
`adb pull /sdcard/video.mp4`
4 - Delete the video on the device
`adb shell rm /sdcard/video.mp4`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment