Android Utils

Android 便捷抓屏

2015-04-20  本文已影响67人  几千里也

用 shell 脚本抓屏

#! /bin/bash

adb root
adb remount

# Capture Screenshot
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/screencap.png

# or
# adb shell screencap -p /sdcard/screencap.png
# sleep 1
# adb pull /sdcard/screencap.png

# View Screenshot
eog ~/screencap.png &

用 Android Studio 也很方便

*** REF***

Start your app as described in Run your App in Debug Mode.
Click Android to open the Android DDMS tool window.
Click Screen Capture on the left side of the Android DDMS tool window.
Optional: To add a device frame around your screenshot, enable the Frame screenshot option.
Click Save.

上一篇下一篇

猜你喜欢

热点阅读