# How To Add Reboot Option To Power Menu?



## nhlflash

Does anyone know how to add a reboot and recovery option to the power menu for deodexed 4.5.605. I found a tutorial for the samsung vibrant and one of the htc phones, but none for the droid x. I recently saw that kejar had added those options to his Liberty 3 rom so i know it possible. I dont mind if its alot of work because I have alot of patience for this kinda stuff. Thanks alot.


----------



## UnfedBear67

I think your best bet is just to use a rom with all of that already built into the power menu. Im no developer but i assume that its a lot more then changing a few lines of code. Liberty 3 has the reboot in the power menu as you said and it still retains all the blur functions, and you can also choose which blur/aosp apps you want in the liberty customizer.


----------



## deercreek

Vortex is another good rom that has this.


----------



## nhlflash

yea i understand that i can just use one of the two roms mentioned which, dont get me wrong, are amazing roms, but im trying to make my own and understand each part of the system and framework. This is the tutorial that i was following until it became too different at the GlobalActions.smali.

http://forum.xda-developers.com/showthread.php?t=1169443


----------



## KMDonlon

I would also appreciate if someone could take the time to post a tutorial on how to do this specific to 4.5.605....I have researched it to death and do not want to use a pre-built ROM since I have modified my "sock" ROM to death....just want to do it myself 

I just recently followed a tutorial on modifying the services.jar to have the CRT animation ON along with off, worked wonderfully. I also have 1% battery set up along with de-throttle. See my point, this is the last mod I need help with that I would like to do.

Anyone?


----------



## rudyy

if i understand you correctly; root tools has a couple reboot options, as does widgetzoid. you could check out those and contact their devs.


----------



## KMDonlon

I actually want to know how to add the option directly to my power menu via framework-res mods, not an additional app.


----------



## fakiesk8r333

Yea I looked into thus a while back but had no luck. Maybe try contracting a ROM dev to see if they can help you out


----------



## rudyy

you could ask @deVorteX for help. 
here's a screen shot of his ROM's power button options.


----------



## KMDonlon

Yup, good idea since I can't find any DX specific info anywhere.....


----------



## deVorteX

Off the top of my head, I can tell you the edits needed for this are in android.policy.jar, framework.jar, and framework-res.apk all located in /system/framework.

You'll need to edit/add smali code for getting the options in there and the logic to do the reboot/cwr reboot.

Then in framework-res.apk, you need to add two icons that'll be used for the menu, as long as two strings. The hardest part there will be getting id's for the public.xml file.

Here's a link to where I found the info I used to base my mod off of: http://forum.xda-developers.com/showthread.php?t=811532
You can also pull out the files from my rom, decompile them, and try to compare the differences off the stock files.

if you need some help decompiling or editing let me know and I'll do what I can to help..


----------



## KMDonlon

Went through that thread as another poster also mentioned it. I will see if I can make the smali edits properly, that is the only concerns I had. I will take a look at your ROMs files and do exactly that. Thanks for the response buddy, wish me luck!


----------



## chefguy

KMDonlon said:


> Off the top of my head, I can tell you the edits needed for this are in android.policy.jar, framework.jar, and framework-res.apk all located in /system/framework. You'll need to edit/add smali code for getting the options in there and the logic to do the reboot/cwr reboot. Then in framework-res.apk, you need to add two icons that'll be used for the menu, as long as two strings. The hardest part there will be getting id's for the public.xml file. Here's a link to where I found the info I used to base my mod off of: http://forum.xda-developers.com/showthread.php?t=811532 You can also pull out the files from my rom, decompile them, and try to compare the differences off the stock files. if you need some help decompiling or editing let me know and I'll do what I can to help..


Just a note.. I pulled your framework-res.apk, framework.jar, and android.policy.jar from vortex2.9 and was able to paste directly(changing permissions accordingly) using Root Explorer into Shuji2.5(thx Mobile_Sensei), reboot recovery/wipe cache/dalvik and POOF instant reboot options.. I also get the added joy of the vortex icons neatly overlayed.

Thanks first for your rom and secondly for all the help and insight you provide to the android community!


----------

