Related
Thanks to snq- for original 4-way reboot.
Got the idea from THIS thread.
This is just simple mod that adds 4 booting options behind power menus "power off" -button ( 1. reboot 2. hot boot 3. recovery 4. download ).
So, compared to advanced power menu, this has only one new button. But I made this because now there is no need for framework.jar/framework-res changes. This is much more friendly to update.
I only make this tutorial and attach needed files. Everyone can use it way they want to, but give credit to original maker.
Check THIS post for Samsung ICS roms
Check THIS post for Samsung JB roms
Problem? Check THESE for help.
What you need to do is:
-Decompile android.policy.jar of your rom
-Copy attached folder to yours
-Open GlobalActions.smali
-Search line "Lcom/android/internal/policy/impl/GlobalActions$4;" ( some roms might have different number on shutdown button. You find right one by for example tracing shutdown icon id )
-Change number 4 to 99 ( two of them )
Before
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$4;
const v3, 0x1080030
const v4, 0x1040150
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$4;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
After
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$99;
const v3, 0x1080030
const v4, 0x1040150
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$99;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
-Open GlobalActions$SinglePressAction.smali
-Before line "# instance fields"
paste following code
Code:
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
-Then after line "# direct methods"
paste following code
Code:
.method static constructor ()V
.registers 3
const/4 v0, 0x5
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 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
const/4 v1, 0x4
const-string v2, "Shutdown"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
-So your file should look something like this after those changes
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
# instance fields
.field private final mIconResId:I
.field private final mMessageResId:I
# direct methods
.method static constructor ()V
.registers 3
const/4 v0, 0x5
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 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
const/4 v1, 0x4
const-string v2, "Shutdown"
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
.registers 3
.parameter "iconResId"
.........
.........
-Compile .jar and your done.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Additional
If you don't want that "Shutdown Method" text on top of that menu then:
-Open GlobalActions$99.smali
-Remove following code
Code:
const-string v2, "Shutdown Method"
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
move-result-object v1
Problem? Check following posts for help.
When pressing restart/shutdown button and you only see title and "ok" and "cancel" -buttons, then see THIS post.
Hot reboot does not work? See HERE.
Hi, i tried to do this mod but not work....the option menu disappears and system reboot...
I renamed the file and his path in GlobalActions$15.smali but I can not make it work...
barikke74 said:
Hi, i tried to do this mod but not work....the option menu disappears and system reboot...
I renamed the file and his path in GlobalActions$15.smali but I can not make it work...
Click to expand...
Click to collapse
Hi!
You have to change those three files names then. In your case like 15, 15$1, 15$2. Then you changed that path in globalactions from 4 to 15? Great so far. Now you need to change every name called globalactions$10 to that $15 inside those three files i attached. You might want to use notepad++ for this. There's addon that can do this easily.
Maybe i rename those files to something else, since people have so big numbers on globalactions.
EDIT. I uploaded new source files. Now It's named $99, so i bet that none have that already existing. Edited tutorial also, so you name 4 to 99 in GlobalActions.smali
Hi kahvitahra and thanks for the quick response
I did all that you said but it does not work
Now I try with the new source
Thanks again
barikke74 said:
Hi kahvitahra and thanks for the quick response
I did all that you said but it does not work
Now I try with the new source
Thanks again
Click to expand...
Click to collapse
If you still have problems, then please attach logcat, so i can see what causes it.
I do not work ...
I put the logcat, I hope will be helpful to
http://dl.dropbox.com/u/52103175/alogcat.2012-03-31-14-38-49+0200.txt
and this is the policy
http://dl.dropbox.com/u/52103175/android.policy.jar
barikke74 said:
I do not work ...
I put the logcat, I hope will be helpful to
http://dl.dropbox.com/u/52103175/alogcat.2012-03-31-14-38-49+0200.txt
and this is the policy
http://dl.dropbox.com/u/52103175/android.policy.jar
Click to expand...
Click to collapse
What rom is that? is it ICS?
My bad that i have not been using ICS yet. Atleast your rom have build that global.actions differently. Your power off button is number $5. So instead of changing that 4 to 99, you should change 5 to 99. There can be something else changed also, but you can try just that if you like. Or since you have restart button already(?) then if i was you i would replace that button ($6) and then remove that shutdown from my files.
I should flash ICS and test this on it.
Yes, my ROM is ICS based...
If you try on ICS i wait your notice
Thanks for your time
Will test this out now
Moved to themes and apps.
Btw, nice work
Samsung ICS roms
What you need to do is:
-Decompile android.policy.jar of your rom
-Copy attached ICS folder to yours (POST 1)
-In file "GlobalActions$99.smali" there is id 0x1110008, you might want to check that this id is same in you roms puplic.xml ( config_sf_slowBlur ). In gingerbread roms this did not change, but not I'm not sure about these ICS roms.
( check also that ids 0x104000a = "ok" -string and 0x104 = "cancel" -string matches in your framework. )
-Open GlobalActions.smali
-Search line "new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$6;" ( some roms might have different number on reboot button. You find right one by for example tracking mRestart. See example below. )
-Change number 6 to 99 ( two of them )
Before
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$6;
const v1, 0x1080640
const v2, 0x1040165
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$6;->(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;
After
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
const v1, 0x1080640
const v2, 0x1040165
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$99;->(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;
-Open GlobalActions$SinglePressAction.smali
-Before line "# instance fields"
paste following code
Code:
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
-Then after line "# direct methods"
paste following code
Code:
.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 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
-So your file should look something like this after those changes
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
# instance fields
.field private final mIconResId:I
.field private final mMessageResId:I
# direct methods
.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 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 <init>(II)V
.registers 3
.parameter "iconResId"
.........
.........
-Compile .jar and your done.
I'm sorry but can not seem to make it work
I follow your instructions to the letter.....i don't understand
EDIT: ok ok.....finally I succeeded
Thanks 10000000
barikke74 said:
I'm sorry but can not seem to make it work
I follow your instructions to the letter.....i don't understand
EDIT: ok ok.....finally I succeeded
Thanks 10000000
Click to expand...
Click to collapse
It should work. Tested it on couple of ICS roms. Attach logcat with error, then maybe i could help you.
Edit. Great man.
I can't decompile android.policy.jar. It said it doesn't contain classes.dex. I opened it with winrar, it only has 1 folder META-INF. It's a SGS2 with ICS LP3
interpol2050 said:
I can't decompile android.policy.jar. It said it doesn't contain classes.dex. I opened it with winrar, it only has 1 folder META-INF. It's a SGS2 with ICS LP3
Click to expand...
Click to collapse
Your rom must be odexed then?
See THIS thread for how to decompile and odex those back.
I tried to deodex android.policy.jar but got this error. Could you help?
C:\Users\Q*****\Documents\Samsung\Deodex-Odex>java -Xmx1024m -jar baksmali.jar
-c :core.jar:core-junit.jar:bouncycastle.jar:ext.jar:framework.jar:framework2.j
ar:android.policy.jar:services.jar:apache-xml.jar:filterfw.jar -x android.policy
.odex
UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.Util.ExceptionWithContext: Unknown opcode: f1
at org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithCont
ext.java:54)
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(Instructio
nIterator.java:87)
at org.jf.dexlib.CodeItem.readItem(CodeItem.java:157)
at org.jf.dexlib.Item.readFrom(Item.java:76)
at org.jf.dexlib.OffsettedSection.readItems(OffsettedSection.java:48)
at org.jf.dexlib.Section.readFrom(Section.java:143)
at org.jf.dexlib.DexFile.<init>(DexFile.java:431)
at org.jf.baksmali.main.main(main.java:250)
Caused by: java.lang.RuntimeException: Unknown opcode: f1
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(InstructionIterator.java:51)
... 6 more
Error occured at code address 28
code_item @0x12c04
interpol2050 said:
I tried to deodex android.policy.jar but got this error. Could you help?
C:\Users\Q*****\Documents\Samsung\Deodex-Odex>java -Xmx1024m -jar baksmali.jar
-c :core.jar:core-junit.jar:bouncycastle.jar:ext.jar:framework.jar:framework2.j
ar:android.policy.jar:services.jar:apache-xml.jar:filterfw.jar -x android.policy
.odex
UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.Util.ExceptionWithContext: Unknown opcode: f1
at org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithCont
ext.java:54)
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(Instructio
nIterator.java:87)
at org.jf.dexlib.CodeItem.readItem(CodeItem.java:157)
at org.jf.dexlib.Item.readFrom(Item.java:76)
at org.jf.dexlib.OffsettedSection.readItems(OffsettedSection.java:48)
at org.jf.dexlib.Section.readFrom(Section.java:143)
at org.jf.dexlib.DexFile.<init>(DexFile.java:431)
at org.jf.baksmali.main.main(main.java:250)
Caused by: java.lang.RuntimeException: Unknown opcode: f1
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(InstructionIterator.java:51)
... 6 more
Error occured at code address 28
code_item @0x12c04
Click to expand...
Click to collapse
DL latest baksmali/smali 1.3.2 and for ICS files you also need to use API Level: 15. So add "-a 15" command when baksmalin. See HERE.
I did this: Deodex -> decompile -> modify -> compile -> reodex -> copy signature. No error occured and all seem fine as expected. I placed original android.policy.jar and patched and signed android.policy.odex to /system/framework but my SG2 stuck at boot animation. Any idea? ( I restored my SG2 btw )
Hi everyone!
kanpurite made a great job giving us the easy way to locking apps in memory in this thread.
But, as i told in http://forum.xda-developers.com/showpost.php?p=31627356&postcount=23 there is other, a little bit harder, but still it can be done.
Requirements:
A Pc (this guide is made over Windows, but may work on linux as well)
notepad++
baksmali/smali tools (attached at this thread)
root explorer (or any file explorer with root capabilities)
Here is a step by step guide to do it:
1. Extract baksmali tools to a new folder
2. Extract services.jar from your phone (at /system/framework) and copy to your baksmali folder
3. Run baksmali manager.bat
4. select option 4 (select file to work), then select services.jar
5. select option 1 (baksmali) and wait (CAUTION: DON'T CLOSE THE BAKSMALI MANAGER WINDOW)
6. Go to your baksmali folder, there must be a new folder named "services"
7. enter to services folder and go to this sub-folder
Code:
\com\android\server\am
8. open ActivityManagerService.smali with notepad++
9. search for ".line 13892" and add the following after "if-lez v10, :cond_2af":
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
(NOTE: You can change to any app you want, just give the proper name of the app process....)
10. add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
11. change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
12. Save the file.
13. Go to the baksmali manager window and select option 2 (smali) and wait, it will create a classes.dex file on your baksmali folder
14. Open up services.jar with 7zip or WinRAR and drag the newly created classes.dex into the window to refresh services.jar with the new
classes.dex
15. Copy the new services.jar file to your sdcard and from there, copy to /system/framework (use root explorer, mount read/write and copy the
file).
16. set proper permissions: set 644 permissions ((rw-r--r--) or (tick Read: owner, group, others / Write: owner)
17. Restart, make a wipe dalvik and cache and
18. Enjoy!
thx... but why not just upload a baked/moded ver of services.jar... it would be much easier just to replace this specific file ;p as i assume u did for youreself ;p
meilbox said:
thx... but why not just upload a baked/moded ver of services.jar... it would be much easier just to replace this specific file ;p as i assume u did for youreself ;p
Click to expand...
Click to collapse
I could do it, but I do prefer to share knowledge with everyone... I could upload a services.jar but it's more fun to learn new things.
Enviado desde mi MB525 usando Tapatalk 2
i dont have line 10429..
This is what is in my services.jar (Latest Build):
.line 10420
:cond_167
const/16 v48, 0x0
.line 10421
.local v48, mi:Landroid/os/Debug$MemoryInfo;
if-eqz v38, :cond_22a
.line 10423
:try_start_16b
move-object/from16 v0, v61
iget-object v5, v0, Lcom/android/server/am/ProcessRecord;->thread:Landroid/app/IApplicationThread;
move-object/from16 v0, p1
move/from16 v1, v43
move/from16 v2, v38
move-object/from16 v3, v42
invoke-interface {v5, v0, v1, v2, v3}, Landroid/app/IApplicationThread;->dumpMemInfo(Ljava/io/FileDescriptor;ZZ[Ljava/lang/StringLandroid/os/Debug$MemoryInfo;
:try_end_17a
.catch Landroid/os/RemoteException; {:try_start_16b .. :try_end_17a} :catch_21b
move-result-object v48
.line 10435
:cond_17b
:goto_17b
if-nez v43, :cond_26b
if-eqz v48, :cond_26b
.line 10436
invoke-virtual/range {v48 .. v48}, Landroid/os/Debug$MemoryInfo;->getTotalPss()I
move-result v5
int-to-long v7, v5
.line 10437
.local v7, myTotalPss:J
add-long v68, v68, v7
Click to expand...
Click to collapse
vaibhav palande said:
i dont have line 10429..
This is what is in my services.jar (Latest Build):
Click to expand...
Click to collapse
I'm not talking about ".line" on the code, I'm talking about the number of the line in the document. On notepad++ look at the numbers at the most left and you will find line 10429 with no problem
Enviado desde mi MB525 usando Tapatalk 2
Should i add here?
SO Should i add the code u gave above in line 10429 in the pic??
This is my services.jar:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
vaibhav palande said:
SO Should i add the code u gave above in line 10429 in the pic??
This is my services.jar:
Click to expand...
Click to collapse
Ummm... Weird it's send that I have to polish my guide... I'm using last version of quarx too but my code it's aligned different. Don't add the code in that line cause could break all the code. Please, wait a little bit for me to be on my pc to check what is wrong...
Enviado desde mi MB525 usando Tapatalk 2
espaciosalter20 said:
Ummm... Weird it's send that I have to polish my guide... I'm using last version of quarx too but my code it's aligned different. Don't add the code in that line cause could break all the code. Please, wait a little bit for me to be on my pc to check what is wrong...
Enviado desde mi MB525 usando Tapatalk 2
Click to expand...
Click to collapse
I am using latest build 09-12.. U have latest build? or u want me to send u services.jar?
vaibhav palande said:
I am using latest build 09-12.. U have latest build? or u want me to send u services.jar?
Click to expand...
Click to collapse
ok, it was my bad... i was using an old services.jar as reference. I double check again that and the right code is:
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
after this part:
Code:
[SIZE="5"][COLOR="Red"].line 13892[/COLOR][/SIZE]
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_29c
if-lez v10, :cond_2af
.line 13892, it's the key....
espaciosalter20 said:
ok, it was my bad... i was using an old services.jar as reference. I double check again that and the right code is:
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
after this part:
Code:
[SIZE="5"][COLOR="Red"].line 13892[/COLOR][/SIZE]
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_29c
if-lez v10, :cond_2af
.line 13892, it's the key....
Click to expand...
Click to collapse
So, where should i add this code? Which line?
vaibhav palande said:
So, where should i add this code? Which line?
Click to expand...
Click to collapse
I updated OP... Check in there
Enviado desde mi MB525 usando Tapatalk 2
espaciosalter20 said:
I updated OP... Check in there
Enviado desde mi MB525 usando Tapatalk 2
Click to expand...
Click to collapse
If i want to add some more apps, which part of the code needs to be repeated for new app?? Because difference in the upper part and lower part of code is highlighted with red color below and in the lower part green colored part is absent.. otherwise the code is same..
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]nez[/COLOR] v2, :cond_2b[COLOR="red"]4[/COLOR]
[COLOR="Lime"]move-object/from16 v0, p1[/COLOR]
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]eqz[/COLOR] v2, :cond_2b[COLOR="red"]f[/COLOR]
.line 13894
:cond_2b4
const/4 v11, 0x0
Problem doing smali
Here is the problem i am getting while doing smali:
vaibhav palande said:
Here is the problem i am getting while doing smali:
Click to expand...
Click to collapse
OP UPDATED
add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
if-lez v10, :cond_2d2
and change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
espaciosalter20 said:
add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
if-lez v10, :cond_2d2
and change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
Click to expand...
Click to collapse
What about this? Sorry for so many questions but i really don't know a thing about smali files. I just learned one or 2 things by reading it here on xda..
vaibhav palande said:
What about this? Sorry for so many questions but i really don't know a thing about smali files. I just learned one or 2 things by reading it here on xda..
Click to expand...
Click to collapse
it's for resolve the problem that you commented earlier.... i do gave you the code in which i defined "cond_2b4" variable to be readed in the smali, but i forgot to give you the define of "cond_2bf" variable... this is what you have to do in order to make the variable work properly and avoid the error in compile the service.jar again
I mean what about the question below..
vaibhav palande said:
If i want to add some more apps, which part of the code needs to be repeated for new app?? Because there is some in upper and lower part of code.. difference in the upper part and lower part of code is highlighted with red color below and the text in green color is absent in lower part.. So little confused about which part of code to be repeated for locking more apps in memory... otherwise the code is same..
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]nez[/COLOR] v2, :cond_2b[COLOR="red"]4[/COLOR]
[COLOR="Lime"]move-object/from16 v0, p1[/COLOR]
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]eqz[/COLOR] v2, :cond_2b[COLOR="red"]f[/COLOR]
.line 13894
:cond_2b4
const/4 v11, 0x0
Click to expand...
Click to collapse
espaciosalter20 said:
it's for resolve the problem that you commented earlier.... i do gave you the code in which i defined "cond_2b4" variable to be readed in the smali, but i forgot to give you the define of "cond_2bf" variable... this is what you have to do in order to make the variable work properly and avoid the error in compile the service.jar again
Click to expand...
Click to collapse
This is not working.. :crying:
I get this error while doing smali:
Easier version?
http://forum.xda-developers.com/showthread.php?t=1889300
Sent from my MB525 using xda app-developers app
vaibhav palande said:
This is not working.. :crying:
I get this error while doing smali:
Click to expand...
Click to collapse
delete "if-lez v10, :cond_2d2"
This is based off of FL16/GB08 JB 4.1.2.
A touchwiz 4.3 guide has been posted here:
[Guide How-to/MOD] New Power Menu with Screenshot TW 4.3
This will allow you to have Recovery and Bootloader (download mode) right in the Power Menu selections. I grew tired of the extended restart menu so I wrote this.
This is not a flashable mod, it is a guide only.
The attached zip file are support files only that are necessary to create this modification.
Power Menu Guide
Code:
[U][B]Framework-res.apk changes[/B]:[/U]
Add these lines to res/values/strings.xml
[CODE] <string name="download">Bootloader</string>
<string name="recovery">Recovery</string>
Add the two png files in the attachment to:
res/drawable-hdpi
Recompile framework-res.apk.
Decompile the new framework-res.apk and open res/values/public.xml.
We need to write down these values because we need them later. Yours will probably be different. Leave off the leading zero:
Code:
<public type="drawable" name="tw_ic_download" id="0x0[COLOR="Red"]1080ad6[/COLOR]" />
<public type="drawable" name="tw_ic_recovery" id="0x0[COLOR="Red"]1080ad7[/COLOR]" />
<public type="string" name="download" id="0x0[COLOR="Red"]1040843[/COLOR]" />
<public type="string" name="recovery" id="0x0[COLOR="Red"]1040844[/COLOR]" />
Android.policy.jar changes:
Add the two smali files in the attachment to com\android\internal\policy\impl
Smali edit:
com\android\internal\policy\impl\GlobalActions.smali
New line before:
Code:
.field private mDialog:Landroid/app/AlertDialog;
.field private mHandler:Landroid/os/Handler;
After:
Code:
.field private mDialog:Landroid/app/AlertDialog;
[COLOR="Red"].field private mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[/COLOR].field private mHandler:Landroid/os/Handler;
New line before:
Code:
.field private mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.field private mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
After:
Code:
.field private mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[COLOR="Red"].field private mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[/COLOR].field private mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
Find around line 1075:
Code:
.line 372
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$4;
const v2, 0x10808ee
const v3, 0x1040192
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$4;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 399
Add new lines after this section:
***NOTE THE LINES IN BLUE, THESE MUST MATCH THE VALUES WE GOT FROM FRAMEWORK (without the leading zero)***
Code:
.line 372
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$4;
const v2, 0x10808ee
const v3, 0x1040192
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$4;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 399
[COLOR="Red"] new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$Download;
const v2, 0x[COLOR="Blue"]1080ad6[/COLOR]
const v3, 0x[COLOR="Blue"]1040843[/COLOR]
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$Download;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 400
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$Recovery;
const v2, 0x[COLOR="Blue"]1080ad7[/COLOR]
const v3, 0x[COLOR="Blue"]1040844[/COLOR]
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$Recovery;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 401
[/COLOR] new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$5;
Now we are going to expand the existing array to include 2 more entries.
Around line 1138:
Before:
Code:
.line 428
const/4 v1, 0x5
After:
Code:
.line 428
[COLOR="Red"]const/4 v1, 0x7[/COLOR]
Find around line 1137:
Code:
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v3, v1, v2
const/4 v2, 0x4
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
invoke-static {v1}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/Object;)Ljava/util/ArrayList;
Replace with:
Code:
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v3, v1, v2
const/4 v2, 0x4
move-object/from16 v0, p0
[COLOR="Red"] iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
const/4 v2, 0x5
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
const/4 v2, 0x6
move-object/from16 v0, p0[/COLOR]
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
invoke-static {v1}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/Object;)Ljava/util/ArrayList;
How to remove menu items:
Smali edit:
com\android\internal\policy\impl\GlobalActions.smali
We need to reconfigure the array that displays the options.
Before:
Code:
.line 428
const/4 v1, 0x7
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
const/4 v2, 0x0
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAccessiblityShortcut:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
const/4 v2, 0x1
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
const/4 v2, 0x2
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDataModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v3, v1, v2
const/4 v2, 0x3
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v3, v1, v2
const/4 v2, 0x4
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
const/4 v2, 0x5
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
const/4 v2, 0x6
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
invoke-static {v1}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/Object;)Ljava/util/ArrayList;
move-result-object v1
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
We need to split up the array so that we can easily see the different sections.
It will make it easier to modify the line you want to remove.
Code:
.line 428
const/4 v1, 0x7
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
#
const/4 v2, 0x0
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAccessiblityShortcut:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
const/4 v2, 0x1
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
const/4 v2, 0x2
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDataModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v3, v1, v2
#
const/4 v2, 0x3
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v3, v1, v2
#
const/4 v2, 0x4
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
const/4 v2, 0x5
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
const/4 v2, 0x6
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
invoke-static {v1}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/Object;)Ljava/util/ArrayList;
move-result-object v1
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
Now we will remove the Data Network Mode and Airplane Mode choices from the menu. We need to shrink the array by 2 and also renumber the remaining options. Please note the changes in red.
Code:
.line 428
[COLOR="Red"] const/4 v1, 0x5[/COLOR]
new-array v1, v1, [Lcom/android/internal/policy/impl/GlobalActions$Action;
#
const/4 v2, 0x0
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAccessiblityShortcut:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
const/4 v2, 0x1
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
[COLOR="Red"] # const/4 v2, 0x2
# move-object/from16 v0, p0
# iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDataModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
# aput-object v3, v1, v2
[/COLOR]
#
[COLOR="Red"] # const/4 v2, 0x3
# move-object/from16 v0, p0
# iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
# aput-object v3, v1, v2[/COLOR]
#
[COLOR="Red"] const/4 v2, 0x2[/COLOR]
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
[COLOR="Red"] const/4 v2, 0x3
[/COLOR]
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
[COLOR="Red"] const/4 v2, 0x4
[/COLOR]
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v3, v1, v2
#
invoke-static {v1}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/Object;)Ljava/util/ArrayList;
move-result-object v1
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
Note: Use of the # symbol is not necessary. I use it simply for clarification and to separate out the sections for easier viewing while editing. Additionally, any lines edited with the # symbol will be ignored when recompiling.
Addendum - Adding Screenshot to Power Menu
(This is an addon to the original Power Menu Guide posted above).
Framework-res.apk changes:
Add these lines to res/values/strings.xml
Code:
<string name="global_action_screenshot_txt">Screenshot</string>
Add png file in the screenshot attachment to:
res/drawable-hdpi
Recompile framework-res.apk.
Decompile the new framework-res.apk and open res/values/public.xml.
We need to write down these values because we need them later. Yours will probably be different. Leave off the leading zero:
Code:
<public type="string" name="global_action_screenshot_txt" id="0x01040845" />
<public type="drawable" name="tw_ic_screenshot" id="0x01080ad8" />
Android.policy.jar changes:
Add the two smali files in the attachment to com\android\internal\policy\impl
Smali edit:
com\android\internal\policy\impl\GlobalActions.smali
New line before:
Code:
.field private mRingerModeReceiver:Landroid/content/BroadcastReceiver;
.field private mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$SilentModeAction;
After:
Code:
.field private mRingerModeReceiver:Landroid/content/BroadcastReceiver;
[COLOR="Red"].field private mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
.field private mSilentModeAction:Lcom/android/internal/policy/impl/GlobalActions$SilentModeAction;
New Section Before:
Code:
.line 372
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$4;
const v2, 0x10808ee
const v3, 0x1040192
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$4;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 399
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$Download;
const v2, 0x1080ad6
const v3, 0x1040843
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$Download;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
After:
***NOTE THE LINES IN BLUE, THESE MUST MATCH THE VALUES WE GOT FROM FRAMEWORK (without the leading zero)***
Code:
.line 372
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$4;
const v2, 0x10808ee
const v3, 0x1040192
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$4;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[COLOR="Red"] .line 388
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$16;
const v2, 0x[COLOR="Blue"]1080ad8[/COLOR]
const v3, 0x[COLOR="Blue"]1040845[/COLOR]
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$16;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[/COLOR]
.line 399
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$Download;
const v2, 0x1080ad6
const v3, 0x1040843
move-object/from16 v0, p0
invoke-direct {v1, v0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$Download;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
Now to edit the array and add ScreenShot
NOTE: FYI, here we are removing replacing DataToggle with Airplane Mode to keep menu from overlapping the screen.
Find around line 1180:
Code:
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDataModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v3, v1, v2
const/4 v2, 0x3
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v3, v1, v2
const/4 v2, 0x4
move-object/from16 v0, p0
Replace with:
Code:
[COLOR="Red"] iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;[/COLOR]
aput-object v3, v1, v2
const/4 v2, 0x3
move-object/from16 v0, p0
[COLOR="Red"]iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
aput-object v3, v1, v2
const/4 v2, 0x4
move-object/from16 v0, p0
If porting this to another phone
Important update info for Screenshot mod:
You may have to possibly change this value in GlobalActions$16$1.smali which is one of the addon files to match your code.
Code:
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->[COLOR="Red"]access$200[/COLOR](Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
Here is my access$200 in GlobalActions.smali, just search for the line in red. If it is different access$xxx in your smali, also change access$xxx to match in GlobalActions$16$1.smali:
Code:
.method static synthetic access$200(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
.registers 2
.parameter "x0"
.prologue
.line 88
[COLOR="Red"]iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;[/COLOR]
return-object v0
.end method
Credits to Mirko DDD for the ScreenShot method!!!
OP updated with new section.
How to remove options from Power Menu. Screenshot attached with modification.
thx buddy, i will look into asap.
Looks Nice
Re: [GUIDE][How-to] New Power Menu JB
So those the zip replace all the script changes in the op?
Not sure, changes to script+zip - or just zip to get new power menu?
Pp.:beer:
sent from a jellybean filled epic touch.
Re: [GUIDE][How-to] New Power Menu JB
PanchoPlanet said:
So those the zip replace all the script changes in the op?
Not sure, changes to script+zip - or just zip to get new power menu?
Pp.:beer:
sent from a jellybean filled epic touch.
Click to expand...
Click to collapse
The zip contains extra support files that need to be added to the classes.dex file before it gets recompiled. So yes, the last part of what you said.
And also a couple files for the framework edit are in the zip too.
Sent from my SPH-D710 using xda premium
Re: [GUIDE][How-to] New Power Menu JB
This thread got mentioned on Google+, keep up the good work!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my SPH-D710 using Xparent Skyblue Tapatalk 2
Great Job!! :good:
Gonna try this awesomenesssss..
Samsung Fanboy said:
This thread got mentioned on Google+, keep up the good work!
Click to expand...
Click to collapse
Thanks for keeping an eye out for me.
Yes, another very well written writeup by Egzthunder1.
http://www.xda-developers.com/andro...ems-to-your-jelly-bean-powered-epic-4g-touch/
Very nice, I did that on my Galaxy S3 Mini and works great.
I would love to see a Xposed module made out of this. Would be awesome!
Re: [GUIDE][How-to] New Power Menu JB
Congrats Td on the write-up and recognition. :thumbup::beer::beer::beer:
Keep up the great work and contributions to the community.
Pp.:beer::beer::beer:
sent from a jellybean filled epic touch.
Hi @tdunham
I have been trying to add recovery option using or guide.
It goes well with framework-res.apk but stuck at android. policy.jar
While editing global action.smali I can't find any thing u specified.
Have appached the file
.salil. said:
Hi @tdunham
I have been trying to add recovery option using or guide.
It goes well with framework-res.apk but stuck at android. policy.jar
While editing global action.smali I can't find any thing u specified.
Have appached the file
Click to expand...
Click to collapse
This doesn't look like it came from a touchwiz rom. What rom did you pull it from?
Re: [GUIDE][How-to] New Power Menu JB
tdunham said:
This doesn't look like it came from a touchwiz rom. What rom did you pull it from?
Click to expand...
Click to collapse
Uh its not touchwiz
Is there a way to get through
.salil. said:
Uh its not touchwiz
Is there a way to get through
Click to expand...
Click to collapse
The method is very different and I do not see too many similarities on how they created power menu in this one. I am only familiar with Touchwiz, maybe someone more familiar with the platform you are using could help using same principle but it would require a much different approach.
Re: [GUIDE][How-to] New Power Menu JB
tdunham said:
The method is very different and I do not see too many similarities on how they created power menu in this one. I am only familiar with Touchwiz, maybe someone more familiar with the platform you are using could help using same principle but it would require a much different approach.
Click to expand...
Click to collapse
Kk
Thanks anyway.
Sent from
my bullet proof revolver™ //"="" ````°.
I didn't see a post for this anywhere and didn't want to make a separate one since this is all TD's work. Here is the Power Mod for stock GB27. TD you can post this in the OP or do whatever you want with it. Your guide was excellent and I thank you for putting that together for us.
Download: GB27 Power Mod Deodexed http://tinyw.in/yMcu
MD5: 2df0540be214e3d85bac3eedea0c794d
GB27 Power Mod Odexed http://tinyw.in/9DXd
MD5: 4eddf84ad1cc6b50d36e281ae5be05bf
crawrj said:
I didn't see a post for this anywhere and didn't want to make a separate one since this is all TD's work. Here is the Power Mod for stock GB27. TD you can post this in the OP or do whatever you want with it. Your guide was excellent and I thank you for putting that together for us.
Download: GB27 Power Mod Deodexed http://tinyw.in/yMcu
MD5: 2df0540be214e3d85bac3eedea0c794d
GB27 Power Mod Odexed http://tinyw.in/9DXd
MD5: 4eddf84ad1cc6b50d36e281ae5be05bf
Click to expand...
Click to collapse
Just curious is there a screen shot of this? Wondering what options are in the power menu?
Sent from my SPH-D710 using Tapatalk 2
JonSCSL said:
Just curious is there a screen shot of this? Wondering what options are in the power menu?
Sent from my SPH-D710 using Tapatalk 2
Click to expand...
Click to collapse
It is the full power menu that is in the OP.
Reboot options as show :good:
Pre-requisites
De-Odex'ed devices only! Will not work on stock ROM!
Must have the the MDL De-Odex mod by Nottach to use this mod!
Installation
I used similar install method as Nottach to apply this mod.
Download the attachment. Unzip it to your desktop.
Simply copy the "Mods" folder to your internal storage
Run the "Mod Me.bat" file after copying
It will copy the mod to the correct location, clear cache, then reboot phone.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Feel free to use this in any mod or ROM you make.
Hit Thanks!
To make this mod your self or further modify it do the following;
First decompile classes.dex in android.policy.jar. I wont get into that part as this mini tutorial assumes you know how to modify smali code.
Add the following BOLD ITALIC code to \com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali
Modded Code:
Code:
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
[B][I]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
[/I][/B]
# instance fields
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
[B][I].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, "Restart Shell"
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[/I][/B]
.method protected constructor <init>(II)V[I][/I]
FYI: You can change the string names to what you like best. For example most people word the second string as "Hot reboot" but I think that sounds lame so I call it what it is and that is a shell restart. Another example would be to change "Download" to "Download Mode"
Then change \com\android\internal\policy\impl\GlobalActions.smali
right below .line 566
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
to
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
Then create three smali files as shown below and add them to: \com\android\internal\policy\impl\
GlobalActions$99.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99;
.super Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.source "GlobalActions.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions;->createDialog()Landroid/app/AlertDialog;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/internal/policy/impl/GlobalActions;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
.registers 4
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-direct {p0, p2, p3}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>(II)V
return-void
.end method
# virtual methods
.method public onPress()V
.registers 7
const/4 v5, 0x4
new-instance v1, Landroid/app/AlertDialog$Builder;
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-direct {v1, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
const-string v2, "Reboot Menu"
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
move-result-object v1
sget-object v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
const/4 v3, 0x0
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$99$2;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$99$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
invoke-virtual {v1, v2, v3, v4}, Landroid/app/AlertDialog$Builder;->setSingleChoiceItems([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
const v2, 0x104000a
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$99$1;
invoke-direct {v3, p0}, Lcom/android/internal/policy/impl/GlobalActions$99$1;-><init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
invoke-virtual {v1, v2, v3}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
const/high16 v2, 0x104
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v0
invoke-virtual {v0}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
const/16 v2, 0x7d9
invoke-virtual {v1, v2}, Landroid/view/Window;->setType(I)V
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v1}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x111000f
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v1
if-nez v1, :cond_58
invoke-virtual {v0}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
invoke-virtual {v1, v5, v5}, Landroid/view/Window;->setFlags(II)V
:cond_58
invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V
return-void
.end method
.method public showBeforeProvisioning()Z
.registers 2
.prologue
.line 307
const/4 v0, 0x1
return v0
.end method
.method public showConditional()Z
.registers 2
.prologue
.line 311
const/4 v0, 0x1
return v0
.end method
.method public showDuringKeyguard()Z
.registers 2
.prologue
.line 304
const/4 v0, 0x1
return v0
.end method
GlobalActions$99$1.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99$1;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions$99;->onPress()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
.registers 2
.parameter
.prologue
.line 281
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
.registers 7
.parameter "dialog"
.parameter "whichButton"
.prologue
const/4 v2, 0x1
const/4 v3, 0x0
.line 282
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
const/4 v1, -0x1
if-le v0, v1, :cond_20
.line 291
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
const/4 v1, 0x4
if-eq v0, v1, :cond_4d
.line 283
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
if-eq v0, v2, :cond_2c
.line 284
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
iget-object v0, v0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v0
sget v1, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
if-nez v1, :cond_21
const/4 v1, 0x0
:goto_1d
invoke-static {v0, v1, v3}, Lcom/android/server/power/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
.line 291
:cond_20
:goto_20
return-void
.line 284
:cond_21
sget-object v1, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
sget v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
aget-object v1, v1, v2
invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object v1
goto :goto_1d
.line 288
:cond_2c
:try_start_2c
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
const/4 v1, 0x4
new-array v1, v1, [Ljava/lang/String;
const/4 v2, 0x0
const-string v3, "pkill"
aput-object v3, v1, v2
const/4 v2, 0x1
const-string v3, "-TERM"
aput-object v3, v1, v2
const/4 v2, 0x2
const-string v3, "-f"
aput-object v3, v1, v2
const/4 v2, 0x3
const-string v3, "system_server"
aput-object v3, v1, v2
invoke-virtual {v0, v1}, Ljava/lang/Runtime;->exec([Ljava/lang/String;)Ljava/lang/Process;
:try_end_4a
.catch Ljava/lang/Exception; {:try_start_2c .. :try_end_4a} :catch_4b
goto :goto_20
.line 290
:catch_4b
move-exception v0
goto :goto_20
:cond_4d
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
iget-object v0, v0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v0
const/4 v1, 0x0
invoke-static {v0, v1}, Lcom/android/server/power/ShutdownThread;->shutdown(Landroid/content/Context;Z)V
goto :goto_20
.end method
GlobalActions$99$2.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99$2;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions$99;->onPress()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
.registers 2
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99$2;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
.registers 3
sput p2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
return-void
.end method
Recompile and done!
You can also change the names of the reboot method to your liking!
Slowly but surely here comes the goodies. Cant wait for flashy time for AT&T.
ATT S4 Rooted. Beastin.
4.2.2
Scrosler you are the man! Hell ya dude thanks!! I envy your talent
"Tettering" ay, right. Slow down a little, I can't keep up. Very usefull reboot menu. Works for me.
sent from my SGH-i317
Dean1650 said:
"Tettering" ay, right. Slow down a little, I can't keep up. Very usefull reboot menu. Works for me.
sent from my SGH-i317
Click to expand...
Click to collapse
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
scrosler said:
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
Click to expand...
Click to collapse
No, but I'm headed over there now.
sent from my SGH-i317
scrosler said:
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
Click to expand...
Click to collapse
Thought you were going back to Verizon?
Sent from my HTC One using Tapatalk 2
powerwagon said:
Thought you were going back to Verizon?
Sent from my HTC One using Tapatalk 2
Click to expand...
Click to collapse
I did. The people on Verizon bought me a Note II (when it came out). But I wanted the SGS4 so I broke into my donation fund and bought (part of it anyways).
I now develop for 4 phones, SGS4, Note II (All carriers), SGS3, and HTC One X... and the Nexus 10 Tablet.
scrosler said:
I did. The people on Verizon bought me a Note II (when it came out). But I wanted the SGS4 so I broke into my donation fund and bought (part of it anyways).
I now develop for 4 phones, SGS4, Note II (All carriers), SGS3, and HTC One X... and the Nexus 10 Tablet.
Click to expand...
Click to collapse
Cant wait to be running cleanrom on this! Def one of the best devs in the game, glad you kept it
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Can't wait for mine to come in the mail... Thanks to you guys who able to do this awesome work. Hope I can help out or at least test some stuff out for you guys.
Sent from my SGS3 using xda premium
Deodexed System Installer ran from Noattach but i am still not able to get this mod to work i am updated to the lastest AMDL and deodexed verifiyed by checking build info Nottach.JDQ39.I337UCUAMDL anyone have any ideas ? as to what the problem is .
tokoam said:
Deodexed System Installer ran from Noattach but i am still not able to get this mod to work i am updated to the lastest AMDL and deodexed verifiyed by checking build info Nottach.JDQ39.I337UCUAMDL anyone have any ideas ? as to what the problem is .
Click to expand...
Click to collapse
And you used the installer with this mod?
Yes I did
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
tokoam said:
Yes I did
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
Did you get an error messages?
scrosler said:
Did you get an error messages?
Click to expand...
Click to collapse
No error message in cmd batch file
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
i try right
It does not work for me either
Just says waiting for s4. The other installer works fine I even tried just pushing me jar file but that did not work either
Sent from my SAMSUNG-SGH-I337 using xda premium
And you have ADB installed and in the Windows path?
I have updated the instructions to be more specific and included an alternate installer with the ADB executables.
New Power Menu with Screenshot TW 4.3 MK3/MK5
Create a Backup First
For Stock TW 4.3 SPH-L710 MK3/MK5 Builds Only!Do not flash this on a custom ROM, it replaces important framework files
Notes:
I know the extended restart menu has been around for quite a while but I really prefer the simplicity and ease of access to the standard Power Menu without that extra keypress.
Features:
- Reboot to Recovery (instant - no prompt)
- Reboot to Download Mode (instant - no prompt)
- Screenshot
Update:
Added a second New Power Menu with Airplane Mode toggle removed.
Just flash over the other one if you want to try it.
[Guide How-to] Power Menu
Download the support files located at the bottom of the post.
framework-res.apk edits:
Add the 3 icons (from the support file) to framework-res/res/drawable-xhdpi
Add 3 new lines to framework-res/res/values/strings:
Code:
<string name="download">Bootloader</string>
<string name="recovery">Recovery</string>
<string name="global_action_screenshot_txt">Screenshot</string>
</resources>
Compile then De-compile the new framework-res.apk. We will need to view the public.xml file later to get a few values for the next section.
android.policy.jar edits:
Add the 6 new smali files (from the support file) to android.policy/com/android/internal/policy/impl.
(In the same path) edit GlobalActions.smali (or diff the stock and modified GlobalActions.smali included in the support file):
Before:
Code:
.field private final mDreamManager:Landroid/service/dreams/IDreamManager;
.field private mHandler:Landroid/os/Handler;
After:
Code:
.field private final mDreamManager:Landroid/service/dreams/IDreamManager;
[COLOR="Blue"].field private mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.field private mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[/COLOR].field private mHandler:Landroid/os/Handler;
Before:
Code:
.field private mRingerModeReceiver:Landroid/content/BroadcastReceiver;
.field private final mShowSilentToggle:Z
After:
Code:
.field private mRingerModeReceiver:Landroid/content/BroadcastReceiver;
[COLOR="Blue"].field mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.field mScreenshotConnection:Landroid/content/ServiceConnection;
.field final mScreenshotLock:Ljava/lang/Object;
.field final mScreenshotTimeout:Ljava/lang/Runnable;
[/COLOR].field private final mShowSilentToggle:Z
Before:
Code:
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDataNetworkState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-boolean v6, p0, Lcom/android/internal/policy/impl/GlobalActions;->mIsWaitingForEcmExit:Z
iput-boolean v5, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDisplayConfirm:Z
const/4 v4, 0x0
After:
Code:
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDataNetworkState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
[COLOR="Blue"] new-instance v4, Ljava/lang/Object;
invoke-direct {v4}, Ljava/lang/Object;-><init>()V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotLock:Ljava/lang/Object;
const/4 v4, 0x0
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$29;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$29;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotTimeout:Ljava/lang/Runnable;
[/COLOR]
iput-boolean v6, p0, Lcom/android/internal/policy/impl/GlobalActions;->mIsWaitingForEcmExit:Z
iput-boolean v5, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDisplayConfirm:Z
const/4 v4, 0x0
New method:
Before:
Code:
.method static synthetic access$1700(Lcom/android/internal/policy/impl/GlobalActions;)Z
.locals 1
iget-boolean v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mKeyguardShowing:Z
return v0
.end method
.method static synthetic access$1800(Lcom/android/internal/policy/impl/GlobalActions;)Lcom/android/internal/policy/impl/GlobalActions$ConfirmDialogReceiver;
.locals 1
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mConfirmDialogReceiver:Lcom/android/internal/policy/impl/GlobalActions$ConfirmDialogReceiver;
return-object v0
.end method
After:
Code:
.method static synthetic access$1700(Lcom/android/internal/policy/impl/GlobalActions;)Z
.locals 1
iget-boolean v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mKeyguardShowing:Z
return v0
.end method
[COLOR="Blue"].method static synthetic access$1701(Lcom/android/internal/policy/impl/GlobalActions;)V
.locals 0
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->takeScreenshot()V
return-void
.end method
[/COLOR]
.method static synthetic access$1800(Lcom/android/internal/policy/impl/GlobalActions;)Lcom/android/internal/policy/impl/GlobalActions$ConfirmDialogReceiver;
.locals 1
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mConfirmDialogReceiver:Lcom/android/internal/policy/impl/GlobalActions$ConfirmDialogReceiver;
return-object v0
.end method
Before:
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$6;
const v1, 0x1080a60
const v2, 0x10401c8
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$6;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$7;
const v1, 0x1080a61
const v2, 0x10401c9
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$7;-><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;
After:
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$6;
const v1, 0x1080a60
const v2, 0x10401c8
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$6;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[COLOR="Blue"] new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$Download;
const v1, 0x1081088
const v2, 0x1040a0b
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$Download;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$Recovery;
const v1, 0x1081089
const v2, 0x1040a0c
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$Recovery;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$28;
const v1, 0x108108a
const v2, 0x1040a0d
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$28;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
[/COLOR]
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$7;
const v1, 0x1080a61
const v2, 0x10401c9
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$7;-><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;
Edit above section
Before continuing, go back to the new DECOMPILED framework-res.apk and open res/values/public.xml with notepad++.
Search for <public type="drawable" name="tw_ic_download"
- All 3 of our new public drawable values for the png images will be listed together.
Search for <public type="string" name="download"
- All 3 of our new public string values will be listed together.
Now, using these we will edit the 3 new sections above for the these new public values. Instead of jumping back and forth in the public.xml, I do the drawables (V1 values) all at once and then go to the strings section and do the strings (V2 values) next.
Code:
<public type="drawable" name="tw_ic_download" id="0x01081088" />
<public type="drawable" name="tw_ic_recovery" id="0x01081089" />
<public type="drawable" name="tw_ic_screenshot" id="0x0108108a" />
Code:
<public type="string" name="download" id="0x01040a0b" />
<public type="string" name="recovery" id="0x01040a0c" />
<public type="string" name="global_action_screenshot_txt" id="0x01040a0d" />
For instance, we are editing these values:
Download:
const v1, 0x1081088 (V1 = DRAWABLE)
const v2, 0x1040a0b (V2 = STRING)
Important Note:
Please note that the leading zero is not used from the public value.
Next, search for const/16 v0, 0x8
Replace this entire section:
Before:
Code:
[COLOR="Red"] const/16 v0, 0x8
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAccessiblityShortcut:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x1
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mTalkBack:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1
const/4 v1, 0x2
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x3
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDataModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1
const/4 v1, 0x4
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1
const/4 v1, 0x5
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x6
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mBugReport:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x7
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mLonglife:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1
[/COLOR]
After:
Code:
[COLOR="Blue"] const/16 v0, 0x8
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x1
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAccessiblityShortcut:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x2
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mTalkBack:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1
const/4 v1, 0x3
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1
const/4 v1, 0x4
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x5
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x6
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x7
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
[/COLOR]
New method. Search for # virtual methods and insert this method BEFORE that line:
Code:
[COLOR="Blue"].method private takeScreenshot()V
.locals 8
iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotLock:Ljava/lang/Object;
monitor-enter v4
:try_start_0
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
if-eqz v3, :cond_0
monitor-exit v4
:goto_0
return-void
:cond_0
new-instance v0, Landroid/content/ComponentName;
const-string v3, "com.android.systemui"
const-string v5, "com.android.systemui.screenshot.TakeScreenshotService"
invoke-direct {v0, v3, v5}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
new-instance v2, Landroid/content/Intent;
invoke-direct {v2}, Landroid/content/Intent;-><init>()V
invoke-virtual {v2, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$30;
invoke-direct {v1, p0}, Lcom/android/internal/policy/impl/GlobalActions$30;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
const/4 v5, 0x1
sget-object v6, Landroid/os/UserHandle;->CURRENT:Landroid/os/UserHandle;
invoke-virtual {v3, v2, v1, v5, v6}, Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/UserHandle;)Z
move-result v3
if-eqz v3, :cond_1
iput-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mHandler:Landroid/os/Handler;
iget-object v5, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotTimeout:Ljava/lang/Runnable;
const-wide/16 v6, 0x2710
invoke-virtual {v3, v5, v6, v7}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
:cond_1
monitor-exit v4
goto :goto_0
:catchall_0
move-exception v3
monitor-exit v4
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v3
.end method
[/COLOR]
[Guide How-to] Remove a Menu Item
Search for const/16 v0, 0x8
Each menu item of this array is only 3 lines. We will remove the Airplane Mode toggle. Delete or comment out these 3 lines.
Code:
const/4 v1, 0x3
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1
Since we have removed a menu item, the array constructor const/16 v0, 0x8
needs to be changed to const/16 v0, 0x7 (one less item 8-1=7 ).
Also, all the construct lines after the item you have just deleted need to be renumbered so they remain sequential. Here is the code changed after the item has been removed.
Code:
const/4 v1, 0x[COLOR="Red"]3[/COLOR]
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x[COLOR="Red"]4[/COLOR]
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x[COLOR="Red"]5[/COLOR]
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRecovery:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x[COLOR="Red"]6[/COLOR]
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
Credits: Huge credits to @rompnit for the use of the Screenshot method for this mod.
Do you have to be on a deodexed rom? Just flashed this twice on stock MK3 and I'm getting nothin'.
Sent from my SPH-L710 using XDA Premium 4 mobile app
marcran75 said:
Do you have to be on a deodexed rom? Just flashed this twice on stock MK3 and I'm getting nothin'.
Click to expand...
Click to collapse
Yes, 99% of any mods are going to be for deodexed. That is partly why it is extremely difficult to find an odexed custom rom.
tdunham said:
Yes, 99% of any mods are going to be for deodexed. That is partly why it is extremely difficult to find an odexed custom rom.
Click to expand...
Click to collapse
That's what I figured but thought I would ask anyways.
Sent from my SPH-L710 using XDA Premium 4 mobile app
another awesome mod !!! love it - so happy you have started making these - keep em' coming !!!!
VM SIII - jdsingle76's MK5 4.3
decimalman's TW dkp kernel
Between you and @CNexus, I will be killing someone soon with all the extra theming you have me doing. Nice job...
[email protected]'$ [email protected]@XY
marcran75 said:
Do you have to be on a deodexed rom? Just flashed this twice on stock MK3 and I'm getting nothin'.
Sent from my SPH-L710 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Move android.policy.jar and android.policy.jar.odex to your sdcard (to make a "backup" of them and delete at the same time) then flash this and it will work.
Deodexed mods can be used on odex, but not the other way around. Only catch is you gotta delete the affected odex files or else the system will preload those cache files and ignore the new file
CNexus said:
Move android.policy.jar and android.policy.jar.odex to your sdcard (to make a "backup" of them and delete at the same time) then flash this and it will work.
Deodexed mods can be used on odex, but not the other way around. Only catch is you gotta delete the affected odex files or else the system will preload those cache files and ignore the new file
Click to expand...
Click to collapse
Tried this and got stock at boot screen. Pulled battery and still the same.
marcran75 said:
Tried this and got stock at boot screen. Pulled battery and still the same.
Click to expand...
Click to collapse
Hmm...I've done this tons of times before on stock odexed and it's worked
Check the zip to see what (if any) other files are affected and move the odex files for those, then try flashing again
Is there anyway you could make a guide. ...I would love this on Wicked sensations.
http://i.imgur.com/qrByUGN.jpg
remotehugger said:
VM SIII - jdsingle76's MK5 4.3
decimalman's TW dkp kernel
Click to expand...
Click to collapse
Notice youre running virgin mobile... Thanks to tdunham, I have put together a zip to get the virgin mobile network running on the wicked sensations ROM... I have stock 4.3 android thru my ota update and with the zip it works perfect in VM.
ROM is here --> http://forum.xda-developers.com/showthread.php?t=2581010
Read the second post for the virgin mobile fix..
Just bored and saw that part of your post lol
Sent from my Virgin Mobile Galaxy S3, running Wicked Sensations Rom powered by DKP kernel, using Tapatalk 4.
bigpappags3 said:
Is there anyway you could make a guide. ...I would love this on Wicked sensations.
http://i.imgur.com/qrByUGN.jpg
Click to expand...
Click to collapse
Shut up clown. Don't give that other clown any ideas... Soon i'll have a 10 in 1 power menu and 60 toggles to theme...
[email protected]'$ [email protected]@XY
Confirm working on wicked and is nice. Nice mod
Sent from my SPH-L710 using xda app-developers app
Thanks for this tdunham. I already clicked thanks but this is just awesome. :thumbup:
Awesome mod. Thank you very much!
Update:
Added to the OP a second New Power Menu with Airplane Mode toggle removed.
Just flash over the other one if you want to try it.
I tried this and it force closes my phone settings (sure it is related to something I did to my personal framework-res.apk). So my question is if you could tell me which if any xmls need modified?
notmyepic said:
I tried this and it force closes my phone settings (sure it is related to something I did to my personal framework-res.apk). So my question is if you could tell me which if any xmls need modified?
Click to expand...
Click to collapse
I won't do full guide until later:
Code:
framework-res.apk edits:
Add the 3 icons (from the support file) to framework-res/res/drawable-xhdpi
Add 3 new lines to framework-res/res/values/strings:
<string name="download">Bootloader</string>
<string name="recovery">Recovery</string>
<string name="global_action_screenshot_txt">Screenshot</string>
</resources>
Still no guarantees if other changes were made that alter public values that get generated when framework-res is compiled.
Hey man, I changed he pngs to match the rest of Dandroid. In the 3rd option down instead of saying "download mode" it says "bootloader". Where would I go to change this?
Chad The Pathfinder said:
Hey man, I changed he pngs to match the rest of Dandroid. In the 3rd option down instead of saying "download mode" it says "bootloader". Where would I go to change this?
Click to expand...
Click to collapse
It's in the post before this one.
Edit: Sorry, meant the post above yours.