Android screenshot Command Screencap

Source: Internet
Author: User

View Help Commands
[email protected] ~$ adb shell screencap-vscreencap:invalid option--vusage:screencap [-   HP] [-D Display-id] [FILENAME]-h:this message-p: Save the file as a PNG. -d:specify the display ID to capture, default 0.If FILENAME ends with. png It'll be saved as a PNG. If FILENAME is not given, the results would be printed to stdout.  

Attention:

If the file name ends with a. png, it is saved as a PNG file

If the file name is not given, the result is output to stdout

Save to SD card and export
$ adb shell screencap -p /sdcard/screen.png$ adb pull /sdcard/screen.png$ adb shell rm /sdcard/screen.png

This method is more troublesome and requires 3 steps: 1. Save to SDcard 2. Export the picture 3. Delete a picture from SDcard

Save directly to PC
$ adb shell screencap -p | sed ‘s/\r$//‘ > screen.png

The execute adb shell will \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

If you can use the alias package as a direct command:

In the future can be conveniently used And-screencap > directly will be saved to the computer

Public account: WIRELESSQA

About

Author: Bi Xiaobong | Old bi e-mail: [email protected]

Weibo:   @WirelessQA   blog:  http:// BLOG.CSDN.NET/WIRELESSQA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.