Turn on screen on device

Lukap picture Lukap · Sep 28, 2011 · Viewed 21.8k times · Source

How can I turn the sceen on ?

I tried something like this

adb -d  shell am broadcast -a android.intent.action.SCREEN_ON

It really should work, I send broadcast intent it is received by the system, but the screen doesn't turn on

I do not understand what is the problem, is it possible to turn the screen of the device by code ? I mean with software ? Cause it seems like the turning on of the screen is done just by the hardware button press . . . at least I got that felling , am I wrong ?

Answer

Grayson Henry picture Grayson Henry · May 26, 2015
adb shell input keyevent KEYCODE_POWER

Works to turn on screen (when display is off) Works to turn off screen (when display is on/awake)