Linux commands

Tuesday, April 3, 2012

Reboot android phone from kernel code


//from kernel code
#inlude <linux/reboot.h>
machine_restart (NULL)


//from framework layer

//include this file
#include<cutils/android_reboot.h>

//call this function
android_reboot(ANDROID_RB_RESTART,0,0);


//rebooting by setting android property
property_set("sys.reboot","1");

No comments:

Post a Comment