Android to your computer using the command line screen capture and export

Source: Internet
Author: User

Disclaimer: This blog is an original blog, without consent. No reprint!

original link to http://blog.csdn.net/bettarwang/article/details/27819525

Most of the screenshots that most people use most often may be using the phone's shortcut keys, but that assumes that it is less efficient to import into a computer. In fact there is a better screenshot, the simplest of course is to use the eclipse in the Ddms to screen, click on the "Screens Capture" button and wait more than 10 seconds, then you can directly use Savebutton saved to the computer.

Obviously, due to the reasons for the image display, there will be a certain delay in the DDMS, the efficiency is not high enough. In fact, the most efficient way is to use the command line to intercept the screen. The shell command used for the screenshot and its associated parameters mean:

screencap [-HP] [-D Display-id] [FILENAME]

-h:this message (This article)

-p:save the file as a PNG. (Save the file in PNG format)

-d:specify the display ID to Capture,default 0. (Specify the display number for this screen shot.) The default feeling 0)

If FILENAME ends with. png It'll be saved as a PNG. (Assume that the file name ends with a. png.) It will be saved as a PNG image)

If FILENAME is not given,the results would be printed to stdout. (assuming that the file name is not specified (in fact the full file path), the results are printed to standard output.)

It actually prints the picture to the screen. Of course it's a garbled piece. Therefore, it is best to specify the file name.

)

Generally speaking. -h,-d These two parameters do not work for us, p used more places, but I do not recommend to use-p. Reasons such as the following:

For example, we use a command: Screencap-p/MNT/SDCARD/PIC01, the truncated graphics file name is PIC01 instead of pic01.png, so the export command becomes the ADB pull/mnt/sdcard/pic01 D :/, where d:/is the path we want to export to our computer, so we'll add a suffix to it.

Although it is also possible to use screencap-p/mnt/sdcard/pic01.png commands, there is clearly no screencap/mnt/sdcard/pic01.png and

Screencap/mnt/sdcard/pic01.jpg this command is convenient.

In addition, there are a few notable points to note: first. False assumptions will be placed in the sdcard, not necessarily my path (/mnt/sdcard/). Since this is related to the realization of the soft bottom. It's best to check with DDMS. Second. From the computer push APK to the mobile phone is to remount first, but from the mobile phone pull files to the computer is not required to remount first; third, screenshot command is not screenshots. I have tried, exporting to a computer found to be very messy and very strange graphics, interested in child shoes can be verified.

All of the above commands are personally verified by me, and the problem of the small partners to the following message!


Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Android to your computer using the command line screen capture and export

Related Article

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.