androidcommandshwakelock

How to take wakelock from shell command on android


Trying to improve my terminal application on Android.

And need to take Wakelock there.

So, how to take Wakelock from shell command on Android.


Solution

  • shell command to acquire a wake lock

      echo lock_me > /sys/power/wake_lock
    

    shell command to release the same wake_lock

      echo lock_me > /sys/power/wake_unlock