12

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.

Sandeep
  • 18,356
  • 16
  • 68
  • 108

1 Answers1

23

$ adb shell svc power stayon true

Mooncrater
  • 4,146
  • 4
  • 33
  • 62
Sahil Manchanda
  • 9,812
  • 4
  • 39
  • 89
  • Is this a persistent setting? Or is it something that need to be called after every reboot / power off? – W.M. May 20 '20 at 07:20
  • 1
    @W.M. i think it's not persistent. never tried it after reboot. – Sahil Manchanda May 20 '20 at 09:11
  • https://android.googlesource.com/platform/frameworks/base/+/master/cmds/svc/src/com/android/commands/svc/PowerCommand.java According to the above this is the equivalent of Setting keep awake while plugged in – Ebrahim Karam Sep 08 '22 at 19:38