C program to shutdown Android device

To do this first you need a rooted phone with super user access. You can’t do it without Root unless your app is signed with the System Firmware Key.

Try using the following

try {     Process proc = Runtime.getRuntime()                     .exec(new String[]{ "su", "-c", "reboot -p" });     proc.waitFor(); } catch (Exception ex) {     ex.printStackTrace(); }

For Reboot

try {     Process proc = Runtime.getRuntime()                     .exec(new String[]{ "su", "-c", "reboot" });     proc.waitFor(); } catch (Exception ex) {     ex.printStackTrace(); }

See also  How to Make Lots Of Money with Google AdSense Arbitrage in 2022