日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

adb录屏和截图

發布時間:2024/3/24 编程问答 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 adb录屏和截图 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

adb錄屏和截圖

  • 錄屏
    • 截圖
    • 通過Android Studio錄屏和截圖

錄屏

錄屏命令:screenrecord
在adb shell下輸入命令查看使用幫助:

screenrecord --help

輸出幫助內容如下:

PS C:\Users\Admin> adb shell X5:/ $ screenrecord --help Usage: screenrecord [options] <filename>Android screenrecord v1.2. Records the device's display to a .mp4 file.Options: --size WIDTHxHEIGHTSet the video size, e.g. "1280x720". Default is the device's maindisplay resolution (if supported), 1280x720 if not. For best results,use a size supported by the AVC encoder. --bit-rate RATESet the video bit rate, in bits per second. Value may be specified asbits or megabits, e.g. '4000000' is equivalent to '4M'. Default 4Mbps. --bugreportAdd additional information, such as a timestamp overlay, that is helpfulin videos captured to illustrate bugs. --time-limit TIMESet the maximum recording time, in seconds. Default / maximum is 180. --verboseDisplay interesting information on stdout. --helpShow this message.Recording continues until Ctrl-C is hit or the time limit is reached.X5:/ $

從上面的輸出可以使用方法:

screenrecord [options] <filename>

其中options 有如下選項:

  • –size WIDTHxHEIGHT:設置分辨率,不設置則未使用設備默認的分辨率
  • –bit-rate RATE:4000000代表4M,默認4M
  • –time-limit TIME:錄制時長限制,單位s,最長支持180s
  • 錄制可以使用control+c停止,或者錄制時長達到限制時長
  • 錄制完成可以通過adb pull命令將視頻拷貝到PC上查看
  • 截圖

    截圖命令:screencap
    在adb shell輸入命令查看幫助:

    screencap -h

    輸出如下:

    X5:/ $ 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. 1|X5:/ $

    使用方法:screencap [-hp] [-d display-id] [FILENAME]
    其中選項如下:

  • -h:顯示幫助
  • -p:保存為png格式
  • -d:設置id,默認0
  • 如果文件名以.png結尾,則保存為png格;如果沒有給出文件名,則文件名有程序生成,并輸出到標準輸出流。
  • 通過Android Studio錄屏和截圖

    如果安裝了Android Studio,可以通過logcat 工具欄的功能進行錄屏和截圖:

    總結

    以上是生活随笔為你收集整理的adb录屏和截图的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。