Created
January 5, 2022 13:08
-
-
Save pfmaggi/0ea0fd7c04d08f0781d41d0132f14efa to your computer and use it in GitHub Desktop.
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 | |
DEVICES=`adb devices | grep -v devices | grep device | cut -f 1` | |
for device in $DEVICES; do | |
DISPLAYS=`adb -s $device shell dumpsys SurfaceFlinger --display-id | cut -d" " -f 2` | |
for display in $DISPLAYS; do | |
echo "Capturing from $display on $device" | |
output="screen_$(echo $device)_$(echo $display)_$(date +%Y%m%d_%H%M%S).png" | |
adb -s $device exec-out screencap -p -d $display > $output | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment