FORUMS
Remove All Ads from XDA

[MOD][How-To] Extended power Menu & Ripple [email protected] 240DPI

1,006 posts
Thanks Meter: 2,550
 
By gs2usr, Senior Member on 23rd December 2012, 01:51 PM
Post Reply Email Thread
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:

Code:
.line 389
    new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$5;
And change it to say this:


Code:
.line 389
    new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;
now find this:
Code:
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:

Code:
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:
Code:
    
.end annotation # instance fields .field private final mIconResId:I .field private final mMessage:Ljava/lang/CharSequence; .field private final mMessageResId:I
And between .end annotation and # instance fields, add the following code so that it looks like this:


Code:
.end annotation    
     
# static fields .field protected static rebootMode:I .field protected static final rebootOptions:[Ljava/lang/String; # instance fields
now in this same file find this:

Code:
# 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:
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:
Code:
.method protected constructor (II)V
     .registers 4
     .parameter "iconResId"
     .parameter "messageResId"
Change to this:

Code:
 

.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:

Click image for larger version

Name:	Screenshot_2012-12-23-02-59-47.jpg
Views:	2022
Size:	24.5 KB
ID:	1585992Click image for larger version

Name:	Screenshot_2012-12-23-03-12-02.jpg
Views:	2106
Size:	26.6 KB
ID:	1585993


DOWNLOADS


GlobalActionsFiles.zip


Already modded Android.policy.jar flashable zipDeodexedOnly)

4WayReboot-M0D.zip


Please see post #2 for Ripple Effect
The Following 19 Users Say Thank You to gs2usr For This Useful Post: [ View ] Gift gs2usr Ad-Free
23rd December 2012, 01:52 PM |#2  
gs2usr's Avatar
OP Senior Member
Flag Tri-Cities, WA
Thanks Meter: 2,550
 
Donate to Me
More
NOW for Ripple Effect to work @240dpi

the process is much simpler.

--We will be decompiling the framework-res.apk

--now decompile framework-res.apk

--and go to directory /res/values-hdpi

--open the file bools.xml and change this:

Code:
<resources>
    <bool name="config_isWaterRippleEnabled">false</bool>
</resources>
to this:

Code:
<resources>
    <bool name="config_isWaterRippleEnabled">true</bool>
</resources>
-recompile and thats it!


DOWNLOADS:


RippleEffectMod.zip
The Following 13 Users Say Thank You to gs2usr For This Useful Post: [ View ] Gift gs2usr Ad-Free
23rd December 2012, 02:03 PM |#3  
tkjeeper's Avatar
Senior Member
Thanks Meter: 1,512
 
More
First! Thanks!

Sent from my SAMSUNG-SGH-I727 using xda app-developers app
23rd December 2012, 02:06 PM |#4  
Project: Awesome's Avatar
Senior Member
Flag New York city
Thanks Meter: 2,465
 
Donate to Me
More
Damn you're just on fire! Thanks for all the help.
23rd December 2012, 02:15 PM |#5  
gs2usr's Avatar
OP Senior Member
Flag Tri-Cities, WA
Thanks Meter: 2,550
 
Donate to Me
More
Quote:
Originally Posted by Tmogalaxys2

Damn you're just on fire! Thanks for all the help.

Thought ill do like you guys and have an all nighter in development. Lol. Im also working on the guide for the 15 toggles, actually now the 23 toggles mod.

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
The Following 4 Users Say Thank You to gs2usr For This Useful Post: [ View ] Gift gs2usr Ad-Free
23rd December 2012, 02:17 PM |#6  
softballjunkee13's Avatar
Senior Member
Thanks Meter: 1,422
 
More
Wow. Wish I knew how to do and had the time to do that. Any chance anyone can just make a 100% flashable with no compiling necessary?

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
23rd December 2012, 02:18 PM |#7  
gs2usr's Avatar
OP Senior Member
Flag Tri-Cities, WA
Thanks Meter: 2,550
 
Donate to Me
More
Quote:
Originally Posted by softballjunkee13

Wow. Wish I knew how to do and had the time to do that. Any chance anyone can just make a 100% flashable with no compiling necessary?

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2

They're both included

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
23rd December 2012, 02:21 PM |#8  
Senior Member
Thanks Meter: 112
 
More
It's fantastic, thanks man.
23rd December 2012, 02:32 PM |#9  
softballjunkee13's Avatar
Senior Member
Thanks Meter: 1,422
 
More
Quote:
Originally Posted by gs2usr

They're both included

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2

Ya. I saw that. I got the impression that u flashed that after we recompiled. At least thats how it seemed to me in the op. Thanks alot then!

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2

---------- Post added at 09:32 AM ---------- Previous post was at 09:23 AM ----------

Worked great gs2! Thanks again

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
The Following User Says Thank You to softballjunkee13 For This Useful Post: [ View ] Gift softballjunkee13 Ad-Free
23rd December 2012, 02:41 PM |#10  
gs2usr's Avatar
OP Senior Member
Flag Tri-Cities, WA
Thanks Meter: 2,550
 
Donate to Me
More
Not a problem, glad to help out and share.

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
23rd December 2012, 02:45 PM |#11  
Project: Awesome's Avatar
Senior Member
Flag New York city
Thanks Meter: 2,465
 
Donate to Me
More
Quote:
Originally Posted by gs2usr

Thought ill do like you guys and have an all nighter in development. Lol. Im also working on the guide for the 15 toggles, actually now the 23 toggles mod.

Sent from my SAMSUNG-SGH-I727 using Tapatalk 2

23 toggles? Give me a break! I just finished 15 toggles. Jk 23 toggles would be awesome. Once again, thanks
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes