Restarting a device programmatically

The permission you required is not related to your reboot method, as your method requires a rooted phone (with su). To reboot the phone, require the permission as you did, but call PowerManager#reboot.

PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
pm.reboot(null);

Leave a Comment