How to capture the screen from adb in Android

This article will introduce how to capture the screen and download it to the PC from adb command in Android.

1. "adb shell screencap -p PATH": Take a screen capture

The following command will take a screen capture and save the image to the path /sdcard/screen.png.

$ adb shell screencap -p /sdcard/screen.png

You can use the adb command to check if the file has been saved.

$ adb shell ls /sdcard/screen.png
/sdcard/screen.png

2. "adb pull PATH": Copy from Device to PC

You can download a screen capture file to your PC using the following command.

$ adb pull /sdcard/screen.png
/sdcard/screen.png: 1 file pulled, 0 skipped. 4.0 MB/s (36850 bytes in 0.009s)

Related Posts

codechachaCopyright ©2019 codechacha