当前位置:   article > 正文

adb shell wm命令及用法:_adb shell wm size

adb shell wm size

参考

scrcpy——Android投屏神器(使用教程)

adb shell wm 帮助:

> adb shell wm
Window manager (window) commands:
  help
      Print this help text.
  size [reset|WxH|WdpxHdp] [-d DISPLAY_ID]
    Return or override display size.
    width and height in pixels unless suffixed with 'dp'.
  density [reset|DENSITY] [-d DISPLAY_ID]
    Return or override display density.
  folded-area [reset|LEFT,TOP,RIGHT,BOTTOM]
    Return or override folded area.
  scaling [off|auto] [-d DISPLAY_ID]
    Set display scaling mode.
  dismiss-keyguard
    Dismiss the keyguard, prompting user for auth if necessary.
  disable-blur [true|1|false|0]
  user-rotation [-d DISPLAY_ID] [free|lock] [rotation]
    Print or set user rotation mode and user rotation.
  dump-visible-window-views
    Dumps the encoded view hierarchies of visible windows
  fixed-to-user-rotation [-d DISPLAY_ID] [enabled|disabled|default]
    Print or set rotating display for app requested orientation.
  set-ignore-orientation-request [-d DISPLAY_ID] [true|1|false|0]
  get-ignore-orientation-request [-d DISPLAY_ID]
    If app requested orientation should be ignored.
  set-multi-window-config
    Sets options to determine if activity should be shown in multi window:
      --supportsNonResizable [configValue]
        Whether the device supports non-resizable activity in multi window.
        -1: The device doesn't support non-resizable in multi window.
         0: The device supports non-resizable in multi window only if
            this is a large screen device.
         1: The device always supports non-resizable in multi window.
      --respectsActivityMinWidthHeight [configValue]
        Whether the device checks the activity min width/height to determine
        if it can be shown in multi window.
        -1: The device ignores the activity min width/height when determining
            if it can be shown in multi window.
         0: If this is a small screen, the device compares the activity min
            width/height with the min multi window modes dimensions
            the device supports to determine if the activity can be shown in
            multi window.
         1: The device always compare the activity min width/height with the
            min multi window dimensions the device supports to determine if
            the activity can be shown in multi window.
  get-multi-window-config
    Prints values of the multi window config options.
  reset-multi-window-config
    Resets overrides to default values of the multi window config options.
  reset [-d DISPLAY_ID]
    Reset all override settings.
  tracing (start | stop)
    Start or stop window tracing.
  logging (start | stop | enable | disable | enable-text | disable-text)
    Logging settings.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55

adb shell wm

通过vm设置后,重启手机仍有效,若想恢复默认值,则需要reset,如:

adb shell wm size reset
  • 1

1.adb shell wm size 查看手机分辨率

如:

adb shell wm size 
  • 1

结果:Physical size: 1080x1920

也可以设置成其他分辨率

如:

adb shell wm size 720x1280
  • 1

结果:Physical size: 720x1280

2.adb shell wm density 查看屏幕密度

如:

adb shell wm density
  • 1

结果:Physical density: 480

也可以设置成其他屏幕密度

如:

adb shell wm density 200
  • 1

结果:Physical density: 200

3.adb shell wm overscan 设置窗口的显示位置

如:

adb shell wm overscan 200,300,400,500
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/686830
推荐阅读
相关标签
  

闽ICP备14008679号