尝试使用mScreenOn=true
或检查设备屏幕开启或关闭mPowerState=SCREEN_BRIGHT_BIT
。但以下命令不适用于最新的 android 版本。它什么也没返回
以下命令在 Android 中运行良好 - 4.3 Jelly Bean
使用输入法转储系统
adb shell dumpsys input_method | grep mScreenOn
使用电源转储系统
adb shell dumpsys power | grep mScreenOn
或者adb shell dumpsys power | grep mPowerState
有没有其他方法可以在最新的 android 版本(Lollipop、Nougat、Oreo、Pie 等)上使用 adb shell 命令验证屏幕关闭或打开状态