Related
hello guys im here to share my knowledge since alot off member ask for this mod i mean how to added this option to ur rom
its not hards guide but seems like u must have EPM [extended power menu] first before do this mod go to this threads for futher info how to added EPM to your rom http://forum.xda-developers.com/archive/index.php/t-811532.html or u can experimenting by this mod
here original threads about 4wayboot itself http://forum.xda-developers.com/showthread.php?t=1573032
Requirment:
-Brains
-Patient
-notepad++
-apktool,baksmali.jar or vts(use vts its awesome)
-attached file
ok here we go:
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$5;" ( some roms might have different number on shutdown button. You find right one by for example tracing shutdown icon id )
-Change number 5 to 99 ( two of them )
Before
Code:
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$5;
const v3, 0x1080030
const v4, 0x1040121
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$5;->(Lcom/android/internal/policy/impl/GlobalActions;II)V
After
Code:
Code:
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$99;
const v3, 0x1080030
const v4, 0x1040121
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:
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:
Code:
.method static constructor <clinit>()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:
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, 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 u are done
enjoy ur new mod
ss:
http://img.tapatalk.com/6703df6f-8b96-e620.jpg
enjoy
this is the mod file requireds
http://forum.xda-developers.com/attachment.php?attachmentid=974608&d=1333178584
credit:
untermensch(EPM mod GUide)
kahvitahra(4way boot mod):good::highfive::laugh:
reserved for future mod:
How to change shutdown method popup name to everything u desire
open globalaction$99
it look like this
# virtual methods
.method public onPress()V
.registers 7
const/4 v5, 0x5
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/GlobalActionsLandroid/content/Context;
move-result-object v2
invoke-direct {v1, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/ContextV
const-string v2, "shutdown Method" ---------------------------(change this to your desire menu name)
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequenceLandroid/app/AlertDialog$Builder;
move-result-object v1 bla bla bla.......
Click to expand...
Click to collapse
const-string v2, "shutdown Method" (change this to your desire menu name)
recompile and enjoy
reserved for Q&A
Q: When I press restart/shutdown button I can only see title and "ok" and "cancel" -buttons. See photo
{
"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"
}
A: You have incorrect number of empty lines between lines you pasted in GlobalActions$SinglePressAction.smali. You should have two (2) empty lines to previous "# annotations" and to next "# instance fields" from "# static fields" that you pasted.
Also check that added method have <clinit> at the end. See following screenshot.
Thanks to chudy_85 and mialwe for pointing these to all. [/QUOTE]
reserved for fun
Thank's for create a 4way boot
:thumbup::thumbup:
Sent from my GT-S5360 using xda app-developers app
GREATE GUIDE
work in galaxymini sir ?
For gb only bro
Sent from my GT-S5360 using xda app-developers app
evanlocked said:
reserved for fun
Click to expand...
Click to collapse
One night with 4 cup of coffee to find "id's" on public.xml...... :laugh::laugh:
zalzondabuzz said:
One night with 4 cup of coffee to find "id's" on public.xml...... :laugh::laugh:
Click to expand...
Click to collapse
Monggo brad patient on it
Sent from my GT-S5360 using xda premium
This is definitely a must-try. Thanks for this.
bumslayer said:
This is definitely a must-try. Thanks for this.
Click to expand...
Click to collapse
Yow bro its usefull insteads epm its hards to do,
This method more simple than epm
Sent from my GT-S5360 using xda premium
thanks bro! nice guide! i manage to make it for COD Rom. cheers!:good:
ianczarina said:
thanks bro! nice guide! i manage to make it for COD Rom. cheers!:good:
Click to expand...
Click to collapse
Sure bro just try it
Sent from my GT-S5360 using xda premium
ianczarina said:
thanks bro! nice guide! i manage to make it for COD Rom. cheers!:good:
Click to expand...
Click to collapse
Did you have to do the EPM mod as well in order to make it work. I skipped it because my eyes were getting watery and my head was spinning. However, 4way-boot didn't work for me. I guess evanlocked was right when he said the EPM mod is needed.
bumslayer said:
Did you have to do the EPM mod as well in order to make it work. I skipped it because my eyes were getting watery and my head was spinning. However, 4way-boot didn't work for me. I guess evanlocked was right when he said the EPM mod is needed.
Click to expand...
Click to collapse
No bro u can trick it I think u must tracing ur power off icon I'd first in ur framework then change it
Sent from my GT-S5360 using xda app-developers app
@bumslayers he made it posted for cod rom :good:
Sent from my GT-S5360 using xda app-developers app
Well I managed to make it work without making the very difficult EPM mod, hurray! Thank you so much, evanlocked!
However, download mode does not work on my deodexed DXLF2 ROM. Any ideas?
bumslayer said:
Well I managed to make it work without making the very difficult EPM mod, hurray! Thank you so much, evanlocked!
However, download mode does not work on my deodexed DXLF2 ROM. Any ideas?
Click to expand...
Click to collapse
Post ss here I wanna see bro
Edit:download mode not exactly works its becouse the path of it same like lidroid rom download mode not work properly
Sent from my GT-S5360 using xda app-developers app
EPM is hard.Should invest some time on it.May be this weekend.
sent while doin' some burnouts
b16h22 said:
EPM is hard.Should invest some time on it.May be this weekend.
sent while doin' some burnouts
Click to expand...
Click to collapse
Nope bro u can implement 4way boot by seeking the poweroff icon I'd in ur frameworks like bumslayers did he already implemented it without epm in stock deodexed dxlf2
Sent from my GT-S5360 using xda app-developers app
SONY SMALL APPS FOR CM BASED ROM
1-STEP
decompile framework-res.apk
goto res/values/strings.xml and add these lines a the end
Code:
<string name="permlab_externalTaskSwitcher">Start as an external task switcher</string>
<string name="permdesc_externalTaskSwitcher">Allows the application to be an external task switcher replacing the native task switcher</string>
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
open AndroidManifest.xml
and add the following lines
Code:
<permission android:name="android.permission.SYSTEM_ALERT_WINDOW" android:label="@string/permlab_systemAlertWindow" android:description="@string/permdesc_systemAlertWindow" android:protectionLevel="dangerous" android:permissionGroup="android.permission-group.SYSTEM_TOOLS" />
and
Code:
<permission android:name="com.sony.smallapp.permission.SMALLAPP" android:label="@string/permlab_smallapp" android:description="@string/permdesc_smallapp" android:protectionLevel="dangerous" />
like this shown in the pic..
{
"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"
}
done recompile the framework-res.apk
2-STEP
decompile android.policy.jar
and open comandroidinternalpolicyimplPhoneWindowManager.smal
and add the red marked lines
Code:
.field static final RECENT_APPS_BEHAVIOR_DISMISS_AND_SWITCH:I = 0x3
.field static final RECENT_APPS_BEHAVIOR_EXIT_TOUCH_MODE_AND_SHOW:I = 0x1
.field static final RECENT_APPS_BEHAVIOR_SHOW_OR_DISMISS:I = 0x0
.field static final SHOW_PROCESSES_ON_ALT_MENU:Z = false
.field static final SHOW_STARTING_ANIMATIONS:Z = true
[COLOR="red"].field static final SMALLAPP_LAYER:I = 0x3[/COLOR]
.field public static final SYSTEM_DIALOG_REASON_ASSIST:Ljava/lang/String; = "assist"
.field public static final SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS:Ljava/lang/String; = "globalactions"
.field public static final SYSTEM_DIALOG_REASON_HOME_KEY:Ljava/lang/String; = "homekey"
.field public static final SYSTEM_DIALOG_REASON_KEY:Ljava/lang/String; = "reason"
.field public static final SYSTEM_DIALOG_REASON_RECENT_APPS:Ljava/lang/String; = "recentapps"
and find these lines in the same file.
Code:
[COLOR="Blue"].method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;)I
.locals 4
.parameter "attrs"
.prologue
const/4 v2, 0x0
.line 1588
iget v1, p1, Landroid/view/WindowManager$LayoutParams;->type:I
.line 1590
.local v1, type:I
const/16 v3, 0x7d0
if-lt v1, v3, :cond_0
const/16 v3, 0xbb7
if-le v1, v3, :cond_1
.line 1622
:cond_0
:goto_0
return v2
.line 1594
:cond_1
const/4 v0, 0x0
.line 1595
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
.line 1614
const-string v0, "android.permission.INTERNAL_SYSTEM_WINDOW"
.line 1616
:goto_1
:sswitch_0
if-eqz v0, :cond_0
.line 1617
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v3, v0}, Landroid/content/Context;->checkCallingOrSelfPermission(Ljava/lang/String;)I
move-result v3
if-eqz v3, :cond_0
.line 1619
const/4 v2, -0x8
goto :goto_0
.line 1611
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1612
goto :goto_1
.line 1595
nop
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0x7e7 -> :sswitch_0
.end sparse-switch
.end method[/COLOR]
no is the funny part replace all the above blue marked lines with the below red marked lines
Code:
[COLOR="red"].method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;)I
.locals 4
.parameter "attrs"
.prologue
const/4 v2, 0x0
.line 1115
iget v1, p1, Landroid/view/WindowManager$LayoutParams;->type:I
.line 1117
.local v1, type:I
const/16 v3, 0x7d0
if-lt v1, v3, :cond_0
const/16 v3, 0xbb7
if-le v1, v3, :cond_1
.line 1152
:cond_0
:goto_0
return v2
.line 1121
:cond_1
const/4 v0, 0x0
.line 1122
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
.line 1144
const-string v0, "android.permission.INTERNAL_SYSTEM_WINDOW"
.line 1146
:goto_1
:sswitch_0
if-eqz v0, :cond_0
.line 1147
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v3, v0}, Landroid/content/Context;->checkCallingOrSelfPermission(Ljava/lang/String;)I
move-result v3
if-eqz v3, :cond_0
.line 1149
const/4 v2, -0x8
goto :goto_0
.line 1137
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1138
goto :goto_1
.line 1141
:sswitch_2
const-string v0, "com.sony.smallapp.permission.SMALLAPP"
.line 1142
goto :goto_1
.line 1122
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0xbb5 -> :sswitch_2
0xbb6 -> :sswitch_2
.end sparse-switch
.end method[/COLOR]
save it..done now recompile the android.policy.jar
3-STEP
decompile framework.jar
add the whole sony folder (provided in the resources.zip attached below ) in classout/com
and recompile framework.jar
4-STEP
now u need to add some files in system/app
system/etc
system/framework
all the files are provided in resources.zip so just take them and add those files in ur flashable zip
5-STEP
once u flash the mod .u need an Slauncher app to launch the small apps...download it from google play
so its done enjoy the smalls on cm based roms..
This method is tested working on most xperia devices and GALAXY SL
CREDITS
c3ma138 (for help , resources , app)
XDA:DevDB Information
[guide] how to port sony small apps for cm based roms, a App for the Samsung Galaxy S III I9300
Contributors
sandy7
Version Information
Status: Stable
Created 2013-09-06
Last Updated 2013-09-06
some screens
will it works on xperia ray cm10 fxp 214??
TheDynamiteGuy said:
will it works on xperia ray cm10 fxp 214??
Click to expand...
Click to collapse
for ray i have made a guide here http://forum.xda-developers.com/showthread.php?t=2122258
I wonder if this method(main idea) will work for touchpizz based firmwares mate,have to check sometime
anyway good work as always :good:
ThilinaC said:
I wonder if this method(main idea) will work for touchpizz based firmwares mate,have to check sometime
anyway good work as always :good:
Click to expand...
Click to collapse
Just a small contribution like u to bring some sony stuff to this forum..
But for touch never tried by me or by other..y not give a try...
Sent from my SK17i using XDA Premium HD app
There's no a tutorial that teaches you to place the Recents Menu Small app's custom?
lukakas said:
There's no a tutorial that teaches you to place the Recents Menu Small app's custom?
Click to expand...
Click to collapse
What?
Sent from my SK17i using XDA Premium HD app
sandy7 said:
What?
Sent from my SK17i using XDA Premium HD app
Click to expand...
Click to collapse
Sorry for my bad english but wanted to say if there a mod for "Recent app" menu like Sony with small app
lukakas said:
Sorry for my bad english but wanted to say if there a mod for "Recent app" menu like Sony with small app
Click to expand...
Click to collapse
Once tried it....but opening the recent apps the phone freezes there...me and other guy are working it..if succesful...ill post the new tut
Sent from my SK17i using XDA Premium HD app
sandy7 said:
Once tried it....but opening the recent apps the phone freezes there...me and other guy are working it..if succesful...ill post the new tut
Sent from my SK17i using XDA Premium HD app
Click to expand...
Click to collapse
This is incredible for working on it ... hope you can successfully do it.
Help
Hi guys,please help me,i followed this guide,decompiled all files,changed and compiled,android-policy.jar and framework.jar are compiled well,but framework-res.apk wont compile,can anyone make it for me please? Thank you.
Here is my framework-res.apk http://d-h.st/Wxv
What's up everyone, adding apps to the settings menu seems to have been really popular as of recently so here's a tutorial on adding apps to the settings menu for Sense 5. Normally, you would just have to modify XML code in settings_headers.xml like in previous Sense versions and other OEMs, but as of recent, HTC likes to put everything in java code...
So let's get to it
PART 1
First off, we are going to modify the app you want to add to the settings menu. I will use my app called "Axis Tweaks" as an example. So decompile the app, open up the AndroidManifest.xml, and look for the following line:
Code:
package="com.axis.tweaks"
Now that you found the name of the package, you will need to change this code:
Code:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
to this:
NOTE: The blue part will vary depending on the name of the package.
Code:
<intent-filter>
<action android:name="[COLOR="Blue"]com.axis.tweaks[/COLOR].action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
That's all we need to do with your app so recompile it. You also need to sign the app because you just modified the AndroidManifest.xml.
PART 2
Now we're going to decompile Settings.apk. This is where the majority of the work happens. After you decompile Settings.apk, navigate to res/values/ids.xml
Add the following id:
Code:
<item type="id" name="axis_tweaks">false</item>
Now, navigate to res/values/strings.xml and add the following line:
Code:
<string name="axis_tweaks">Tweaks</string>
Now, navigate to res/values/drawable-xxhdpi and drop in a PNG file. I called mine: ic_settings_axis_tweaks.png
After all that, recompile Settings.apk and immediately decompile your new Settings.apk
PART 3
In your new Settings.apk, navigate to smali/com/android/settings/framework/activity and open HtcGenericEntryProvider.smali
Add the green section to this file:
Code:
invoke-static {v2, v3, p1}, Lcom/android/settings/framework/activity/HtcGenericEntryProvider;->addWrapHeader(Lcom/android/settings/framework/activity/HtcWrapHeader;FLcom/android/settings/framework/activity/HtcWrapHeaderList;)Z
invoke-static {}, Lcom/android/settings/framework/activity/HtcWrapHeaderInfo;->getTransferMyStuff()Lcom/android/settings/framework/activity/HtcWrapHeader;
[COLOR="SeaGreen"]
move-result-object v2
add-int/lit8 v0, v1, 0x1
int-to-float v3, v1
invoke-static {v2, v3, p1}, Lcom/android/settings/framework/activity/HtcGenericEntryProvider;->addWrapHeader(Lcom/android/settings/framework/activity/HtcWrapHeader;FLcom/android/settings/framework/activity/HtcWrapHeaderList;)Z
invoke-static {}, Lcom/android/settings/framework/activity/HtcWrapHeaderInfo;->getTweaks()Lcom/android/settings/framework/activity/HtcWrapHeader;[/COLOR]
move-result-object v2
add-int/lit8 v1, v0, 0x1
Save that file and now open HtcWrapHeaderInfo.smali
Locate this method:
Code:
.method static getTransferMyStuff()Lcom/android/settings/framework/activity/HtcWrapHeader;
Add this new method right under that one:
Code:
[COLOR="SeaGreen"].method static getTweaks()Lcom/android/settings/framework/activity/HtcWrapHeader;
.locals 4
new-instance v0, Lcom/android/settings/framework/activity/HtcWrapHeader;
invoke-direct {v0}, Lcom/android/settings/framework/activity/HtcWrapHeader;-><init>()V
sget-object v1, Lcom/android/settings/framework/activity/HtcWrapHeader$Type;->NORMAL:Lcom/android/settings/framework/activity/HtcWrapHeader$Type;
iput-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->type:Lcom/android/settings/framework/activity/HtcWrapHeader$Type;
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const-wide/32 v2, [COLOR="blue"]0x7f0802bc # id[/COLOR]
iput-wide v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->id:J
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const v2, [COLOR="blue"]0x7f0201cb # drawable[/COLOR]
iput v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->iconRes:I
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const v2, [COLOR="blue"]0x7f0b1078 # string[/COLOR]
iput v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->titleRes:I
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
new-instance v2, Landroid/content/Intent;
const-string v3, "android.intent.action.MAIN"
invoke-direct {v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v3, "[COLOR="Blue"]com.axis.tweaks.action.MAIN[/COLOR]"
invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
move-result-object v2
iput-object v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->intent:Landroid/content/Intent;
const-string v1, "[COLOR="blue"]axis[/COLOR]"
iput-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->anchor:Ljava/lang/String;
invoke-static {}, Lcom/android/settings/framework/app/HtcSettingsApplication;->getApplication()Landroid/app/Application;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/android/settings/framework/activity/HtcWrapHeader;->prepareExtraInfo(Landroid/content/Context;)V
return-object v0
.end method[/COLOR]
The parts in BLUE are unique to you and you must change them accordingly. You can find your hex values in res/values/public.xml.
Example (all hex strings are in public.xml):
Code:
0x7f0802bc # id ----------------------------- locate the hex string for the ID you set for your app
0x7f0201cb # drawable ------------------- locate the hex string for the PNG you set for your app
0x7f0b1078 # string ------------------------ locate the hex string for the string you set for your app
com.axis.tweaks.action.LAUNCH ---- replace with what you added to the Manifest
axis ---------------------------------------------- rename this to whatever you want
You are done! Thanks chrisch
Maybe add how to add a custom tab to the settings menu? Just figured it out...
{
"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"
}
thanks...but some screenshoots might helpful & interesting ..
Thanks, in you opinion is possible add a new button (to launch new apk) in notification bar? If yes, do you know how?
wzu7 said:
thanks...but some screenshoots might helpful & interesting ..
Click to expand...
Click to collapse
I agree.
wzu7 said:
thanks...but some screenshoots might helpful & interesting ..
Click to expand...
Click to collapse
SkizzMcNizz said:
I agree.
Click to expand...
Click to collapse
Added
where is located the position of the entry? e.g. wifi-app over wifi-settings or tweak-app over htc-personalize-entry
Hmm, i try this with TD ROM 7.0.0 but dont work
Kiray1982 said:
where is located the position of the entry? e.g. wifi-app over wifi-settings or tweak-app over htc-personalize-entry
Click to expand...
Click to collapse
The order of the items in the Settings menu is in HtcGenericEntryProvider.smali so you will have to look in there for how to organize stuff. In my example, my code is directly under getTransferMyStuff, thus my tweaks app shows up beneath the Transfer option in Settings.
Atze001 said:
Hmm, i try this with TD ROM 7.0.0 but dont work
Click to expand...
Click to collapse
Make sure your IDs are set correctly with what's in public.xml. I did this multiple times and confirmed that it works.
Hero said:
Make sure your IDs are set correctly with what's in public.xml. I did this multiple times and confirmed that it works.
Click to expand...
Click to collapse
I will take a look
---------- Post added at 08:05 PM ---------- Previous post was at 08:00 PM ----------
Hmm, Everything seems to be correct.
---------- Post added at 08:07 PM ---------- Previous post was at 08:05 PM ----------
I upload my files to dropbox. Can you take a look? In "system/app" are the two files settings and superuser
https://www.dropbox.com/s/71kh9olbf614fsq/PrivatUpdate.zip
Superuser.txt contains litte hints for me
If this works your next step is to create submenus to settings i hope
Nice work @Hero. Good to see that pointing you in the right direction helped you
@Hero don't work for me. Can you look in this file
https://dl.dropboxusercontent.com/u/72778206/Settings.apk
I updated the OP with the correct code. So for those of you who tried the mod and it didn't work - it should now. Sorry about that. Also, I just figured out how to add a custom tab to the settings menu so I'll be updating my "reserved" post with instructions on how to do that a little later on.
chrisch1974 said:
Nice work Hero. Good to see that pointing you in the right direction helped you
Click to expand...
Click to collapse
Many thanks :good:
acer73 said:
@Hero don't work for me. Can you look in this file
https://dl.dropboxusercontent.com/u/72778206/Settings.apk
Click to expand...
Click to collapse
From what I can tell, you don't have any of the smali code from the OP in your Settings.apk. Correct me if I'm wrong.
Hero said:
I updated the OP with the correct code. So for those of you who tried the mod and it didn't work - it should now. Sorry about that. Also, I just figured out how to add a custom tab to the settings menu so I'll be updating my "reserved" post with instructions on how to do that a little later on.
Many thanks :good:
From what I can tell, you don't have any of the smali code from the OP in your Settings.apk. Correct me if I'm wrong.
Click to expand...
Click to collapse
@Hero, please tell me where i jump smali code. I'm going crazy to understand. Thanks
Hero said:
I updated the OP with the correct code. So for those of you who tried the mod and it didn't work - it should now. Sorry about that. Also, I just figured out how to add a custom tab to the settings menu so I'll be updating my "reserved" post with instructions on how to do that a little later on.
Many thanks :good:
From what I can tell, you don't have any of the smali code from the OP in your Settings.apk. Correct me if I'm wrong.
Click to expand...
Click to collapse
do you know how to add menu on homescreen and custom entries in that menu on sense 5 ?
JEANRIVERA said:
do you know how to add menu on homescreen and custom entries in that menu on sense 5 ?
Click to expand...
Click to collapse
What do you mean adding a menu to the homescreen? So far, I only know how to add a custom app to the settings menu and a custom tab to the settings menu (no guide for adding a custom tab to the settings menu yet).
Hero said:
What do you mean adding a menu to the homescreen? So far, I only know how to add a custom app to the settings menu and a custom tab to the settings menu (no guide for adding a custom tab to the settings menu yet).
Click to expand...
Click to collapse
This is what I mean it is not present on stock Rom just on some custom roms
Sent from my HTC One using Tapatalk 2
Settings Menu Background
Is there a script change to change the background colour of the settings menu ???
Any help appreciated.
Thanks,
Yans
Ok, maybe you can help. Using your tutorial I add all items. My new entry shows up but I'm getting an error when tapping it. Code is below
AndroidManifest.xml intent of my app I want to launch
Code:
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN"
<action android:name="com.jmz.led.enabler.LAUNCH" />
</intent-filter>
My HtcWrapHeaderInfo.smali method
Code:
.method static getTweaks()Lcom/android/settings/framework/activity/HtcWrapHeader;
.locals 4
new-instance v0, Lcom/android/settings/framework/activity/HtcWrapHeader;
invoke-direct {v0}, Lcom/android/settings/framework/activity/HtcWrapHeader;-><init>()V
sget-object v1, Lcom/android/settings/framework/activity/HtcWrapHeader$Type;->NORMAL:Lcom/android/settings/framework/activity/HtcWrapHeader$Type;
iput-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->type:Lcom/android/settings/framework/activity/HtcWrapHeader$Type;
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const-wide/32 v2, 0x7f080296 # id
iput-wide v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->id:J
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const v2, 0x7f0201f7 # drawable
iput v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->iconRes:I
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const v2, 0x7f0b0f80 # string
iput v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->titleRes:I
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
new-instance v2, Landroid/content/Intent;
const-string v3, "android.intent.action.MAIN"
invoke-direct {v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v3, "com.jmz.led.enabler.action.LAUNCH"
invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
move-result-object v2
iput-object v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->intent:Landroid/content/Intent;
const-string v1, "jmz"
iput-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->anchor:Ljava/lang/String;
invoke-static {}, Lcom/android/settings/framework/app/HtcSettingsApplication;->getApplication()Landroid/app/Application;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/android/settings/framework/activity/HtcWrapHeader;->prepareExtraInfo(Landroid/content/Context;)V
return-object v0
.end method
And my error message in logcat
W/System.err(15369): android.content.ActivityNotFoundException: No Activity foun
d to handle Intent { act=com.jmz.led.enabler.action.LAUNCH }
I/ActivityManager( 552): START {act=com.jmz.led.enabler.action.LAUNCH u=0} from
pid 15369
W/System.err(15369): at android.app.Instrumentation.checkStartActivityResult(
Instrumentation.java:1671)
W/System.err(15369): at android.app.Instrumentation.execStartActivity(Instrum
entation.java:1542)
W/System.err(15369): at android.app.Activity.startActivityForResult(Activity.
java:3409)
W/System.err(15369): at android.app.Activity.startActivityForResult(Activity.
java:3370)
W/System.err(15369): at android.app.Activity.startActivity(Activity.java:3580
)
W/System.err(15369): at android.app.Activity.startActivity(Activity.java:3548
)
W/System.err(15369): at com.htc.preference.HtcPreferenceActivity.onHeaderClic
k(HtcPreferenceActivity.java:1292)
W/System.err(15369): at com.android.settings.Settings.onListItemClick(Setting
s.java:707)
W/System.err(15369): at android.app.ListActivity$2.onItemClick(ListActivity.j
ava:319)
W/System.err(15369): at android.widget.AdapterView.performItemClick(AdapterVi
ew.java:298)
W/System.err(15369): at android.widget.AbsListView.performItemClick(AbsListVi
ew.java:1144)
W/System.err(15369): at android.widget.ListView.access$401(ListView.java:94)
W/System.err(15369): at android.widget.ListView$CheckForItemReleased.run(List
View.java:4373)
W/System.err(15369): at android.os.Handler.handleCallback(Handler.java:615)
W/System.err(15369): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err(15369): at android.os.Looper.loop(Looper.java:155)
W/System.err(15369): at android.app.ActivityThread.main(ActivityThread.java:5
520)
W/System.err(15369): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(15369): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(15369): at com.android.internal.os.ZygoteInit$MethodAndArgsCalle
r.run(ZygoteInit.java:1029)
W/System.err(15369): at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja
va:796)
W/System.err(15369): at dalvik.system.NativeStart.main(Native Method)
E/Settings:Settings(15369): No activity found for header 2131431296, exception:a
ndroid.content.ActivityNotFoundException: No Activity found to handle Intent { a
ct=com.jmz.led.enabler.action.LAUNCH }
Click to expand...
Click to collapse
{
"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"
}
SOURCE CODE AVAILABLE!
(Check At The End Of Post)
/*I 'm Not Responsible For Any Damage Of Your Phone. Take Necessary Backup If You Are Indoubt.*/
Android is the most Popular, Flexible OS at present.
The number of smarphones users are increasing day-by-day, So as the Android Users.
Apparently, Android Official Updates are not availabe for all devices. So, some of you-Well Beings, Raise Up, Develop further their device's OS, Modify, Customize, and bring up the Android-Customization to its zenith.
Well, Customizing the Android is what makes us SMILE
So, I have a good news for you all Users (Devs & Noobs both)
Today, I, Aryan or you all can call me (A.R.), proudly presenting:
THE-
Not wasting your that much precious time, lets jump on to the features:
Features:
1. All Density Support. No Matter, Whats Your Screen Size, This PlatLogo Will Surely Work Fine.
2. Customize your PlatLogo
3. Multiple Themes/Games
4. Beautiful Animations.
Requirements:
1. De-compile your framework.jar. (In some cases like some Samsung Roms, and kitkat Roms it can be framework2.jar).
2. Know how to decompile JARs
3. PlatLogo app Download From-
mod edit - links removed
(If You Need To Just Test This App, You Are Free To Download It From Above)
Procedure:
1. Decompile framework.jar
2. Go to smali/com/android/internal/app and open PlatLogoActivity.smali
3. Select all and replace it with this code:
Code:
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
.registers 7
.parameter "savedInstanceState"
.prologue
.line 16
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 18
new-instance v1, Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 19
.local v1, intent:Landroid/content/Intent;
new-instance v2, Landroid/content/ComponentName;
const-string v3, "com.aryan.nplatlogo"
const-string v4, "com.aryan.nplatlogo.PlatLogoActivity"
invoke-direct {v2, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 23
:try_start_16
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/Intent;)V
:try_end_19
.catch Landroid/content/ActivityNotFoundException; {:try_start_16 .. :try_end_19} :catch_1d
.line 39
:goto_19
invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
.line 41
return-void
.line 31
:catch_1d
move-exception v0
.line 35
.local v0, e:Landroid/content/ActivityNotFoundException;
const-string v2, "Install AndroidN PlatLogo By Aryan"
const/4 v3, 0x0
invoke-static {p0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v2
invoke-virtual {v2}, Landroid/widget/Toast;->show()V
goto :goto_19
.end method
4. Recompile framework.jar, Push it into system/framework. Set correct permissions(rw-r--r--).
5. Install My Android-N Platlogo.
Credits:
iamareebjamal
[email protected]
Droidbuster
If You Are Using This PlatLogo In Your ROM, Just Give A Credit To My Work.
If Your Liked My Work, Just Press Thanks Below:laugh:
-----------------------------------------------------------------------
LATEST EDIT: SOURCE CODE
mod edit - links removed
[emoji6] [emoji106]
https://youtu.be/DR2nhF3gf7E
Sent from my YU5510 using Tapatalk
thx, I wiil try
Awesome thank you
Awesome...I will try it asap...
awensome bro ???
Error recompiling... Here's the log and my modded file. Can you take a look? (I changed the extension of platlogo file, bc I can't attach smali files)
levone1 said:
Error recompiling... Here's the log and my modded file. Can you take a look? (I changed the extension of platlogo file, bc I can't attach smali files)
Click to expand...
Click to collapse
Well I have solved this before,,,
i know dont know what's the exact method...a bit confused...so i m posting two methods,
try each of them,,,hope it might work.
1. Use ROM TOOL BOX,, no other tool for decompiling nd recompiling jars.
VISIT HERE
2. Open PlatLogoActivity.java, paste my code, search ".parameters", and rename it to ".param"
I got the same error while recompiling what should I do ??
aryan_ar said:
Well I have solved this before,,,
i know dont know what's the exact method...a bit confused...so i m posting two methods,
try each of them,,,hope it might work.
1. Use ROM TOOL BOX,, no other tool for decompiling nd recompiling jars.
VISIT HERE
2. Open PlatLogoActivity.java, paste my code, search ".parameters", and rename it to ".param"
Click to expand...
Click to collapse
Thank you now its working fine ...
jayent said:
Thank you now its working fine ...
Click to expand...
Click to collapse
Which method did you use, 1 or 2? Did you just change parameter to param?
Thanks.Maybe I will try it.
Again same problem brother.I changed .parameter to .param in platlogoactivity.smali after pasting your code but unable to recompile framework2.jar.I attached my framework2.jar file.Can you do it for me?It will be nice of you
harsh09046 said:
Again same problem brother.I changed .parameter to .param in platlogoactivity.smali after pasting your code but unable to recompile framework2.jar.I attached my framework2.jar file.Can you do it for me?It will be nice of you
Click to expand...
Click to collapse
Sorry About That Problem, I Figured Out, The Problem Was In My smali Code.
Now, I 've Updated That.
By The Way, Here's Your Modded framework file:
aryan_ar said:
Sorry About That Problem, I Figured Out, The Problem Was In My smali Code.
Now, I 've Updated That.
By The Way, Here's Your Modded framework file:
Click to expand...
Click to collapse
Thanks brother.Thank You so much!
TJANKS
Thank you for this Guide sir.
@aryan_ar
This works well on Lollipop 5.1.1,but when I run this on GB 2.3,the Lollipop Land theme give me a force close.
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
cool! adding to my rom and will mention your name in credits
nice change works
One line - One blur background
I will guide you to add blur background to recent apps panel, but you can add to any layout you want.
Requirements
Apktool 2.0
SystemUI.apk (or any other app you want)
Notepad++ for editting
Brain.apk installed
LET'S START
- First, decompile your SystemUI.apk
- Download and extract simon_blur_background.zip (5.1 KB) then merge the smali folder to your decompiled folder.
- Open SystemUI.apk/smali/com/simonoid/blur/BlurImageView.smali
- Now find this method:
Code:
# direct methods
.method static constructor <clinit>()V
- Scroll a little bit down, you'll see this:
Code:
const/16 v0, 0x[B][COLOR="Blue"]320[/COLOR][/B]
sput v0, Lcom/simonoid/blur/BlurImageView;->HIGH:I
const/16 v0, 0x[COLOR="blue"][B]1e0[/B][/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->WIDHT:I
- Look at the BLUE hex code. It's my phone resolution (480x800 in hexadecimal is 1e0x320). You have to change it to match your device's resolution or it'll get FC error.
320 is the height
1e0 is the width
You can click HERE to convert decimal to hexadecimal number.
Or you can use some presets:
Code:
[COLOR="Red"]Decimal[/COLOR] = [COLOR="blue"]Hexadecimal[/COLOR]
[COLOR="Red"]480[/COLOR] = [COLOR="blue"]1e0[/COLOR]
[COLOR="Red"]540[/COLOR] = [COLOR="blue"]21c[/COLOR]
[COLOR="Red"]800[/COLOR] = [COLOR="blue"]320[/COLOR]
[COLOR="Red"]960[/COLOR] = [COLOR="blue"]3c0[/COLOR]
[COLOR="Red"]1080[/COLOR] = [COLOR="blue"]438[/COLOR]
[COLOR="Red"]1920[/COLOR] = [COLOR="blue"]780[/COLOR]
Then you can save it.
- Open SystemUI.apk/res/values/ids.xml and add this BLUE code (BLUE ONLY):
Code:
[COLOR="blue"]<item type="id" name="backgroundImageView">false</item>[/COLOR]
</resources>
Save it.
- Now go to the layout you want to add blur background, for example: SystemUI.apk/res/layout/status_bar_recent_panel.xml (for Recent Apps panel). Add the blue code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:background="@color/recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Blue"]<com.simonoid.blur.BlurImageView android:id="@id/backgroundImageView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="centerCrop" />[/COLOR]
<FrameLayout android:id="@id/recents_bg_protect" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.NokiaRecentsHorizontalScrollView android:id="@id/recents_container" android:fitsSystemWindows="true" android:scrollbars="none" android:fadingEdgeLength="0.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layoutDirection="ltr">
<LinearLayout android:orientation="horizontal" android:id="@id/recents_linear_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.recent.NokiaRecentsHorizontalScrollView>
</FrameLayout>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>
- Now recompile your apk and push to your system. :fingers-crossed:
- Finally hit the Thanks :good: button and tell me if it works.
- If you're encountering any errors then post here (with log) so that I could help
NOTE: If you're going to add blur background in somewhere in framework-res.apk/res/layout and you don't know where to put the smali. Just put it in framework.jar :fingers-crossed:
For Android version lower than 4.3, try to change capture screenshot method in BlurImageView.smali
Find and replace all android/view/SurfaceControl with android/view/Surface
HOW TO CHANGE BLUR RADIUS, OPACITY, go to POST #8
Screenshots
{
"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"
}
I have a silly question: Only work on 4.3+?How about GB 2.3?
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
zhaozihanzzh said:
I have a silly question: Only work on 4.3+?How about GB 2.3?
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
Click to expand...
Click to collapse
I've not tested on GB 2.3. But you can try it.
But there's a different method that should work on Gingbread.
Since GB doesnt support ScriptIntrinsicBlur, its getting hard to make it and throungh custom views, it became laggy. There is only one shot for here, FLAGS
Click to expand...
Click to collapse
It's "FLAG_BLUR_BEHIND". You can check it here: [GB]Blur Lockscreen (No moar bugs in statusbar)
SimonVN said:
I've not tested on GB 2.3. But you can try it.
But there's a different method that should work on Gingbread.
It's "FLAG_BLUR_BEHIND". You can check it here: [GB]Blur Lockscreen (No moar bugs in statusbar)
Click to expand...
Click to collapse
I have already followed this guide,but still thank you.And my friend tried your guideon JB 4.2 and he got a FC.Then from log,we realized that android/view/SurfaceControl is only for Android 4.4+.Lower system should use android/view/Surface.Finally,it works.[emoji4]
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
zhaozihanzzh said:
I have already followed this guide,but still thank you.And my friend tried your guideon JB 4.2 and he got a FC.Then from log,we realized that android/view/SurfaceControl is only for Android 4.4+.Lower system should use android/view/Surface.Finally,it works.[emoji4]
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
Click to expand...
Click to collapse
Thank you for notice that. android/view/SurfaceControl also works on my Android 4.3
I think lower version of JB works with android/view/Surface for capture screenshot method.
Glad to see it works on JB 4.2
how to more blur effect???
changing radius value
make it more bright
sorry dont know exactly how to ask
pankajdj007 said:
how to more blur effect???
changing radius value
make it more bright
sorry dont know exactly how to ask
Click to expand...
Click to collapse
You can edit these hex code to your decision.
Code:
[FONT="Tahoma"]# direct methods
.method static constructor <clinit>()V
.locals 1
const/4 v0, 0x[COLOR="Blue"]3[/COLOR] [COLOR="Red"]#This is for BLUR RADIUS[/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->RADIUS:I
const/16 v0, 0x[COLOR="blue"]320[/COLOR] [COLOR="red"]#HEIGHT[/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->HIGH:I
const/16 v0, 0x[COLOR="blue"]1e0[/COLOR] [COLOR="red"]#WIDTH[/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->WIDHT:I
const/high16 v0, 0x40f00000
sput v0, Lcom/simonoid/blur/BlurImageView;->DIVIDE:F
const/16 v0, 0x[COLOR="blue"]a5[/COLOR] [COLOR="red"]#OPACITY[/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->ALPHA:I[/FONT]
Thank you.
Hey there, great guide! Im looking to blur the background of notification shade, recent apps and the backgroud of the power menu on a 7.1.1 CM and AOSP rom but I dont think im editing the correct XMLs. You have any insight into where they would be on 7.1.1 roms?
There is no VALUE folder in my RES folder.
SimonVN said:
Click to expand...
Click to collapse
Thank you Simon. I tried 3 other guides and couldn't get the blur to work. This one works perfectly.
RealWelder said:
Thank you Simon. I tried 3 other guides and couldn't get the blur to work. This one works perfectly.
Click to expand...
Click to collapse
Hope you like it. You can also search for alliv settings guide to add an option to show/hide blur background.
SimonVN said:
Hope you like it. You can also search for alliv settings guide to add an option to show/hide blur background.
Click to expand...
Click to collapse
It is working, but the blurred image only changes if I reboot. I added an Observer and it still doesn't constantly update.
For example if I launch playstore the blurred image is still my homescreen wallpaper. How can I make constantly update?
SimonVN said:
Hope you like it. You can also search for alliv settings guide to add an option to show/hide blur background.
Click to expand...
Click to collapse
Sent from my SM-T210 using Tapatalk
Hey @SimonVN i'm adding ur smali code to a app to make it blur but i'm getting this error.
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getHeight()' on a null object reference
Thank you so much @SimonVN for this awesome mod
It works on my OnePlus 3 running 7.1.1
but there is a small problem ...when i use this in notification panel...the lockscreen wallpaper turns black
SilverElf1234 said:
Thank you so much @SimonVN for this awesome mod
It works on my OnePlus 3 running 7.1.1
but there is a small problem ...when i use this in notification panel...the lockscreen wallpaper turns black
Click to expand...
Click to collapse
Hi @SilverElf1234. I'm glad to hear that it works. Here how to solve problem with the lockscreen background on Android 4.4+. Remember to change the ids to match your system. Below quote is summarized for your case
and2 said:
...
Open PhaneStatusBar.smali and put the blue lines
Code:
.method makeExpandedInvisible()V
.locals 7
-
-
-
const-string v1, "makeExpandedInvisible is called when notifications are fling"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStackScroller:Lcom/android/systemui/statusbar/stack/NotificationStackScrollLayout;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/stack/NotificationStackScrollLayout;->setScrollPositionToTop()V
:cond_1
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
if-eqz v0, :cond_2
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
if-nez v0, :cond_3
:cond_2
:goto_0
[COLOR="Blue"] iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
const v1, 0x7f0e0473 [COLOR="Red"]#<public type="id" name="backgroundImageView"[/COLOR]
invoke-virtual {v3, v1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/ImageView;
const/4 v3, 0x4
invoke-virtual {v4, v3}, Landroid/widget/ImageView;->setVisibility(I)V
[/COLOR]
return-void
:cond_3
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->upgradeLollipop:Z
if-nez v0, :cond_5
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIsInQSEditMode:Z
if-eqz v0, :cond_5
open NotificationPanelView.smali and put the blue lines
Code:
.method private updateHeaderShade()V
.locals 3
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mHeaderAnimatingIn:Z
if-nez v1, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getPeekHeight()F
move-result v0
iget v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mExpandedHeight:F
cmpg-float v1, v1, v0
if-gtz v1, :cond_1
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mHideHeader:Z
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mHeader:Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;
iget v2, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mExpandedHeight:F
sub-float/2addr v2, v0
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setTranslationY(F)V
:cond_0
:goto_0
iget v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mQsExpansionHeight:F
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setQsTranslation(F)V
[COLOR="Blue"] const v1, 0x7f0e0473 [COLOR="Red"]#<public type="id" name="backgroundImageView"[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/ImageView;
const/4 v2, 0x0
invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V[/COLOR]
return-void
:cond_1
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mHideHeader:Z
goto :goto_0
.end method
Be sure the "v" is matching the surrounding code
...
Click to expand...
Click to collapse
nic work bro
---------- Post added at 01:45 PM ---------- Previous post was at 01:44 PM ----------
worked in my port rom
SimonVN said:
Hi @SilverElf1234. I'm glad to hear that it works. Here how to solve problem with the lockscreen background on Android 4.4+. Remember to change the ids to match your system. Below quote is summarized for your case
Click to expand...
Click to collapse
im really sorry but i dont have knowledge about whats going on inside those smali file and can't really find anything matching to the above stuff
i have attached my PhoneStatusbar.smali and NotificationPanelView.smali here can you please take a look at those
Thank You
@SimonVN I am on Oneplus 3T using oxygen os rom. After decompiling the systemui.apk there is no smali folder. Is there another way to add it?