[TUTORIAL] how to add reboot , recovery and bootloader options in Power menu

Search This thread

devilmaycry2020

Senior Member
Apr 27, 2013
1,399
248
Same here bro :confused:

Sent from my LT25i using xda app-developers app

Me too, OP please fix that error.

---------- Post added at 04:19 PM ---------- Previous post was at 04:15 PM ----------

i got a small bug... anyone having it too???

when ever i click on reboot; be it recovery or reboot, my phone will show bootanimation first den turn off & later reboot.... any help on dis?

Me too, how to fix that, i've used your mod on 4.1.2 before and it didnt have this problem, but when i apply for 4.3 it wont work. please help.
 

AMDFenics

Senior Member
Oct 18, 2012
615
309
Question

Hey together,

i'm on stock rom with my d5503. And i miss the reboot option but also the volume menü.
Is it possible to edit the needed files like deodexed files and then, after finish editing, to odex those files??? :rolleyes:

I found this http://xdaforums.com/showthread.php?t=2390162 but he wrote, that this won't work with KK...
:confused:

Thanks in advance
 

darknessmc

Senior Member
Jul 30, 2013
691
132
Sony Xperia Z2
Redmi Note 9 Pro
I got error when recompiling android.policy.jar
..\3-Out\android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions$11$1.smali[27,4] Error for input '.parameter': Invalid directive
..\3-Out\android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions$11$1.smali[51,15] no viable alternative at input 'file'
..\3-Out\android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions$11$1.smali[51,20] no viable alternative at input 'Ljava/io/File;'
..\3-Out\android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions$11$1.smali[74,15] no viable alternative at input 'e'
..\3-Out\android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions$11$1.smali[74,17] no viable alternative at input 'Ljava/io/IOException;'
..\3-Out\android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions$11$1.smali[84,4] Error for input '.parameter': Invalid directive
..\3-Out\android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions$11$1.smali[85,4] Error for input '.parameter': Invalid directive
..\3-Out\android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions$11$1.smali[84,15] mismatched input '"dialog"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/android/internal/policy/impl/GlobalActions$11$1.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:358)
at brut.androlib.Androlib.buildSources(Androlib.java:298)
at brut.androlib.Androlib.build(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
@sandy7 I used apktool v2.0.0-RC2, is it problem?
Edit: working in old apktool
 
Last edited:

iwilltouchthesky

Senior Member
Nov 10, 2010
50
2
Can you please update GlobalActions$11$1 to work with lollipop? I Get the same errors as a previous poster and what fixed it for him was using an older apktool but I can not do that as I am using lollipop. All the changes seem to be fine but GlobalActions$11$1 stops android.policy.jar from compiling :(

Thank you all for your help in advance.

Code:
C:\Users\Erik>apktool b C:\Android_Policy_working\android.policy.jar.out
I: Using Apktool 2.0.0-RC4
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$11$1.smali[27,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$11$1.smali[51,15] no viable alternative at input 'file'

..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$11$1.smali[51,20] no viable alternative at input 'Ljava
/io/File;'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$11$1.smali[74,15] no viable alternative at input 'e'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$11$1.smali[74,17] no viable alternative at input 'Ljava
/io/IOException;'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$11$1.smali[84,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$11$1.smali[85,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$11$1.smali[84,15] mismatched input '"dialog"' expecting
 END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: com/android/internal/policy/impl/GlobalActions$11$1.smali
        at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
        at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:354)
        at brut.androlib.Androlib.buildSources(Androlib.java:294)
        at brut.androlib.Androlib.build(Androlib.java:280)
        at brut.androlib.Androlib.build(Androlib.java:255)
        at brut.apktool.Main.cmdBuild(Main.java:225)
        at brut.apktool.Main.main(Main.java:84)

C:\Users\Erik>
 
Last edited:

iwilltouchthesky

Senior Member
Nov 10, 2010
50
2
Also which apktool are you guys using who successfully recompiled?

I'm trying to do this for a lollipop ROM and I get the error I posted in my above post with the latest apktools 2.0+.

Other than that the guide is awesome I will be donating thank you very much. Have no problem donating to people who help as !much as yourself :)
 

darknessmc

Senior Member
Jul 30, 2013
691
132
Sony Xperia Z2
Redmi Note 9 Pro
Also which apktool are you guys using who successfully recompiled?

I'm trying to do this for a lollipop ROM and I get the error I posted in my above post with the latest apktools 2.0+.

Other than that the guide is awesome I will be donating thank you very much. Have no problem donating to people who help as !much as yourself :)

Try to extract .dex file from androidpolicy.jar and use baksmali.jar for decompile and smali.jar to recompile the .dex file
 
  • Like
Reactions: iwilltouchthesky

iwilltouchthesky

Senior Member
Nov 10, 2010
50
2
Try to extract .dex file from androidpolicy.jar and use baksmali.jar for decompile and smali.jar to recompile the .dex file

This is great advice might be the best work around.

The problem isn't decompiling it is recompiling the policy.jar because framework-res recompiled without issue.

Can you direct me to the latest or best baksmali and smali for lollipop or w.e is best?

Thanks darkness

+thanks
 

darknessmc

Senior Member
Jul 30, 2013
691
132
Sony Xperia Z2
Redmi Note 9 Pro
This is great advice might be the best work around.

The problem isn't decompiling it is recompiling the policy.jar because framework-res recompiled without issue.

Can you direct me to the latest or best baksmali and smali for lollipop or w.e is best?

Thanks darkness

+thanks

I know it is recompiling the file. this link for v2.0.3 https://code.google.com/p/smali/downloads/list
if it doesn't work, try old version 1.3.3
Edit 1 :
I think you must rename the three files "GlobalActions$11" to 12 and inside of the three files (replace "GlobalActions$11" with "GlobalActions$12" in notepad++) cause there is already file with name GlobalActions$11.smali
Edit 2 :
take framework-res.apk and android.policy.jar from uCyan and make a compare
 
Last edited:
  • Like
Reactions: iwilltouchthesky

iwilltouchthesky

Senior Member
Nov 10, 2010
50
2
I know it is recompiling the file. this link for v2.0.3 https://code.google.com/p/smali/downloads/list
if it doesn't work, try old version 1.3.3
Edit 1 :
I think you must rename the three files "GlobalActions$11" to 12 and inside of the three files (replace "GlobalActions$11" with "GlobalActions$12" in notepad++) cause there is already file with name GlobalActions$11.smali
Edit 2 :
take framework-res.apk and android.policy.jar from uCyan and make a compare

okay this is another fix as well. I was replacing the GlobalActions$11 files with the ones in there already, that can't be good. I'll try making those tweaks then recompiling with apktool and if that doesn't work then I'll use smali and baksmali by itself. Thank you thank you. Do you have a donation link? Feel free to PM me it ;)

Also if I already have a GlobalActions$12 and $13, should I name it GlobalActions$14? Would that be acceptable?
 
Last edited:

sandy7

Inactive Recognized Developer
May 28, 2012
6,214
6,843
34
bangalore
okay this is another fix as well. I was replacing the GlobalActions$11 files with the ones in there already, that can't be good. I'll try making those tweaks then recompiling with apktool and if that doesn't work then I'll use smali and baksmali by itself. Thank you thank you. Do you have a donation link? Feel free to PM me it ;)

Also if I already have a GlobalActions$12 and $13, should I name it GlobalActions$14? Would that be acceptable?
if u already have GlobalActions$12 and $13 present , u should rename the GlobalActions$11 as GlobalActions$14 , yes it would be acceptable
 

iwilltouchthesky

Senior Member
Nov 10, 2010
50
2
if u already have GlobalActions$12 and $13 present , u should rename the GlobalActions$11 as GlobalActions$14 , yes it would be acceptable

Okay awesome thank you Sandy and thanks for this awesome guide I will be buying you a beer or 3 ;)

Bad news though, it's still throwing this error out even after renaming it correctly.

Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Erik>apktool b -f C:\Android_Policy_working\android.policy.jar.out
I: Using Apktool 2.0.0-RC4
I: Smaling smali folder into classes.dex...
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[27,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[51,15] no viable alternative at input 'file'

..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[51,20] no viable alternative at input 'Ljava
/io/File;'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[74,15] no viable alternative at input 'e'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[74,17] no viable alternative at input 'Ljava
/io/IOException;'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[84,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[85,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[84,15] mismatched input '"dialog"' expecting
 END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: com/android/internal/policy/impl/GlobalActions$14$1.smali
        at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
        at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:354)
        at brut.androlib.Androlib.buildSources(Androlib.java:294)
        at brut.androlib.Androlib.build(Androlib.java:280)
        at brut.androlib.Androlib.build(Androlib.java:255)
        at brut.apktool.Main.cmdBuild(Main.java:225)
        at brut.apktool.Main.main(Main.java:84)

What the heck is causing this?? I have tried multiple apktool versions pre 2.0 AND post 2.0
 

sandy7

Inactive Recognized Developer
May 28, 2012
6,214
6,843
34
bangalore
Okay awesome thank you Sandy and thanks for this awesome guide I will be buying you a beer or 3 ;)

Bad news though, it's still throwing this error out even after renaming it correctly.

Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Erik>apktool b -f C:\Android_Policy_working\android.policy.jar.out
I: Using Apktool 2.0.0-RC4
I: Smaling smali folder into classes.dex...
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[27,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[51,15] no viable alternative at input 'file'

..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[51,20] no viable alternative at input 'Ljava
/io/File;'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[74,15] no viable alternative at input 'e'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[74,17] no viable alternative at input 'Ljava
/io/IOException;'
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[84,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[85,4] Error for input '.parameter': Invalid
directive
..\..\Android_Policy_working\android.policy.jar.out\smali\com\android\internal\p
olicy\impl\GlobalActions$14$1.smali[84,15] mismatched input '"dialog"' expecting
 END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: com/android/internal/policy/impl/GlobalActions$14$1.smali
        at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
        at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:354)
        at brut.androlib.Androlib.buildSources(Androlib.java:294)
        at brut.androlib.Androlib.build(Androlib.java:280)
        at brut.androlib.Androlib.build(Androlib.java:255)
        at brut.apktool.Main.cmdBuild(Main.java:225)
        at brut.apktool.Main.main(Main.java:84)

What the heck is causing this?? I have tried multiple apktool versions pre 2.0 AND post 2.0
give me few info, like which fw are u moding this on and what phone are u using
 

iwilltouchthesky

Senior Member
Nov 10, 2010
50
2
give me few info, like which fw are u moding this on and what phone are u using

Okay so I am modding the Nvidia Shield ROM. Everything in your guide was perfect didn't hit any snags anywhere except trying to get this android.policy.jar recompiled.

ROM: Nvidia Shield Stock Lollipop ROM
FW: Lollipop 5.0.1
Device: Nvidia Shield Tablet US LTE
apktool: latest 2.0 RC4 (tried many versions to no avail)

Thank you so much.
 

sandy7

Inactive Recognized Developer
May 28, 2012
6,214
6,843
34
bangalore
Okay so I am modding the Nvidia Shield ROM. Everything in your guide was perfect didn't hit any snags anywhere except trying to get this android.policy.jar recompiled.

ROM: Nvidia Shield Stock Lollipop ROM
FW: Lollipop 5.0.1
Device: Nvidia Shield Tablet US LTE
apktool: latest 2.0 RC4 (tried many versions to no avail)

Thank you so much.
well can u upload the android.policy.jar so ill have shot moding it
 

sandy7

Inactive Recognized Developer
May 28, 2012
6,214
6,843
34
bangalore
Okay so I am modding the Nvidia Shield ROM. Everything in your guide was perfect didn't hit any snags anywhere except trying to get this android.policy.jar recompiled.

ROM: Nvidia Shield Stock Lollipop ROM
FW: Lollipop 5.0.1
Device: Nvidia Shield Tablet US LTE
apktool: latest 2.0 RC4 (tried many versions to no avail)

Thank you so much.
or thry this method..


USE THE RESOURCES ATTACHED BELOW (IF U HAVE ANY PROBLEMS DE/RECOMPILING ANDROID.POLICY.JAR USE THE smali.jar and backsmali.jar attached in the below resources)

framework-res.apk
-----------------

1 - Add to strings.xml:
Code:
	<string name="reboot">@string/factorytest_reboot</string>
    <string name="reboot_normal">@string/factorytest_reboot</string>
	<string name="reboot_recovery">Recovery</string>
    <string name="reboot_bootloader">Bootloader</string>



2 - Add to arrays.xml:

Code:
	<string-array name="reboot_options">
        <item>@string/reboot_normal</item>
        <item>@string/reboot_recovery</item>
        <item>@string/reboot_bootloader</item>
    </string-array>
    <string-array name="reboot_actions">
        <item>now</item>
        <item>recovery</item>
        <item>bootloader</item>
    </string-array>


3 - Add under \res\drawable-xxhdpi\ folder:

ic_lock_reboot.png


4 - Compile framework-res.apk



android.policy.jar
------------------

1 - Edit:

\com\android\internal\policy\impl\GlobalActions.smali

...LOOK FOR...

Code:
	.line 252
    .local v9, "quickbootEnabled":Z
    :goto_3d
    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, 0x1080030

    const v3, 0x10400cb

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

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
	
[COLOR="Red"]
    .line 282
    iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;

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

    const v2, 0x108094c           ----- HEX ID OF ic_lock_reboot.png ( make sure to change the hex id comparing ur Public xml  )
    const v3, 0x10407e8          ----- HEX ID OF reboot STRING ( make sure to change the hex id comparing ur Public xml  )

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

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

    .line 283
    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
2 - Add these three new files:

GlobalActions$12$1.smali
GlobalActions$12$2.smali
GlobalActions$12.smali


3 - Done !!
 

Attachments

  • KK_-_Add_Reboot__to_Power_Menu_Resources.rar
    4.7 KB · Views: 24

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    So lets Start

    Required
    1-apktool
    2-notepad++
    3-some brains


    Before u decompile anything see this Guide by @erorcun for how to compile a JB framework without bootloop..
    http://xdaforums.com/showthread.php?t=2321207



    STEP-1

    Decompile Framework-res.apk

    goto to res/vlaues/arrays.xml

    and add these lines at the end

    Code:
        <string-array name="reboot_options">
            <item>@string/reboot_normal</item>
            <item>@string/reboot_recovery</item>
            <item>@string/reboot_bootloader</item>
        </string-array>
        <string-array name="reboot_actions">
            <item>now</item>
            <item>recovery</item>
            <item>bootloader</item>
        </string-array>


    now goto res/values/strings
    and add these lines at the end


    Code:
        <string name="reboot">Reboot</string>
        <string name="reboot_normal">Reboot</string>
        <string name="reboot_recovery">Recovery</string>
        <string name="reboot_bootloader">Bootloader</string>


    goto add the ic_lock_reboot.png which i have i provided in the resources attached below this post to drawablw-hdpi folder

    so before compiling the framework-res.apk follow erorcun's guide to properly recompile framework-res.apk

    once recompile is done ....decompile again to get the HEX ID's

    STEP-2

    decompile android.policy.jar

    goto classout\com\android\internal\policy\impl

    and add the 3 smali's files which i provided in the resources attached below

    Now option classout\com\android\internal\policy\impl\GlobalActions.smali

    and find these lines and add the red marked lines between them

    Code:
        .line 235
        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, 0x1080030
    
        const v3, 0x10400fa
    
        invoke-direct {v1, p0, v2, v3}, 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
    
    [COLOR="Red"]    .line 213
        move-object/from16 v0, p0
    
        iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
    
        new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$11;
    
        const v3, 0x1080827
    
        const v4, 0x104060b
    
        move-object/from16 v0, p0
    
        invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
    
        invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/COLOR]
    
        .line 260
        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


    now we need to assign the Hex id's as per ur Public.xml

    NOTE: the hex id's might be different from mine and yours so be careful while comparing

    new as per the above changes in GlobalActions.xml

    assign the id's as below

    <public type="drawable" name="ic_lock_reboot" id="0x01080827" />

    Code:
     new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$11;
    
        const v3, 0x[COLOR="red"]1080827[/COLOR]


    <public type="string" name="reboot" id="0x0104060b" />

    Code:
    new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$11;
    
        const v3, 0x1080827
    
        const v4, 0x[COLOR="red"]104060b[/COLOR]



    Now option up classout\com\android\internal\policy\impl\GlobalActions$11.smali

    find and replace the following

    @line 70
    <public type="string" name="reboot" id="0x0104060b" />


    Code:
    const v3, 0x[COLOR="red"]104060b[/COLOR]


    @line 90
    <public type="array" name="reboot_options" id="0x0107003b" />


    Code:
    const v3, 0x[COLOR="red"]107003b[/COLOR]


    @line 105
    <public type="string" name="ok" id="0x0104000a" />



    Code:
      const v2, 0x[COLOR="red"]104000a[/COLOR]


    @line 147
    <public type="bool" name="config_sf_slowBlur" id="0x0111000b" />


    Code:
    const v3, 0x[COLOR="red"]111000b[/COLOR]


    now open up classout\com\android\internal\policy\impl\GlobalActions$11$2.smali

    @line 59
    <public type="array" name="reboot_actions" id="0x0107003c" />


    Code:
    const v2, 0x[COLOR="red"]107003c[/COLOR]


    save it and recompile android.policy.jar


    now push all the files into ut phone...will have the new Advanced reboot options
    3
    Haha...quick post...btw thanks
    @mr.khan here you come :)

    Sent from my LT26i using XDA Premium 4 mobile app
    2
    sir can you make a flashable zip for us who do not know how to use the required tools? please? thanks. hehe :highfive:
    if u can upload the framework-res.apk and android.policy.jar i can mod it for u ...when i have free time
    2
    here's my android.policy.jar. i dont know why i cant upload the framework-res :( . it says " Your submission could not be processed because a security token was missing. If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error. "

    how to surpass this? :(
    thanks so much @sandy7

    put them in zip file and upload it other file server
    1
    Waw! Fantastic work!
    !