Reputation: 21
I want to reboot my phone using my app,but it requires root .
is there anyway to do it without root ?
My Code :
try {
Runtime.getRuntime().exec(new String[]{"su","-c","reboot now"});
} catch (IOException e) {
e.printStackTrace();
}
Edit : i've heard that we can reboot phone without root using
'devicepolicymanager' .
but i can't understand the official documentation 🙁 , if anyone knows it please leave a demo code.
Upvotes: 1
Views: 942
Reputation: 549
As far as I know you need root privileges to achieve this behavior.
Upvotes: 1