美文网首页Android Utils
Android 便捷抓屏

Android 便捷抓屏

作者: 几千里也 | 来源:发表于2015-04-20 11:29 被阅读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.

    相关文章

      网友评论

        本文标题:Android 便捷抓屏

        本文链接:https://www.haomeiwen.com/subject/joayfttx.html