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.