Created
May 11, 2023 12:56
-
-
Save quentin23soleil/762503e7d13cfc71abb1c22b00c7a91a to your computer and use it in GitHub Desktop.
adb screenshot into clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
today=$(date +"%Y-%m-%d-%H-%M-%S") | |
image=~/android-screenshot/$today.png | |
echo $image | |
~/Library/Android/sdk/platform-tools/adb exec-out screencap -p > "~/android-screenshot/${today}.png" | |
osascript -e 'set the clipboard to (read (POSIX file "'$image'") as JPEG picture)' | |
echo "✅ copied to clipboard" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment