wm命令详解

本文介绍了WM工具中的各种子命令,如调整分辨率、密度、屏幕捕捉等,以及在高通平台下如何通过修改build.prop和system.prop文件永久性改变显示设置的过程,包括使用ADB工具进行权限管理和文件操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 surface-trace: log surface commands to stdout in a binary format.

查看当前的分辨率:

wm size

设置当前输出分辨率:

wm size 1280x1024

永久性的修改(高通平台):

法一:修改build.prop

adb root //提示read only filysystem时执行此命令获取root权限,
adb remount
adb pull /system/build.prop D:\
//在build.prop末尾添加一行 ro.sf.lcd_density=240 
adb push  D:\build.prop  /system/
adb shell
cd /system/
chmod 644 build.prop    //没有修改权限将导致手机起不来

法二: 修改system.prop

Y:\xxxx\device\qcom\xxxx\system.prop

ro.sf.lcd_density=240 改这个值,然后重新编译system.img

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

启文源科技

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值