Obtain screen status using ADB

adb, android

Solution

`dumpsys power | grep mScreenOn`

Problem

I need to know in my script whether or not the device's screen is off. Is there any simple command to obtain such information using ADB?

Original source

Related problems