Question: I am making an Android app that needs to have the phone reboot or turn off when a button is clicked. Is this possible? Or will the phone require root access?

Answer: 
I did this in my app by calling the method below. 

Notes:
1. Make sure the phone is rooted
2. Allow the app in your root manager to automatically grant root permission.

```
    void reboot() {
        if (reboot) {

          try {
              Process proc = Runtime.getRuntime().exec(new String[]{"/system/bin/su", "-c", "reboot"});
              proc.waitFor();
          } catch (Exception ex) {
              Log.e(TAG, "Error ", ex);
          }

        }
  }

```
> 
> If your device is rooted device then you can use below code.
> 
> 
> 

```
Runtime.getRuntime().exec(new String[]{"/system/bin/su", "-c", "reboot now"});

```