2015-11-29 70 views
1

是否可以使用adb shell來偏移整個顯示內容/更改其位置?Android顯示偏移/更改位置

正如我最近注意到有可能改變分辨率。

adb shell wm size <Res>. 

所以,我想知道是否有可能引入偏移或改變顯示位置。

回答

1

這裏是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/cz5TxuoNDfGhttps://plus.google.com/+AndroidDevelopers/posts/QhWQArNDfS3

+0

最新Android版<4.3,即亞行殼上午命令 – TheAnimatrix

+0

'am'代表'ActivityManager',它不會是這樣的過掃描設置有用。在4.3之前沒有'wm',但你可以使用'adb shell和display-size'來改變屏幕分辨率(參考:https://plus.google.com/+AdamWPowell/posts/cz5TxuoNDfG和https:// plus.google.com/+AndroidDevelopers/posts/QhWQArNDfS3) –

+0

@TheAnimatrix是否可以使用'adb shell am display-size'? –