Contribute an Android screenshot and automatically upload the shell script to the computer

Source: Internet
Author: User

Contribute an Android screenshot and automatically upload the shell script to the computer

It takes a long time for Android devices to Capture screenshots. What is even more troublesome is that it is uploaded to the computer via qq and has been around for half a day. In fact, you can use the adb command to take screenshots, and then write a pull statement to pull it to the computer. The file name is capture. sh and the content is as follows:

#! /Bin/bashadb shell screencap-p/sdcard/test.png # adb pull/sdcard/test.png ~ /Desktop/test.png dir = ~ /Desktop/curr = 'date "+ % Y-% m-% d % H: % M: % S "'name =$ {dir}" screenshot "$ {curr }". png "echo" $ {name} "adb pull/sdcard/test.png" $ name"
Description:

1. The computer environment in this article is MAC, and the path needs to be changed on windows without testing;

2. Try to manually download the code to the script file created with vim. Otherwise, some strange problems may occur.

3. Run the script./capture. sh to automatically take screenshots and upload the files to the desktop.

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.