[mod] extended power menu - need help!

Search This thread

fender90

Senior Member
Nov 23, 2011
336
182
Venice
Hey guy, I'm trying to port the extended power menu using this guide

http://xdaforums.com/showthread.php?t=1169443

I managed to make the first part work.

However with the second part (editing android.policy.jar) I get stuck on the first static Samsung logo after reboot.

Does anyone have a clue, or is anyone willing to help?

I attached my modified files. I'm using GingerICE 2.1 ROM.
 

Attachments

  • android.policy.jar
    179.1 KB · Views: 42
  • framework-res.apk
    5 MB · Views: 60
Last edited:

andynroid

Senior Member
Apr 27, 2010
1,786
443
Klang Valley
Xiaomi Mi 10T / 10T Pro
This is definitely what we need pressing the power button allows to reboot...reboot to recovery or power off like CM...

Poke me if I am wrong...just sharing..

Sent from my GT-I8150 using xda premium
 
Last edited:

bagux

Senior Member
Dec 29, 2011
114
255
Latiano
fender90 i have decompilied your android.policy.jar and in GlobalAction.smali it looks all good
...but in the folder you forgot to create the files GlobalAction$10.smali and $11 and $12 like it say in the howto, read this part:

Code:
c/ Come on, we're almost there ...

Now copy the "out/com/android/internal/policy/impl/GlobalActions$4.Smali" to "out/com/android/internal/policy/impl/GlobalActions$8.Smali".
We choose #4 because it is one that contains the shutdown of the phone. We will rename it 8 because it's 8 in the next free issue ...
Remember this if ever in a future version of the files they are change.

d/ Now open the new file "out/com/android/internal/policy/impl/GlobalActions$8.Smali" and replace in, all occurrences of "\GlobalActions$4" with "\GlobalActions$8"

Then, Replace :
Code:

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V

With :
Code:

    const/4 v1, 0x1
	
    const-string v2, "now"
	
    invoke-static {v0, v2, v1}, Lcom/android/internal/app/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V


e/ Save the file and copy it to "out/com/android/internal/policy/impl/GlobalActions$9.Smali"
Open it and replace in, all occurrences of "\GlobalActions$8" with "\GlobalActions$9
and
const-string v2, "now" with const-string v2, "recovery"

f/ Save the file and copy it to "out/com/android/internal/policy/impl/GlobalActions$10.Smali"
Open it and replace in, all occurrences of "\GlobalActions$9" with "\GlobalActions$10
and
const-string v2, "recovery" with const-string v2, "download"

Save the file and then ... compile it all!

I think this is the problem,maybe :)
 
Last edited:

fender90

Senior Member
Nov 23, 2011
336
182
Venice
Update: i mixed those guides because neither of them matches the Wonder files, and this time, and I got some progress: the phone boots!

However, when pressing the power button, I get a force close and it reloads the launcher.

I'm attaching the modified files, so you guys can help me spot the mistake :p
 

Attachments

  • android.policy.jar
    179.2 KB · Views: 10
  • framework.jar
    3.7 MB · Views: 17
  • framework-res.apk
    5 MB · Views: 18
  • Like
Reactions: bagux

bagux

Senior Member
Dec 29, 2011
114
255
Latiano
Update: i mixed those guides because neither of them matches the Wonder files, and this time, and I got some progress: the phone boots!

However, when pressing the power button, I get a force close and it reloads the launcher.

I'm attaching the modified files, so you guys can help me spot the mistake :p

Probably this afternoon i'll give it a look, i like this mod :D
 

pemati

Senior Member
Feb 9, 2010
255
68
Have you boys tried last Black note hybrid? I think is that what you looking for :D

Sent from my GT-I8150 using XDA
 
  • Like
Reactions: bagux

bagux

Senior Member
Dec 29, 2011
114
255
Latiano
Have you boys tried last Black note hybrid? I think is that what you looking for :D

Sent from my GT-I8150 using XDA

I don't know it has this mod, i still use stock rom :D

However...fender90, u have done a very little error in GlobalActions.smali, if u see ur file in line 647 and then in line 659 u surely understand :p there are two 0x3 :D
Instead in GlobalAction$10.smali, and also 11 and 12, u have to delete line 54 cause u use sput command in line 52 that do what we want.
I attach the files modified by me, rename in .smali and try them :)
 

Attachments

  • GlobalActions.txt
    36.4 KB · Views: 27
  • GlobalActions$10.txt
    1.9 KB · Views: 15
  • GlobalActions$11.txt
    1.9 KB · Views: 11
  • GlobalActions$12.txt
    1.9 KB · Views: 11

vanir29

Senior Member
Dec 14, 2011
76
11
Have you boys tried last Black note hybrid? I think is that what you looking for :D

Sent from my GT-I8150 using XDA

i think what u r saying is the extended "NOTIFICATION" menu, but fender90 is working on the extended "POWER" menu, its the menu when u press the power button long enough, a window will pop up with options like shutdown, airplane mode, etc
 

pemati

Senior Member
Feb 9, 2010
255
68
Yes you right but in that panel under reboot option are options for recovery or download mode. Hope is that what is fender looking for ;)

Sent from my GT-I8150 using XDA
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Hey guy, I'm trying to port the extended power menu using this guide

    http://xdaforums.com/showthread.php?t=1169443

    I managed to make the first part work.

    However with the second part (editing android.policy.jar) I get stuck on the first static Samsung logo after reboot.

    Does anyone have a clue, or is anyone willing to help?

    I attached my modified files. I'm using GingerICE 2.1 ROM.
    2
    fender90 i have decompilied your android.policy.jar and in GlobalAction.smali it looks all good
    ...but in the folder you forgot to create the files GlobalAction$10.smali and $11 and $12 like it say in the howto, read this part:

    Code:
    c/ Come on, we're almost there ...
    
    Now copy the "out/com/android/internal/policy/impl/GlobalActions$4.Smali" to "out/com/android/internal/policy/impl/GlobalActions$8.Smali".
    We choose #4 because it is one that contains the shutdown of the phone. We will rename it 8 because it's 8 in the next free issue ...
    Remember this if ever in a future version of the files they are change.
    
    d/ Now open the new file "out/com/android/internal/policy/impl/GlobalActions$8.Smali" and replace in, all occurrences of "\GlobalActions$4" with "\GlobalActions$8"
    
    Then, Replace :
    Code:
    
        const/4 v1, 0x1
    
        invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V
    
    With :
    Code:
    
        const/4 v1, 0x1
    	
        const-string v2, "now"
    	
        invoke-static {v0, v2, v1}, Lcom/android/internal/app/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
    
    
    e/ Save the file and copy it to "out/com/android/internal/policy/impl/GlobalActions$9.Smali"
    Open it and replace in, all occurrences of "\GlobalActions$8" with "\GlobalActions$9
    and
    const-string v2, "now" with const-string v2, "recovery"
    
    f/ Save the file and copy it to "out/com/android/internal/policy/impl/GlobalActions$10.Smali"
    Open it and replace in, all occurrences of "\GlobalActions$9" with "\GlobalActions$10
    and
    const-string v2, "recovery" with const-string v2, "download"
    
    Save the file and then ... compile it all!

    I think this is the problem,maybe :)
    2
    Amazing, I'll try when I get back home!

    Inviato dal mio GT-I8150 usando Tapatalk

    Use this guide http://xdaforums.com/showthread.php?t=811532 This is what I used on the exhibit and that guide does not edit the framework.jar and when you do the edit make sure your placing it where it says look at the code above and below ;)
    1
    Update: i mixed those guides because neither of them matches the Wonder files, and this time, and I got some progress: the phone boots!

    However, when pressing the power button, I get a force close and it reloads the launcher.

    I'm attaching the modified files, so you guys can help me spot the mistake :p
    1
    Have you boys tried last Black note hybrid? I think is that what you looking for :D

    Sent from my GT-I8150 using XDA