Android显示offset/change位置

Android display offset/change position

是否可以使用 adb 偏移整个显示内容/更改其位置shell?

我最近注意到可以更改分辨率。

adb shell wm size <Res>.

所以,我想知道是否可以引入偏移量或更改显示位置。

这里是wm命令的用法:

usage: 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.

所以你要找的命令是wm overscan来偏移显示:

adb shell wm overscan a,b,c,d

之前 Android 4.3:

adb shell am display-size

参考:https://plus.google.com/+AdamWPowell/posts/cz5TxuoNDfG and https://plus.google.com/+AndroidDevelopers/posts/QhWQArNDfS3