@act262
2017-08-04T13:13:09.000000Z
字数 753
阅读 3330
adb_shell
wm命令在4.x才有的,不同的版本下部分参数不同
wm [subcommand] [options]
获取屏幕大小:wm size
获取屏幕密度:wm density
i.e.
# 当前分辨率 width x heightwm size> Physical size: 720x1280# 当前屏幕密度wm density> Physical density: 320
# 改变屏幕的分辨率wm size 1080x1920# 重置分辨率wm size reset
# 截屏命令wm screen-capture
shell@htc_himauhl:/ $ wmusage: wm [subcommand] [options]wm size [reset|WxH|WdpxHdp]wm density [reset|DENSITY]wm overscan [reset|LEFT,TOP,RIGHT,BOTTOM]wm scaling [off|auto]wm screen-capture [userId] [true|false]wm size: return or override display size.width and height in pixels unless suffixed with 'dp'.wm density: override display density.wm overscan: set overscan area for display.wm scaling: set display scaling mode.wm screen-capture: enable/disable screen capture.wm dismiss-keyguard: dismiss the keyguard, prompting the user for auth if necessary.
