Android 通过adb命令查看设备尺寸和设置

Android adb查看设备尺寸

bash 复制代码
# 查看设备尺寸
adb shell wm size
import re
wm_size_value = re.search(r"Physical size: (\w+)x(\w+)", wm_sizes).groups()
wm_x, wm_y = int(wm_size_value[0]), int(wm_size_value[1])
# 上面获取具体数值

# 改变设备屏幕显示尺寸比例
adb shell wm size 1920x1080

#恢复设备屏幕原来的显示尺寸比例
adb shell wm size reset

以上若未若未恢复,断电重启设备

通用方法

bash 复制代码
adb shell dumpsys window displays |head -n 3
相关推荐
时间的拾荒人13 小时前
MySQL C语言连接 - 从入门到实战
android·c语言·mysql
Meteors.14 小时前
Android性能优化:01. 指标体系 + 分析工具链
android
jike_202615 小时前
安卓平台免费录音转文字工具深度测评:5 款 APP 功能对比与选型指南
android·智能电视
Code Man15 小时前
Windows 下使用 Appium
android·windows·appium
码农coding15 小时前
android 12 中的VSYNC接收
android
GitLqr15 小时前
Flutter 3.44 性能飞跃:深度解析 Android Platform View 的 HCPP 新特性
android·flutter·性能优化
码农coding15 小时前
android 12 SurfaceFlinger中的CompositionEngine
android
Mem0rin17 小时前
[MySQL] 聚合函数、分组查询、连接查询
android·mysql
码龙-DragonCoding17 小时前
一键批量提取音频、提取视频
android·音视频·提取
祉猷并茂,雯华若锦17 小时前
Win下完美解决Allure报错,生成Web自动化测试报告
android·python·selenium·自动化