Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn on screen on device

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 ?

like image 203
Lukap Avatar asked Sep 28 '11 14:09

Lukap


1 Answers

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)

like image 108
Grayson Henry Avatar answered Sep 24 '22 02:09

Grayson Henry