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 )
Related
Do you dislike the leading zero from the digital clock widget or dual clock widget? If so, you can now remove them with the following guide.
A) DigitalClock.apk
1. Decompile DigitalClock.odex with baksmali
2. Edit the file com/sec/android/widgetapp/digitalclock/DigitalClockWidgetProvider.smali
3. Search for the method drawHour()
Code:
.method private static drawHour(Landroid/content/Context;Landroid/widget/RemoteViews;Ljava/util/Date;Z)V
...
.end method
4. Add the following lines in red to the drawHour() method.
Code:
...
const v3, 0x7f070007
const/4 v4, 0x4
invoke-virtual {p1, v3, v4}, Landroid/widget/RemoteViews;->setViewVisibility(II)V
.line 202
:goto_13
const v3, 0x7f070002
invoke-static {v0}, Lcom/sec/android/widgetapp/digitalclock/DigitalClockWidgetProvider;->getClockNumberResourceId(I)I
move-result v4
[COLOR="Red"][b]#if hour1 is zero then draw transparent image (0x106000d)
if-nez v0, :cond_1f
const v4, 0x106000d
:cond_1f[/b][/COLOR]
invoke-virtual {p1, v3, v4}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
.line 203
const v3, 0x7f070003
invoke-static {v1}, Lcom/sec/android/widgetapp/digitalclock/DigitalClockWidgetProvider;->getClockNumberResourceId(I)I
move-result v4
invoke-virtual {p1, v3, v4}, Landroid/widget/RemoteViews;->setImageViewResource(II)V
...
5. Recompile and push to /system/app
6. Restart phone.
B) DualClock.apk
1. Decompile DualClock.odex with baksmali
2. Edit the file com/sec/android/widgetapp/dualclock/DigitalDualClockView$DigitalClockView.smali
3. Search for the method update()
Code:
.method public update(Z)V
...
.end method
4. Add the following lines in red to the update() method.
Code:
...
iget-object v11, p0, Lcom/sec/android/widgetapp/dualclock/DigitalDualClockView$DigitalClockView;->iv_hour01:Landroid/widget/ImageView;
iget-object v12, p0, Lcom/sec/android/widgetapp/dualclock/DigitalDualClockView$DigitalClockView;->numbers:[I
aget v12, v12, v2
[COLOR="Red"][b]#if hour1 is zero then draw transparent image (0x106000d)
if-nez v2, :cond_b4
const v12, 0x106000d
:cond_b4[/b][/COLOR]
invoke-virtual {v11, v12}, Landroid/widget/ImageView;->setImageResource(I)V
.line 932
iget-object v11, p0, Lcom/sec/android/widgetapp/dualclock/DigitalDualClockView$DigitalClockView;->iv_hour02:Landroid/widget/ImageView;
iget-object v12, p0, Lcom/sec/android/widgetapp/dualclock/DigitalDualClockView$DigitalClockView;->numbers:[I
aget v12, v12, v3
...
5. Recompile and push to /system/app
6. Restart phone.
C) Lock screen
1. Decompile android.policy.odex with baksmali
2. Edit the file com/android/internal/policy/impl/UnlockClockGB.smali
3. Search for the method transformHourData()
Code:
.method private transformHourData(I)Ljava/lang/String;
...
.end method
4. In the transformHourData() method:
Find the line: (x2)
Code:
invoke-direct {p0, p1}, Lcom/android/internal/policy/impl/UnlockClockGB;->checkTimeValue(I)Ljava/lang/String;
Replace with this line: (x2)
Code:
[COLOR="Red"][b]#don't check time value (add zero prefix), convert to string directly
invoke-static {p1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;[/b][/COLOR]
5. Recompile and push to /system/framework
(if using dexopt-wrapper to convert back to odex, remember to add the last argument $BOOTCLASSPATH to the wrapper call)
6. Restart phone.
Enjoy!
Hellow Youth
I Serched quite a lot about how to translate 4way reboot and I could not translated
And tried to add a translator in Framework-res.apk
Under the name of Global_ Action_reboot ... Also is not translated
Please solution ...
{
"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"
}
[/url][/IMG]
Translate to any Language
arabic
france
spain
how to add to staring
1. Backsmali android.policy.jar using smali/backsmali 1.33
2. find in \classout\com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali and edit:
Code:
const-string v2, "[B]Reboot[/B]"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "[B]Hot Boo[/B]t"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "[B]Download[/B]"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "[B]Recovery[/B]"
3. After changes smali and replace classes.dex in your android.policy.jar
4. learn how to search on forum cos this was wroten a lot of times...
MERRY XMASS
jackq said:
1. Backsmali android.policy.jar using smali/backsmali 1.33
2. find in \classout\com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali and edit:
Code:
const-string v2, "[B]Reboot[/B]"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "[B]Hot Boo[/B]t"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "[B]Download[/B]"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "[B]Recovery[/B]"
3. After changes smali and replace classes.dex in your android.policy.jar
4. learn how to search on forum cos this was wroten a lot of times...
MERRY XMASS
Click to expand...
Click to collapse
thanks but all this i know.
I wont to translate in folder valuse staring in framworke-res.apk
pleas help
I asked this question more than once but nobody responded to my question
Try this way.
Add strings in values in framework-res.apk
Example:
<string name="global_action_reboot">Reboot</string>
or
<string name="reboot_reboot">Reboot</string>
Compile framework-res.apk then recompile unsignedframework-res.apk
Now look at public.xml in values folder.
Find all your strings, example:
<public type="string" name="reboot_recovery" id="0x01040134" />
You need id but rememeber delete first 0 after 0x... example look up - 0x1040134
Now baksmali android.policy.jar
Open GlobalActions$SinglePressAction.smali and edit:
const v2, 0xyourID
aput-object v2, v0, v1
const/4 v1, 0x1
const v2, 0xyourID
aput-object v2, v0, v1
const/4 v1, 0x2
const v2, 0xyourID
aput-object v2, v0, v1
const/4 v1, 0x3
const v2, 0xyourID
example const v2, 0x1040134 means reboot from values/strings
Smali and replace classes.dex
Good luck
jackq said:
Try this way.
Add strings in values in framework-res.apk
Example:
<string name="global_action_reboot">Reboot</string>
or
<string name="reboot_reboot">Reboot</string>
Compile framework-res.apk then recompile unsignedframework-res.apk
Now look at public.xml in values folder.
Find all your strings, example:
<public type="string" name="reboot_recovery" id="0x01040134" />
You need id but rememeber delete first 0 after 0x... example look up - 0x1040134
Now baksmali android.policy.jar
Open GlobalActions$SinglePressAction.smali and edit:
const v2, 0xyourID
aput-object v2, v0, v1
const/4 v1, 0x1
const v2, 0xyourID
aput-object v2, v0, v1
const/4 v1, 0x2
const v2, 0xyourID
aput-object v2, v0, v1
const/4 v1, 0x3
const v2, 0xyourID
example const v2, 0x1040134 means reboot from values/strings
Smali and replace classes.dex
Good luck
Click to expand...
Click to collapse
Thank you very much
I tried, but when you work Compiling appeared to me a problem in this log
You attached android.policy.jar and GlobalActions$SinglePressAction.smali so that you can help me pleas.
Compiling android.policy.jar"
Input_jar_to_decompile\android.policy\com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali[4
4,23] mismatched input '"Reboot"' expecting END_METHOD_DIRECTIVE
Click to expand...
Click to collapse
http://www.mediafire.com/?bbfuby52cmmjm33
Remove the text in "". It should just be the ID not the ID then "Reboot" or whatever.
So NOT this....
const v2,0x1040777 "Reboot"
But THIS....
const v2,0x1040777
Sent from my GT-I9100 using Tapatalk 2
Goldieking said:
Remove the text in "". It should just be the ID not the ID then "Reboot" or whatever.
So NOT this....
const v2,0x1040777 "Reboot"
But THIS....
const v2,0x1040777
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
const v2, 0x1040777
not joined
It must look like this. But remember check yours ID in public.xml and put correct ID.
BEFORE:
Code:
# 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
AFTER:
Code:
# 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 v2, 0x1040193
aput-object v2, v0, v1
const/4 v1, 0x1
const v2, 0x1040777
aput-object v2, v0, v1
const/4 v1, 0x2
const v2, 0x1040778
aput-object v2, v0, v1
const/4 v1, 0x3
const v2, 0x1040779
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
Goldieking said:
Remove the text in "". It should just be the ID not the ID then "Reboot" or whatever.
So NOT this....
const v2,0x1040777 "Reboot"
But THIS....
const v2,0x1040777
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
When you press the power button is happening boot loop even though I applied exactly as I said
And after i hope your editor on Mod after Attachments
You need to start using logcat......
Surely reboot though not bootloop? ?
Sent from my GT-I9100 using Tapatalk 2
Goldieking said:
You need to start using logcat......
Surely reboot though not bootloop? ?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Of course reboot
Hey what's up everyone? I've just picked up my One & started modding right away. Here's some mods you can do to Prism.apk ( Sense Launcher ).
first off you need to learn to use apktool or apkmanager, google search & learn how to mod apps first.
First mod is a custom image as your app drawer background
Decompile prism.apk and go to
res/layout/all_apps_pagedview.xml
look for this line
Code:
<com.htc.launcher.pageview.AllAppsPagedView android:id="@id/all_apps_paged_view"
add a background tag like this
Code:
<com.htc.launcher.pageview.AllAppsPagedView android:background="@drawable/appdrawer_background" android:id="@id/all_apps_paged_view"
next put your custom image named appdrawer_background.png into the drawable-xxhdpi folder & recompile your apk
*****************************************
Next is Transparent app drawer background
This one is kinda difficult, but there is an easier method posted here http://forum.xda-developers.com/showpost.php?p=40555206&postcount=16
thanks Ajthescot for sharing
4.1.2 method
decompile Prism.apk and go to /smali/com/htc/launcher
find Launcher.Smali
and look for this method
Code:
.method public updateWallpaperVisibility(Z)V
.locals 8
const/4 v3, 0x0
const/high16 v2, 0x10
iget-boolean v4, p0, Lcom/htc/launcher/Launcher;->m_bAttached:Z
if-nez v4, :cond_1
const-string v2, "Launcher"
const-string v3, "updateWallpaperVisibility - not attached"
invoke-static {v2, v3}, Lcom/htc/launcher/util/Logger;->d(Ljava/lang/String;Ljava/lang/String;)V
:cond_0
:goto_0
return-void
:cond_1
invoke-virtual {p0}, Lcom/htc/launcher/Launcher;->isAddToHomeVisible()Z
move-result v4
if-eqz v4, :cond_2
const/4 p1, 0x1
:cond_2
if-eqz p1, :cond_3
move v1, v2
:goto_1
invoke-virtual {p0}, Lcom/htc/launcher/Launcher;->getWindow()Landroid/view/Window;
move-result-object v4
invoke-virtual {v4}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;
move-result-object v4
iget v4, v4, Landroid/view/WindowManager$LayoutParams;->flags:I
and-int v0, v4, v2
if-eq v1, v0, :cond_0
const-string v4, "Launcher"
const-string v5, "updateWallpaperVisibility: %s"
const/4 v6, 0x1
new-array v6, v6, [Ljava/lang/Object;
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v7
aput-object v7, v6, v3
invoke-static {v4, v5, v6}, Lcom/htc/launcher/util/Logger;->i(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
invoke-virtual {p0}, Lcom/htc/launcher/Launcher;->getWindow()Landroid/view/Window;
move-result-object v3
invoke-virtual {v3, v1, v2}, Landroid/view/Window;->setFlags(II)V
goto :goto_0
:cond_3
move v1, v3
goto :goto_1
.end method
delete this entire method, next use notepad ++ to search for
Code:
updateWallpaperVisibility
remove all lines containing that
example :
Code:
invoke-virtual {v0, v4}, Lcom/htc/launcher/Launcher;->updateWallpaperVisibility(Z)V
next go to Launcher$20.Smali
and again search for
Code:
updateWallpaperVisibility
remove all lines like this
Code:
invoke-virtual {v0, v4}, Lcom/htc/launcher/Launcher;->updateWallpaperVisibility(Z)V
next go to Launcher$24.Smali
do the same as the above file
next go to Workspace.smali
do the same as the above two files
last file in smali is
DragLayer.Smali
search for this
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 5
const/4 v4, 0x0
const/4 v3, 0x0
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
const/4 v1, 0x2
new-array v1, v1, [I
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_naTmpXY:[I
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_resizeFrames:Ljava/util/ArrayList;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_dropAnim:Landroid/animation/ValueAnimator;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_fadeOutAnim:Landroid/animation/ValueAnimator;
new-instance v1, Landroid/view/animation/DecelerateInterpolator;
const/high16 v2, 0x3fc0
invoke-direct {v1, v2}, Landroid/view/animation/DecelerateInterpolator;-><init>(F)V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_cubicEaseOutInterpolator:Landroid/animation/TimeInterpolator;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_dropView:Lcom/htc/launcher/DragView;
iput v4, p0, Lcom/htc/launcher/DragLayer;->m_nAnchorViewInitialScrollX:I
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_anchorView:Landroid/view/View;
iput-boolean v4, p0, Lcom/htc/launcher/DragLayer;->m_bHoverPointClosesFolder:Z
new-instance v1, Landroid/graphics/Rect;
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_rectHit:Landroid/graphics/Rect;
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/htc/launcher/DragLayer;->m_bHotseatVisible:Z
const/high16 v1, 0x3f80
iput v1, p0, Lcom/htc/launcher/DragLayer;->m_fBackgroundAlpha:F
new-instance v1, Landroid/graphics/Rect;
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_rectBackground:Landroid/graphics/Rect;
new-instance v0, Lcom/htc/launcher/FillColorFastBitmapDrawable;
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f020002
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
check-cast v1, Landroid/graphics/drawable/BitmapDrawable;
invoke-virtual {v1}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;
move-result-object v1
const/high16 v2, -0x100
invoke-direct {v0, v1, v2}, Lcom/htc/launcher/FillColorFastBitmapDrawable;-><init>(Landroid/graphics/Bitmap;I)V
invoke-virtual {p0, v0}, Lcom/htc/launcher/DragLayer;->setBackground(Landroid/graphics/drawable/Drawable;)V
invoke-virtual {p0, v4}, Lcom/htc/launcher/DragLayer;->setMotionEventSplittingEnabled(Z)V
return-void
.end method
look for the line I have marked here & change it as I have Told
Code:
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 5
const/4 v4, 0x0
const/4 v3, 0x0
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
const/4 v1, 0x2
new-array v1, v1, [I
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_naTmpXY:[I
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_resizeFrames:Ljava/util/ArrayList;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_dropAnim:Landroid/animation/ValueAnimator;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_fadeOutAnim:Landroid/animation/ValueAnimator;
new-instance v1, Landroid/view/animation/DecelerateInterpolator;
const/high16 v2, 0x3fc0
invoke-direct {v1, v2}, Landroid/view/animation/DecelerateInterpolator;-><init>(F)V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_cubicEaseOutInterpolator:Landroid/animation/TimeInterpolator;
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_dropView:Lcom/htc/launcher/DragView;
iput v4, p0, Lcom/htc/launcher/DragLayer;->m_nAnchorViewInitialScrollX:I
iput-object v3, p0, Lcom/htc/launcher/DragLayer;->m_anchorView:Landroid/view/View;
iput-boolean v4, p0, Lcom/htc/launcher/DragLayer;->m_bHoverPointClosesFolder:Z
new-instance v1, Landroid/graphics/Rect;
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_rectHit:Landroid/graphics/Rect;
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/htc/launcher/DragLayer;->m_bHotseatVisible:Z
const/high16 v1, 0x3f80
iput v1, p0, Lcom/htc/launcher/DragLayer;->m_fBackgroundAlpha:F
new-instance v1, Landroid/graphics/Rect;
invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V
iput-object v1, p0, Lcom/htc/launcher/DragLayer;->m_rectBackground:Landroid/graphics/Rect;
new-instance v0, Lcom/htc/launcher/FillColorFastBitmapDrawable;
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f020002
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
check-cast v1, Landroid/graphics/drawable/BitmapDrawable;
invoke-virtual {v1}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;
move-result-object v1
>>>>>>>>> const/high16 v2, -0x100 <<<< Change from ORIGINAL VALUE to this const/high16 v2, 0x0 >>>>
invoke-direct {v0, v1, v2}, Lcom/htc/launcher/FillColorFastBitmapDrawable;-><init>(Landroid/graphics/Bitmap;I)V
invoke-virtual {p0, v0}, Lcom/htc/launcher/DragLayer;->setBackground(Landroid/graphics/drawable/Drawable;)V
invoke-virtual {p0, v4}, Lcom/htc/launcher/DragLayer;->setMotionEventSplittingEnabled(Z)V
return-void
.end method
Next on to the easy part
res/layouts/feed_view.xml
top line add a background tag like this
Code:
<com.htc.launcher.feeds.view.FeedScrollView android:background="@drawable/blinkfeed_background" android:layout_width="fill_parent" android:layout_height="fill_parent"
add blinkfeed_background.png in drawable-xxhdpi set as you like (mine is solid black)
res/layout/all_apps_pagedview.xml
look for this line
Code:
<com.htc.launcher.pageview.AllAppsPagedView android:id="@id/all_apps_paged_view"
add a background tag like this
Code:
<com.htc.launcher.pageview.AllAppsPagedView android:background="@drawable/appdrawer_background" android:id="@id/all_apps_paged_view"
next put your custom image that is set to your desired level of transparency named appdrawer_background.png into the drawable-xxhdpi folder.
last thing is find automotive_common_app_bkg_top.jpeg & make it 100% transparent & save as a png, then delete the jpeg copy out of the apk
*
For 4.2.2 you can use my method above or Aj's method, both work fine BUT you need to add a tiny bit more code to make it look 100%
go to smali/com/htc/launcher/pageview/AllAppsPagedViewHost.smali find line 85 where it says
Code:
const/high16 v2, -0x100
change it to
Code:
const/high16 v2, 0x0
now recompile your app & Enjoy your transparent app drawer
**************************************************
Next mod, have 7 pages set for use
first go to res/layout/Workspace_page_thumbnail_container.xml
add this to it twice
Code:
<include layout="@layout/workspace_page_thumbnail" />
<include layout="@layout/workspace_page_thumbnail" />
next go to Workspace_pages.xml
add this
Code:
<include android:id="@id/cell0" layout="@layout/workspace_screen" />
and
Code:
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
Next go to res/layout/workspace_page_protected.xml
add this
Code:
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
next go to res/values/ids.xml
add this
Code:
<item type="id" name="cell5">false</item>
next go to smali/com/htc/launcher/model/PagesManager.Smali
find this method & change it as I have marked
Code:
.method private constructor <init>(Landroid/content/Context;)V
.locals 2
const/4 v1, 0x0
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
iput v1, p0, Lcom/htc/launcher/model/PagesManager;->m_nHomeIndex:I
<<<< const/4 v0, 0x6 <<<<< original value const/4 v0, 0x4 >>>>>>>>>>
iput v0, p0, Lcom/htc/launcher/model/PagesManager;->m_nPageCount:I
iput v1, p0, Lcom/htc/launcher/model/PagesManager;->m_nFeedIndex:I
const/4 v0, 0x1
iput v0, p0, Lcom/htc/launcher/model/PagesManager;->m_nWorkspaceId:I
sget-object v0, Lcom/htc/launcher/model/PagesManager$DefaultViewMode;->Feed:Lcom/htc/launcher/model/PagesManager$DefaultViewMode;
iput-object v0, p0, Lcom/htc/launcher/model/PagesManager;->m_defaultViewMode:Lcom/htc/launcher/model/PagesManager$DefaultViewMode;
const/4 v0, 0x0
iput-object v0, p0, Lcom/htc/launcher/model/PagesManager;->m_Handler:Landroid/os/Handler;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/htc/launcher/model/PagesManager;->m_observerList:Ljava/util/List;
iput-object p1, p0, Lcom/htc/launcher/model/PagesManager;->m_context:Landroid/content/Context;
new-instance v0, Landroid/os/Handler;
invoke-direct {v0}, Landroid/os/Handler;-><init>()V
iput-object v0, p0, Lcom/htc/launcher/model/PagesManager;->m_Handler:Landroid/os/Handler;
return-void
.end method
next method
Code:
.method public getMaxPageCount()I
.locals 1
const/4 v0, 0x7 <<<<<<<< change from const/4 v0, 0x5 >>>>>>
return v0
.end method
next go to smali/com/htc/launcher/model/WorkspaceConfiguration.smali
find this
Code:
.field public static final DEFAULT_PAGE_COUNT:I = 0x4
change it to this
Code:
.field public static final DEFAULT_PAGE_COUNT:I = 0x6
find this
Code:
.field private static final MAX_PAGES:I = 0x5
change it to this
Code:
.field private static final MAX_PAGES:I = 0x7
Now find this method & change it as I have marked
Code:
.method public constructor <init>()V
.locals 2
const/4 v1, 0x0
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
<< const/4 v0, 0x6 <<<< original value is this const/4 v0, 0x4
iput v0, p0, Lcom/htc/launcher/model/WorkspaceConfiguration;->m_nPageCount:I
iput v1, p0, Lcom/htc/launcher/model/WorkspaceConfiguration;->m_nHomeIndex:I
iput v1, p0, Lcom/htc/launcher/model/WorkspaceConfiguration;->m_nFeedIndex:I
return-void
.end method
last method for this file
Code:
.method public getMaxPageCount()I
.locals 1
const/4 v0, 0x7 <<<< Change from original of const/4 v0, 0x5 >>>>>
return v0
.end method
last edit go to smali/com/htc/launcher/Launcher.smali
change this
Code:
.field static final SCREEN_COUNT:I = 0x5
to this
Code:
.field static final SCREEN_COUNT:I = 0x7
recompile your apk & enjoy 7 pages of widgets
That's all I have for now, I'll update the thread as I learn more
CREDITS
Onepagebook
*Ajthescot
Thanks, a lot of people don't like to share their knowledge these days
Rayford, will you theme an upcoming Viper Rom ?
PS: Please do !
Great job!!!!!
nice bro, there are still a lot
I just got my home pages turned to 7..
Should you need to declare drawable ID in public.xml for the appdrawer back ground?
Onepagebook said:
nice bro, there are still a lot
I just got my home pages turned to 7..
Should you need to declare drawable ID in public.xml for the appdrawer back ground?
Click to expand...
Click to collapse
Share your findings on the apk, I'll add it to the op And no need to add any public id, it will build it's id when it compiles.
rayford85 said:
Share your findings on the apk, I'll add it to the op And no need to add any public id, it will build it's id when it compiles.
Click to expand...
Click to collapse
YGPM bro
Kevin & Nick @ it again love you guys, and as always love your work.
yeah..still more to come, I receive lots of help from Nick and my TW friend, ici, as well. Thanks buddy
added a mod to have 7 pages set for widgets etc. instead of the default 5. Thanks to Onepagebook.
wich programs we need to decomplie apk ?
I like to have trasparent prism for my ARHD rom and read your instruction ....
I don't think to be able
but ... wanna try
hope you help me
tks mate
jonata said:
wich programs we need to decomplie apk ?
I like to have trasparent prism for my ARHD rom and read your instruction ....
I don't think to be able
but ... wanna try
hope you help me
tks mate
Click to expand...
Click to collapse
I'm not gonna teach you how to do it.
No one taught me. You just gotta keep messing with it till you figure it out. Here is a link to get you started http://forum.xda-developers.com/showthread.php?t=1891686 thats just one guide, google search for other ones. There all over the web.
rayford85 said:
I'm not gonna teach you how to do it.
No one taught me. You just gotta keep messing with it till you figure it out. Here is a link to get you started http://forum.xda-developers.com/showthread.php?t=1891686 thats just one guide, google search for other ones. There all over the web.
Click to expand...
Click to collapse
ok , try to learn
lex_is300 dased14 and myself have done the transparent app drawer we have taken some slack for not releasing it yet but we were trying to perfect it before releasing.
5x6 layouts needed a bit of dimen tweakage to stop icons overlaping dock icons
the custom bg did not fill dock area if you have trans dock
thats fixed.
i shall post my method here in a few as lex_is300 and dased14 have different setups.
in the meantime
heres my dock setup
i use 5 icons plus appdrawer icon
increase docked icon count
my layout
values integers.xml
Code:
<integer name="hotseat_cell_count">5</integer>
changed to
Code:
<integer name="hotseat_cell_count">6</integer>
values/dimens.xml
reduce padding
Code:
<dimen name="button_bar_width_left_padding">16.0dip</dimen>
<dimen name="button_bar_width_right_padding">16.0dip</dimen>
changed to
Code:
<dimen name="button_bar_width_left_padding">2.0dip</dimen>
<dimen name="button_bar_width_right_padding">2.0dip</dimen>
move dock icon position
values integers.xml
Code:
<integer name="hotseat_all_apps_index">4</integer>
changed to
Code:
<integer name="hotseat_all_apps_index">5</integer>
{
"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"
}
Ajthescot said:
lex_is300 dased14 and myself have done the transparent app drawer we have taken some slack for not releasing it yet but we were trying to perfect it before releasing.
5x6 layouts needed a bit of dimen tweakage to stop icons overlaping dock icons
the custom bg did not fill dock area if you have trans dock
thats fixed.
i shall post my method here in a few as lex_is300 and dased14 have different setups.
in the meantime
heres my dock setup
i use 5 icons plus appdrawer icon
increase docked icon count
my layout
values integers.xml
Code:
<integer name="hotseat_cell_count">5</integer>
changed to
Code:
<integer name="hotseat_cell_count">6</integer>
values/dimens.xml
reduce padding
Code:
<dimen name="button_bar_width_left_padding">16.0dip</dimen>
<dimen name="button_bar_width_right_padding">16.0dip</dimen>
changed to
Code:
<dimen name="button_bar_width_left_padding">2.0dip</dimen>
<dimen name="button_bar_width_right_padding">2.0dip</dimen>
move dock icon position
values integers.xml
Code:
<integer name="hotseat_all_apps_index">4</integer>
changed to
Code:
<integer name="hotseat_all_apps_index">5</integer>
Click to expand...
Click to collapse
Thanks for sharing. I'm real curious to see how you guys did the app drawer transparent. It was a nightmare to figure out
Sent from my HTC One using xda premium
credits to lex_is300 dased14 and myself we have had transparent app drawer for couple of weeks but wanted to perfect it more before releasing it
like the op we all have different methods but this is my personal take on it.
this is my edits based on 5x6 app drawer
all dimen edits are based on this
if you use this mod please give credits to lex_is300 dased14 and myself
layouts .xmlshotseat.xml
Code:
<ImageView android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="@dimen/button_bar_height_without_padding" android:src="@drawable/home_nav_bg" android:scaleType="fitXY" />
to
Code:
<ImageView android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="@dimen/button_bar_height_without_padding[COLOR="Red"]2[/COLOR]" android:src="@drawable/home_nav_bg" android:scaleType="fitXY" />
all_apps_paged_view.xml
Code:
<com.htc.launcher.pageview.AllAppsPagedViewHost android:id="@id/all_apps_paged_view_frame" android:layout_width="fill_parent" android:layout_height="fill_parent"
to
Code:
<com.htc.launcher.pageview.AllAppsPagedViewHost android:id="@id/all_apps_paged_view_frame" [COLOR="red"]android:background="@drawable/custom"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent"
values xmlsthis edits fills the dock area with the custom bg for those with trans dock.
dimens.xml
Code:
<dimen name="button_bar_height_without_padding">55.0dip</dimen>
to
Code:
<dimen name="button_bar_height_without_padding">[COLOR="Red"]0.0dip[/COLOR]</dimen>
add this new line
Code:
<dimen name="button_bar_height_without_padding2">55.0dip</dimen>
styles.xml<style name="DropTargetBar">
add this
Code:
<item name="android:background">#98000000</item>
edit to suit your level of transparency
smali
com/android/htc/launcher
line numbers based on vts layout
Draglayer.smali
line 195 on 1.28 base
or line 156 on 1.29.401.12 base
const/high16 v2, -0x100
change to
const/high16 v2, 0x0
launcher.smali
line 21566 on 1.28 base
or line 15353 on 1.29.401.12 base
const/high16 v2, 0x10
change to
const/high16 v2, 0x0
line numbers may change on different versions of prism
drawables xxhdpi
add
custom backgound named custom.png
edit to your desired transparency
edit
automotive_common_app_bkg_top
to desired transparency this is blinkfeed and appdrawer clock bg
change home_nav_bg.jpg to home_nav_bg.png and edit transparency
if using 5x6 appdrawer you are gonna have an ugly mess of icons overlapping with tranparent docks.
values dimens.xml
Code:
<dimen name="config_allAppsTabbedPageLayoutPaddingTop">18.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingBottom">4.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingLeft">0.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingRight">0.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingTop_alt">35.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingBottom_alt">10.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingLeft_alt">0.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingRight_alt">0.0dip</dimen>
<dimen name="page_view_icon_cell_width">75.0dip</dimen>
<dimen name="page_view_icon_cell_height">90.0dip</dimen>
to
Code:
<dimen name="config_allAppsTabbedPageLayoutPaddingTop">18.5dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingBottom">35.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingLeft">16.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingRight">16.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingTop_alt">35.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingBottom_alt">50.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingLeft_alt">30.0dip</dimen>
<dimen name="config_allAppsTabbedPageLayoutPaddingRight_alt">30.0dip</dimen>
<dimen name="allapps_edit_layout_page_spacing">100.0dip</dimen>
<dimen name="page_view_icon_cell_width">85.0dip</dimen>
<dimen name="page_view_icon_cell_height">87.0dip</dimen>
now the text may be overlaping or cut off screen
edit to your suited size
Code:
<dimen name="shortcut_label_l">12.0sp</dimen>
mine i have set to
Code:
<dimen name="shortcut_label_l">8.0sp</dimen>
Ajthescot said:
lex_is300 dased14 and myself have done the transparent app drawer we have taken some slack for not releasing it yet but we were trying to perfect it before releasing.
5x6 layouts needed a bit of dimen tweakage to stop icons overlaping dock icons
the custom bg did not fill dock area if you have trans dock
thats fixed.
i shall post my method here in a few as lex_is300 and dased14 have different setups.
in the meantime
heres my dock setup
i use 5 icons plus appdrawer icon
increase docked icon count
my layout
values integers.xml
Code:
<integer name="hotseat_cell_count">5</integer>
changed to
Code:
<integer name="hotseat_cell_count">6</integer>
values/dimens.xml
reduce padding
Code:
<dimen name="button_bar_width_left_padding">16.0dip</dimen>
<dimen name="button_bar_width_right_padding">16.0dip</dimen>
changed to
Code:
<dimen name="button_bar_width_left_padding">2.0dip</dimen>
<dimen name="button_bar_width_right_padding">2.0dip</dimen>
move dock icon position
values integers.xml
Code:
<integer name="hotseat_all_apps_index">4</integer>
changed to
Code:
<integer name="hotseat_all_apps_index">5</integer>
Click to expand...
Click to collapse
really beatifull !
my compliments ...... love this trasparent navbar !
nice work on the 5 icons dock ..
are those showing also on locksreen ???
Dougi said:
nice work on the 5 icons dock ..
are those showing also on locksreen ???
Click to expand...
Click to collapse
thanks bud lockscreen is still only 4
Ajthescot said:
thanks bud lockscreen is still only 4
Click to expand...
Click to collapse
thanks for the reply...
Sssuupp my men Ray how are you , nice OP there
Ray , do you think there are still M10 in sense 5 ??? i thought no, but after searching, reading and understanding the new sense 5 files , i'm now sure there are M10 files....
what do you think ?? .. ( this question goes out to all themers and advanced users.. )
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.
Today i am presenting HeadsUp tut
For LP click here
This is For MM only Devices
All you need is Patience
deodexed SystemUI.apk
1. Decompile SystemUI.apk
2. Now Open smali/com/android/systemui/statusbar/policy/HeadsUpManager.smali
In this find this line:
Code:
# instance fields
Add the following lines below this:
Code:
.field private mDefaultHeadsUpNotificationDecay:I
3. Then find the below line and remove delete the part that says “final”:
Code:
.field private final mHeadsUpNotificationDecay:I
So it look like
Code:
.field private mHeadsUpNotificationDecay:I
4. Find this line:
Code:
# direct methods
5. Add these two entire methods below this:
Code:
.method static synthetic -get1(Lcom/android/systemui/statusbar/policy/HeadsUpManager;)Landroid/content/Context;
.locals 1
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic -set0(Lcom/android/systemui/statusbar/policy/HeadsUpManager;I)I
.locals 0
iput p1, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mHeadsUpNotificationDecay:I
return p1
.end method
6. Find this line:
Code:
iput v1, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mMinimumDisplayTime:I
Below this, you will see these two lines:
Code:
const v1, 0x7f0d0012
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getInteger(I)I
Delete these two lines and replace them with the following code:
Code:
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string/jumbo v2, "heads_up_timeout"
iget-object v3, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x7f0d0012 #<public type="integer" name="heads_up_notification_decay" id="0x7f0d0012" />
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getInteger(I)I
move-result v3
const/4 v4, -0x3
invoke-static {v1, v2, v3, v4}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
7. Save it and close
8. Now open smali/com/android/systemui/statusbar/policy/HeadsUpManager$HeadsUpEntry.smali
9. Find the following line:
Code:
.method public updateEntry()V
Directly below this line you will find this line:
Code:
.locals 10
10. Take that line and replace it with this entire block of code (make sure to replace the commented public ID):
Code:
.locals 11
iget-object v6, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager$HeadsUpEntry;->this$0:Lcom/android/systemui/statusbar/policy/HeadsUpManager;
iget-object v7, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager$HeadsUpEntry;->this$0:Lcom/android/systemui/statusbar/policy/HeadsUpManager;
invoke-static {v7}, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->-get1(Lcom/android/systemui/statusbar/policy/HeadsUpManager;)Landroid/content/Context;
move-result-object v7
invoke-virtual {v7}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v7
const-string/jumbo v8, "heads_up_timeout"
iget-object v9, p0, Lcom/android/systemui/statusbar/policy/HeadsUpManager$HeadsUpEntry;->this$0:Lcom/android/systemui/statusbar/policy/HeadsUpManager;
invoke-static {v9}, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->-get1(Lcom/android/systemui/statusbar/policy/HeadsUpManager;)Landroid/content/Context;
move-result-object v9
invoke-virtual {v9}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v9
const v10, 0x7f0d0012 #<public type="integer" name="heads_up_notification_decay" id="0x7f0d0012" />
invoke-virtual {v9, v10}, Landroid/content/res/Resources;->getInteger(I)I
move-result v9
const/4 v10, -0x3
invoke-static {v7, v8, v9, v10}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v7
invoke-static {v6, v7}, Lcom/android/systemui/statusbar/policy/HeadsUpManager;->-set0(Lcom/android/systemui/statusbar/policy/HeadsUpManager;I)I
11. Save, recompile, and replace
For setting Please go for Next post
Thanks to @Bloodlvst for this tut possible
my respect to you
Settings
Download this setting
Click here
...
If you want to add by settings as default ?
then learn to do guys
follow this guide
[Guide][New Learners Basics] [LP/MM/+] Create settings preferences and subsettings
cause i had limited time brothers
hope you get me
Dont forgot to tag me if you use my work
hello
thank you for this tut
i have edited and compiled SystemUi.apk and it's working
but to control the settings i have added i wanted to install your app from the second post , Right?
the problem is that the app is not installing
i don't have speruser mod
please post a tut on how to add the control app into main setting
PS: am working on my HTC desire 820 (MM 6.0.1)
Thanks in Advance
Edit: after deodexing my rom and got superuser mod the control app is working
please post a tut on how to add the control app into main setting.....