I need to be able to access the reboot feature. Security does not allow me to do this. The platform is a custom build so this will only be part of my AOSP based build.
I was wondering how I can make changes to the AOSP and be able to call system functions to do the reboot. Is it possible to add a custom INTENT that I can call from user space that will then do the reboot command for me?
The following code does not work from the user level app so I was thinking I could do this from the AOSP build and add a custom intent that I can call. Possible?
Process chperm;
try {
Runtime rt = Runtime.getRuntime();
chperm = rt.exec(new String[] {"/system/bin/reboot"});
chperm.waitFor();
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}