I am trying to run below code,I am using [1]:https://github.com/rbochet/Fast-Forward-Reboot this link.
try {
Runtime.getRuntime().exec(
new String[] { "/system/bin/su", "-c", "reboot now" });
} catch (IOException e) {
e.printStackTrace();
}
And Error W/System.err﹕ java.io.IOException: Error running exec(). Command: [/system/bin/su, -c, reboot now] Working Directory: null Environment: null.
PERMISSIONS
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.READ_EXTERNAL_STORAGE
android.permission.WRITE_INTERNAL_STORAGE
android.permission.READ_INTERNAL_STORAGE
android.permission.REBOOT.
I am using Android Studio ,Target Android 6.0 (API level 23) Anybody please have an idea. thanks in advance.