Here is a tutorial with screenshots on how to add the reboot option to the power menu for the Defy.
3. Next we need to modify Defy's shutdown method to accept 1 more option .
Decompile framework and open "com\android\internal\app\ShutdownThread.smali"
Since we are going to pass an integer to ShutdownThread and then evaluate that integer when the code runs,
we have to have a spot for the integer so add this to line 25
Code:.field public static mReboot:I
Screenshot :
Then at line 545 add this code before "invoke-static {}, Landroid/os/Power;->shutdown()V"
Code:sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I const/4 v2, 0x1 if-eq v1, v2, :reboot
Then after this code on about line 555
invoke-static {}, Landroid/os/Power;->shutdown()V
.line 512
return-void
Add this code
Code::reboot const-string v4, "now" invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V return-void
Screenshot :
Save and close
Compile framework
mods/devs, please help me on adding reboot, recovery and download in the power menu..my phone is an alcatel ot-918N running on stock 2.3.6 gingerbread. The problem I am having is in the shutdownThread.xml, I can't find the code in the post above, it seems that I have a different codes in the shutdownThread. can you please help me on adding the 3 options in my power menu..thanks so much..
here's my shutdownThread file..
shutdownThread.xml