[フレーム]
Last Updated: February 25, 2016
·
1.204K
· carlosefonseca

Take a screenshot of every Android device attached via adb

Wanting to take a screenshot of all the different Android devices you have that are attached to adb, probably showing of the handling of different screen sizes? Use this:

adb devices | grep -v List | grep device | perl -p -e 's/(\w+)\s.*/1円/' | xargs -I § sh -c 'adb -s "1ドル" shell screencap -p | perl -pe "s/\x0D\x0A/\x0A/g" > "screen_1ドル.png" && open "screen_1ドル.png"' -- §

I have a function on .bash_profile with it.

This is a mix with another useful line that runs some adb command on all devices:

function adball {
 adb devices | grep -v List | grep device | perl -p -e 's/(\w+)\s.*/1円/' | xargs -I § adb -s § "$@"
}

Do:
adball install -r app.apk

and it installs on every device! Cool!

I have some more of these stuff here https://github.com/carlosefonseca/AndroidShell

AltStyle によって変換されたページ (->オリジナル) /