[Android Software/Hacking General [Developers Only]] GuneetAtwal:
Hello guys im here to share my knowledge since alot off member ask for this mod i mean how to added this option to ur rom :)

First of all i would like to thanks Jimmy Lam for his framework and android.policy.jar from which i learnt by comparing ;)

Requirements

Ok i have divided this Guide in Two Parts to make it easy

In First Part we will edit framework and in second part we will edit android policy.jar

Part-1

Decompile Your framework-res.apk and move to

framework-res\res\values

Open Strings.xml with notepad++ or any other tool you use

paste the following lines in the end

<string name="global_action_reboot_now">Restart</string>
<string name="global_action_reboot_recovery">Recovery</string>

Close it and recompile.

Then again decompile and move to

framework-res\res\values

and note the following ids (you may have different)

Here we end our First Part.

Part-2

Decompile your android.policy.jar using backsmali managaer or any other tool

vDownload and extract the attached file to

android.policy\com\android\internal\policy\impl

Then open GlobalActions.smali

And do how i say

Before

.line 165
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;

new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;

const v2, 0x104013c

invoke-direct {v1, p0, v12, v2}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

.line 185
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;

iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;

invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

After

Just Add the Bold ( For A7/A5 Users just copy paste :D )

.line 165
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;

new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;

const v2, 0x104013a

invoke-direct {v1, p0, v12, v2}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

[B].line 183
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;

new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$8;

const v2, [COLOR="Red"]0x104054d[/COLOR]

invoke-direct {v1, p0, v12, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

.line 184
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;

new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$9;

const v2, [COLOR="Red"]0x104054e[/COLOR]

invoke-direct {v1, p0, v12, v2}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/B]

.line 185
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;

iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;

invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

Note: Note Ids must be same as you noted in part 1

[COLOR="Red"]Only Replace last 7 digits of IDS when renaming in the above step [/COLOR]

Recompile and replace the classes.dex using Z-zip

Yipeee :cool:You Now have 3 Way boot:victory::D

This Guide is tested by me and is working Fine

I have uploaded the Modded files for A5/A7/A7+ users so they can download and enjoy :D

Device Tested for this MOD

Screenshot

Hit thanks to show your appreciation, it encourages me