I am working on a client requirement in which they wanted to disable android device going into the sleep mode when the external power supply is connected

Does any one have come across this kind of requirement ? or does any one have idea how sleep mode can be disabled from kernel space. From UI yes it can be done by using keep device awake option But how and where it need to be implemented in code

1 Answer 1


You can change the setting in Java with a couple permissions: StackOverflow question

Should be a breeze if you're customizing kernels. I already checked for a build.prop edit but seems that it isn't possible that way

Hope this helps,

You must log in to answer this question.

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