• Android screencap截屏指令


    查看帮助(注意:有的网友错误使用 screencap -v ,结果差不多,因为系统不能识别-v,就自动打印出帮助信息)

    # screencap -h
    screencap -h
    usage: screencap [-hp] [-d display-id] [FILENAME]
    -h: this message
    -p: save the file as a png.
    -d: specify the display id to capture, default 0.
    If FILENAME ends with .png it will be saved as a png.
    If FILENAME is not given, the results will be printed to stdout.

    解释:

    用法: screencap [-hp] [-d 显示id] [文件名]
    -h: 查看帮助信息
    -p: 保存文件为png格式
    -d: 指定截取的显示id,默认为fb0(fb为framebuffer)
    如果文件名以.png结束,将保存为png格式文件
    如果没有文件名,将直接打印到标准输出

    例子:

    1、截取fb0界面到sdcard(此路径可以随意设置),文件名为fb0.png

    # screencap sdcard/fb0.png

    2、截图保存为png格式,与第一相同(疑惑:在RK3288 Android 5.1系统上,screencap -p /sdcard/fb0.jpg 执行也是成功的,可以查看到截图,不懂???)

    # screencap -p /sdcard/fb0.png

    3、截取fb1界面到sdcard,文件名为fb1.png

    # screencap -d /dev/graphics/fb1 sdcard/fb1.png

    4、直接执行screencap,打印到显示屏上,常人看不懂。

    # screencap

  • 相关阅读:
    静态代码块执行时机
    java中的命令
    JDBC
    final, finally, finalize
    面向对象
    线程中常用的一些方法
    线程中的yield()
    线程中的join()
    Thread对象 既传入了Runnable对象又重写了run()方法
    Python 绘制词云
  • 原文地址:https://www.cnblogs.com/lialong1st/p/8295604.html
Copyright © 2020-2023  润新知