2015年12月4日 星期五

[Android][Adb]How to Capture Screenshot and Record Screen using ADB

1. Install the required ADB drivers on your PC.
2. Connect your device with PC using wired or wireless ADB connection.
3. Open Terminal in Linux or Command Prompt and enter the following command.
% adb shell screencap -p /sdcard/screencap.png
4. Now the captured screenshot will be placed on your internal sdcard. To copy the screenshot to your pc enter the command.
% adb pull /sdcard/screencap.png
Recording Screen
1. Connect your device with PC using wired or wireless ADB connection.
2. Open Terminal in Linux or Command Prompt and enter the following command.
% adb shell screenrecord /sdcard/screen.mp4
3. To stop screen recording break using Ctrl + C
4. Now the captured video will be placed in internal sdcard. Copy the video to PC using the command.
% adb pull /sdcard/screen.mp4
5. Increase bitrate of the video using the command.
adb shell screenrecord –bit-rate 12000000 /sdcard/screen.mp4