Tried to check device Screen ON or OFF using mScreenOn=true
or mPowerState=SCREEN_BRIGHT_BIT
. But the following commands are NOT working in latest android versions. It is returning nothing
Following commands working fine in Android - 4.3 Jelly Bean
using input_method dumpsys
adb shell dumpsys input_method | grep mScreenOn
using power dumpsys
adb shell dumpsys power | grep mScreenOn
oradb shell dumpsys power | grep mPowerState
is there any other way to verify the screen OFF or ON state using adb shell command on latest android versions (Lollipop, Nougat, Oreo, Pie,..etc)