[AT&T Samsung Galaxy S II Skyrocket SGH-I727] gs2usr:
Extended Power Menu for UCLK4 & Ripple Effect @ 240dpi

This is a guide to add the power menu to the JB leak,

i give all credits for this mod to Cristiano Matos and his guide found HERE

i simply modified a few lines to make it work on our device.

->How-To_Extended Power Menu<--

--You'll need some sort of experience with using development tools such

as APKTool and Smali & Backsmali.

--We will be decompiling android.police.jar

--which is found in /system/framework

--now decompile android.police.jar and go into directory:

--	com/android/internal/policy/impl/

--and open GlobalActions.smali with a text editor

--now find:

.line 389
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$5;

And change it to say this:

.line 389
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;

now find this:

invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$5;->(Lcom/android/internal/policy/impl/GlobalActions;II)V

And change it to say this:

invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;->(Lcom/android/internal/policy/impl/GlobalActions;II)V

Save & close it

Now open this file:

com/android/internal/policy/impl/GlobalActions$SinglePressAction.smali

Find this lines:

[LEFT].end annotation

# instance fields

.field private final mIconResId:I

.field private final mMessage:Ljava/lang/CharSequence;

.field private final mMessageResId:I

[/LEFT]

And between

.end annotation

and

# instance fields

, add the following code so that it looks like this:

.end annotation
[LEFT]
# static fields
.field protected static rebootMode:I

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

# instance fields[/LEFT]

now in this same file find this:

# direct methods
.method protected constructor (II)V
.registers 4
.parameter "iconResId"
.parameter "messageResId"

And between

# direct methods

and

.method protected constructor (II)V

, add this

Code:

.method static constructor ()V
.locals 3

const/4 v0, 0x4

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

const/4 v1, 0x0

const-string v2, "Restart"

aput-object v2, v0, v1

const/4 v1, 0x1

const-string v2, "Hot Boot"

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

.method protected constructor (II)V

Now @ bottom of the previous code where it says:

.method protected constructor (II)V
.registers 4
.parameter "iconResId"
.parameter "messageResId"

Change to this:

.method protected constructor (II)V
.locals 1
.parameter "iconResId"
.parameter "messageResId"

Now in Cristiano's guide it says we r done &

To finalize Extended Power Menu you need to copy 3 smali files (GlobalActions$99$1.smali, GlobalActions$99$2, and GlobalActions$99.smali) and paste then inside this directory -> com/android/internal/policy/impl/

(Links for files will be at the bottom of this post)

--but once compiled, and pushed to system it gave me and error and logcat pointed to wrong permission in file

GlobalActions$99$1.smali

so i edited the file and included it with the rest of the files.

(note: if you would like to see what i changed in this file you can download my files and the ones provided in the link of Cristiano's guide and compare them)

Now Recompile android.policy.jar using apktool and smali commands, push to your /system/framework & reboot & YOUR DONE!

It should look like this:

View attachment 1585992View attachment 1585993

DOWNLOADS

GlobalActionsFiles.zip

Already modded Android.policy.jar flashable zip:(DeodexedOnly)

4WayReboot-M0D.zip

Please see post #2 for Ripple Effect