Android What permissions required to call PowerManager.goToSleep(n) put device in sleep mode?

DEVICE_POWER is a level 2 permission and protected permission and hence it is not provided to any app which request it via manifest, to get this permission successfully we need to have Platform certificate in our make file and shared user id set in manifest as system…

LOCAL_CERTIFICATE := platform (makefile entry)

android.uid.system (shared  user id )

There isnt a way around this i have looked around havent found any …

Leave a Comment