Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent an android device from entering sleep (via adb command shell)

I am working on an embedded board with android on it. Unfortunately I cannot use the display as I dont have a supporting display device (LVDS display).

Problem :

Everytime i bootup the device, the device goes into sleep after some time.

Restarting tasks ... done.
PM: suspend exit 1970-01-01 00:35:30.797352016 UTC
PM: suspend entry 1970-01-01 00:35:30.905410683 UTC
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)

How can i avoid it from shell prompt? I am able to login to shell through serial port.

I cannot modify the settings as i dont have access to display.

like image 413
Sandeep Avatar asked Sep 22 '16 03:09

Sandeep


1 Answers

$ adb shell svc power stayon true

like image 88
Sahil Avatar answered Sep 23 '22 07:09

Sahil