How can I give a CPU wakelock to an app so that It can work even when the screen is off?

(Usually android halts CPU too, when screen is off)

  • Apps get wakelocks programmatically using PowerManager APIs. You can acquire and release a wakelock manually by writing a string to /sys/power/wake_lock and /sys/power/wake_unlock respectively. Mar 19, 2019 at 4:52
  • @IrfanLatif Thank you! :) That's the answer, though I don't have root :( Mar 19, 2019 at 8:08

1 Answer 1


If you don't have root access in your phone, there are many apps in the Play Store which can take a partial wake lock. Just start the app manually when you need it. Because, if one app takes a partial wake lock, other apps can also take the advantage.

  • Thanks, I didn't know that the wakelock affects other apps too. and I don't have root :) Mar 19, 2019 at 8:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .