• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Mod][Guide]I9500 4.4.2 4way Reboot

Search This thread

bombaybadboy

Senior Member
Apr 22, 2012
7,782
16,693
Wolverhampton
4Way Reboot Guide I9500 4.4.2



Hey guys im back because there are to many ready made mods and not enough upto date how to guides for 4.4.2 I9500. First of all this is not my work its from @majdinj guides from his amazing thread Here All i have done it make the necessary edits to make his guide work on our 4.4.2 i9500 devices. So if you want to thank someone for this guide then go to majdinj's thread and thank him.


First of all i have not come here to teach you how to decompile .apks and .jar, if your reading this guide then i would hope you already have this knowledge and please dont let the first post say "can you make a flashable zip" as im trying to get you guys to dive in and have a go as its not very hard to build mod

As i have said all credit goes to @majdinj


For this mod we will be dealing with android.policy.jar so go get if from your /system/framework/ and decompile it

android.policy.jar

Open classout folder and go to \com\android\internal\policy\impl\ and place these files from this edited resource zip

Now Find and Open GlobalActions.smali and look for

Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$8;

    const v1, 0x10809bb

    const v2, 0x10401d6

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

And replace what is in Red

Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];

    const v1, 0x10809bb

    const v2, 0x10401d6

    invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="red"]99[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

    iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

Save that and move onto GlobalActions$SinglePressAction.smali

Add Code in Red

Code:
[COLOR="Red"]# static fields
.field protected static rebootMode:I

.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]


# instance fields

Now still in GlobalActions$SinglePressAction.smali look for the code "# direct methods" and add code in Red

Code:
# direct methods
[COLOR="Red"].method static constructor <clinit>()V
    .registers 3

    const/4 v0, 0x4

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    const-string v2, "Reboot"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    const-string v2, "Hot Reboot"

    aput-object v2, v0, v1

    const/4 v1, 0x2

    const-string v2, "Download"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "Recovery"

    aput-object v2, v0, v1

    sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;

    return-void
.end method[/COLOR]

.method protected constructor <init>(II)V

If you want to replace header Reboot Method Then open GlobalActions$99.smali and search for
Code:
const-string v2, "Reboot Method"
And replace for Header you want

Recompile and your done

As i said this is majdinj guide and he deserves full credit and thanks
 
Last edited:

tollboy

Senior Member
Dec 9, 2012
346
63
Thats good guide..but is there anything wrong if we achieve the same thing via..xposed?
 

bombaybadboy

Senior Member
Apr 22, 2012
7,782
16,693
Wolverhampton
Thats good guide..but is there anything wrong if we achieve the same thing via..xposed?

Its the difference between forcing your newly updated apks on newest update to give you 4way reboot and adding code so it will naturally give you 4way reboot. Wanam has stopped updating xposed a while ago but if your happy with xposed and any wakelocks it may give then i wont try to change your opinion about xposed :)

Sent from my GT-I9500
 
  • Like
Reactions: davidwilson83

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    4Way Reboot Guide I9500 4.4.2



    Hey guys im back because there are to many ready made mods and not enough upto date how to guides for 4.4.2 I9500. First of all this is not my work its from @majdinj guides from his amazing thread Here All i have done it make the necessary edits to make his guide work on our 4.4.2 i9500 devices. So if you want to thank someone for this guide then go to majdinj's thread and thank him.


    First of all i have not come here to teach you how to decompile .apks and .jar, if your reading this guide then i would hope you already have this knowledge and please dont let the first post say "can you make a flashable zip" as im trying to get you guys to dive in and have a go as its not very hard to build mod

    As i have said all credit goes to @majdinj


    For this mod we will be dealing with android.policy.jar so go get if from your /system/framework/ and decompile it

    android.policy.jar

    Open classout folder and go to \com\android\internal\policy\impl\ and place these files from this edited resource zip

    Now Find and Open GlobalActions.smali and look for

    Code:
    new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$8;
    
        const v1, 0x10809bb
    
        const v2, 0x10401d6
    
        invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

    And replace what is in Red

    Code:
    new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];
    
        const v1, 0x10809bb
    
        const v2, 0x10401d6
    
        invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="red"]99[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
    
        iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

    Save that and move onto GlobalActions$SinglePressAction.smali

    Add Code in Red

    Code:
    [COLOR="Red"]# static fields
    .field protected static rebootMode:I
    
    .field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
    
    
    # instance fields

    Now still in GlobalActions$SinglePressAction.smali look for the code "# direct methods" and add code in Red

    Code:
    # direct methods
    [COLOR="Red"].method static constructor <clinit>()V
        .registers 3
    
        const/4 v0, 0x4
    
        new-array v0, v0, [Ljava/lang/String;
    
        const/4 v1, 0x0
    
        const-string v2, "Reboot"
    
        aput-object v2, v0, v1
    
        const/4 v1, 0x1
    
        const-string v2, "Hot Reboot"
    
        aput-object v2, v0, v1
    
        const/4 v1, 0x2
    
        const-string v2, "Download"
    
        aput-object v2, v0, v1
    
        const/4 v1, 0x3
    
        const-string v2, "Recovery"
    
        aput-object v2, v0, v1
    
        sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
    
        return-void
    .end method[/COLOR]
    
    .method protected constructor <init>(II)V

    If you want to replace header Reboot Method Then open GlobalActions$99.smali and search for
    Code:
    const-string v2, "Reboot Method"
    And replace for Header you want

    Recompile and your done

    As i said this is majdinj guide and he deserves full credit and thanks
    2
    Thanks Buddy

    I'll try it later today :)

    I tried many time before and it didn't work :D

    Sent from my GT-I9500

    thanks m8, i put this together because the S4 can use all the help it can get when it comes to guides :)
    2
    Big thanks my friend! :good:
    Youre great!

    Regards
    2
    Big thanks my friend! :good:
    Youre great!

    Regards

    Any time m8 hope it helps :)

    Sent from my GT-I9500 using Tapatalk 2