[HOW-TO][Sense 5][4.1.2 & 4.2.2] Add an item to the Settings menu - One (M7) Android Development

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

Related

[MOD][GB][GUIDE] how to added 4 way boot to your rom

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

[GUIDE][MOD] jelly bean pattern lock screen customization

This is for sharing what i learned.
I only tested it only on my cm10.1 based rom.(htc desire, jb4.22_VJCM10.1_vijendrahs_20130407)
So this may not work on other rom.
You need to have knowledge of decompiling.
I used APK-Multi-Tool, baksmali and smali to do this.
1. Increase widget maximum size.
{
"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"
}
Decompile framework-res.apk
In \res\layout-port\
Modify keyguard_widget_pager.xml
Change left, right, top padding and pageSpacing as follows.
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardWidgetPager
android:id="@id/app_widget_container" android:paddingLeft="[COLOR="red"]0dip[/COLOR]"
android:paddingTop="[COLOR="red"]0dip[/COLOR]" android:paddingRight="[COLOR="Red"]0dip[/COLOR]"
android:paddingBottom="@dimen/kg_widget_pager_bottom_padding"
android:clipToPadding="false" android:pageSpacing="[COLOR="red"]0dip[/COLOR]"/>
2. Disable initial page hint
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\KeyguardViewStateManager.smali
Remove following red string.
Code:
.method public showUsabilityHints()V
...
.line 307
iget-object v0, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardViewStateManager;->mKeyguardWidgetPager:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;
[COLOR="Red"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->showInitialPageHints()V[/COLOR]
...
.end method
3. Disable white box while scrolling
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetPager.smali
Change red string to green one as follows
Code:
.method animateOutlinesAndSidePages(ZI)V
...
.line 708
[COLOR="Red"].local v7, finalOutlineAlpha:F[/COLOR]
:goto_4e
invoke-virtual {v3, p0, p1, v7, p2}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->fadeFrame(Ljava/lang/Object;ZFI)V
...
.end method
Code:
.method animateOutlinesAndSidePages(ZI)V
...
.line 708
[COLOR="Lime"]const/4 v7, 0x0[/COLOR]
:goto_4e
invoke-virtual {v3, p0, p1, v7, p2}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->fadeFrame(Ljava/lang/Object;ZFI)V
...
.end method
4. Disable page hint when dragging beyond first or last page
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetPager.smali
Remove red string in the follwing.
Code:
.method protected screenScrolled(I)V
...
.line 533
invoke-static {v5}, Ljava/lang/Math;->abs(F)F
move-result v9
cmpg-float v7, v5, v10
if-gez v7, :cond_61
const/4 v7, 0x1
:goto_51
[COLOR="Red"]invoke-virtual {v6, v9, v7}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->setOverScrollAmount(FZ)V[/COLOR]
...
.end method
5. (similar to 4 but) Only disable white gradiant
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetFrame.smali
Change red string to green one.
Code:
.method setOverScrollAmount(FZ)V
...
.line 497
const/high16 v1, 0x3f00
mul-float/2addr v1, p1
const/high16 v2, 0x437f
mul-float/2addr v1, v2
[COLOR="Red"] invoke-static {v1}, Ljava/lang/Math;->round(F)I
move-result v1[/COLOR]
iput v1, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->mForegroundAlpha:I
...
.end method
Code:
.method setOverScrollAmount(FZ)V
...
.line 497
const/high16 v1, 0x3f00
mul-float/2addr v1, p1
const/high16 v2, 0x437f
mul-float/2addr v1, v2
[COLOR="Lime"]const/4 v1, 0x0[/COLOR]
iput v1, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->mForegroundAlpha:I
...
.end method
6. Only show bounding box boarder
decompile framework-res.apk
in /res/drawable-hdpi
Modify kg_bouncer_bg_white.9.png as follows
7. Remove carrier, emergency call, battery infomation
decompile framework-res.apk
in res\layout
modify keyguard_emergency_carrier_area.xml as follows (for emergency and carrier removal)
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ... >
<com.android.internal.policy.impl.keyguard.CarrierText [COLOR="Lime"]android:visibility="gone"[/COLOR] ... />
<LinearLayout [COLOR="Lime"]android:visibility="gone"[/COLOR] ... >
<com.android.internal.policy.impl.keyguard.EmergencyButton ... />
<Button ... />
</LinearLayout>
</LinearLayout>
modify keyguard_message_area.xml as follows (for battery stat removal)
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardMessageArea ... [COLOR="Lime"]android:textSize="0sp"[/COLOR] ... />
8. Change small widget height
small widget height is determined by unlock UI height.
decompile framework-res.apk
in res\layout-port
modify keyguard_host_view.xml as follows.
change green number as you want.
If you set larger number, the widget height will be smaller.
Code:
<com.android.internal.policy.impl.keyguard.KeyguardHostView ...>
...
<com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer ... androidprv:layout_height="[COLOR="Lime"]410dp[/COLOR]" >
...
</com.android.internal.policy.impl.keyguard.KeyguardHostView>
9. Change widget inner padding
decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
modify KeyguardWidgetFrame.smali.
Add green text and change red number as you want.
you can remove default padding by setting 0.
Code:
.line 109
.local v0, density:F
invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v3
iget v3, v3, Landroid/util/DisplayMetrics;->density:F
const/high16 v4, 0x4100
mul-float/2addr v3, v4
float-to-int v1, v3
[COLOR="Lime"]const v1, 0x[/COLOR][COLOR="Red"]20[/COLOR]
.line 110
.local v1, padding:I
invoke-virtual {p0, v1, v1, v1, v1}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->setPadding(IIII)V
10. Move pattern input section
You can move pattern input section by setting padding.
Decompile framework-res.apk
in res\layout-port\
Modify keyguard_host_view.xml
Inside KeyguardSecurityContainer element set padding value as you want.
Code:
<com.android.internal.policy.impl.keyguard.KeyguardHostView ... >
...
<com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer ... [COLOR="Lime"]androidprv:paddingTop="80dp" [/COLOR] ... >
...
</com.android.internal.policy.impl.keyguard.KeyguardHostView>
:good::good::good::good::good::good::good:
can you just make this mod flashable via CWM..??
or just instal like common .apk..??
Sorry, I can't
adeza69 said:
can you just make this mod flashable via CWM..??
or just instal like common .apk..??
Click to expand...
Click to collapse
I don't have ability to do that.
sonulohani said:
:good::good::good::good::good::good::good:
Click to expand...
Click to collapse
It's AMAZING!!! Going to recompile my files, now. Thanks for this. Awesome job! :thumbup::thumbup::thumbup:
lock screen
I can not find the lock screen when charging the developer with the font size to modify these two paths do not know if you know
I changed my dpi now this couldn't hide I want to decompile this so please tell me which file should I select to decompile??
Sent from my GT-I9082 using XDA Premium 4 mobile app
Not virtual buttons are fonts
yasirj said:
I changed my dpi now this couldn't hide I want to decompile this so please tell me which file should I select to decompile??
Sent from my GT-I9082 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Not virtual buttons are fonts
wil it be applicable for gb
I would love to see an XPOSED Mod with these customizations to the lock screen!
Anyone know if this is possible or having the skills to do so?
Thank you for the info, but how to change the wallpaper?? Setting either a color different than black or a picture?
why?
I'm not really seeing the usefulness of this?

(Guide) how To port Ics Lockscreen To Gb Devices(Qualcom)

I am Suraj ​
again with New guide
How to port ICs lockscreen TO GB
{
"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"
}
Tested On micromax a57 a54 Both are qualcom so cant say about samsung and other Mediatech or mtk device
THis is full explained Guide dont bore
So let start
We have to Follow 5 step for gettings ics lockscreen
first step here start
download this zip firststep.zip
1.copy res folder to your framework-res folder
2. Open ids.xml under res/values foler and add these in last above
Code:
<item type="id" name="rl_multiWaveView">false</item>
<item type="id" name="digital_clock">false</item>
<item type="id" name="dateShow">false</item>
<item type="id" name="iv_drop">false</item>
<item type="id" name="ib_greenorange">false</item>
<item type="id" name="rl_click_after">false</item>
<item type="id" name="ib_photo">false</item>
<item type="id" name="ib_greenorange_gone">false</item>
<item type="id" name="ib_phone">false</item>
<item type="id" name="tv_phone_unread">false</item>
<item type="id" name="ib_sms">false</item>
<item type="id" name="tv_sms_unread">false</item>
<item type="id" name="ib_home">false</item>
<item type="id" name="tv_remind">false</item>
<item type="id" name="rl_multiWaveViewforsimulateics">false</item>
<item type="id" name="iv_wave">false</item>
<item type="id" name="iv_wave1">false</item>
<item type="id" name="iv_wave2">false</item>
<item type="id" name="iv_circle">false</item>
3.. compile the framework-res.apk
4.Now decompile your framework-res.apk
Now open your public.xml
Leave it alone Now first step complete
:fingers-crossed:
TIME TO DO SECOND SEC0ND STEP
HERE WE START
dOWNLAOD THIS zIP.(SECOND STEP.ZIP)
thats our smalli editing part
1.Now decompile your android.policy.jar ( I GIVEN TOOL INSIDE)
NOW copy all smalli to your decompiled android.policy .jar folder one by one
Now open all files related to com\android\internal\policy\impl mine files
Search " 0x10" Copy the whole id .
Open my provided public.xml
Search for that id in my public.xml
Copy the text of that id.
Like if my Public id is "0x101000e"
but in you pubilc.xml it start from "0x0101000e" means you have to add 0 before 1
in easy language(When changing ids in the smali, make sure you remove one "0" after the x. For example, if your public.xml id is "0x010002b", make it "0x10002b". This is actually very important,)
its a boring part naa but its too much neccesarry too soo better you Do it carefully slow slow dont do fast other it will create reason for bootloop
NOW OUR 2ND PART IS COMPLETE nOW TIME TO START 3 PART
SO HERE WE START
DOWNLOAD THIS ZIP (THIRD PART.ZIP)
thats our Main and difficult part
in your android.policy.jar decompiled folder
search for LockPatternKeyguardView.smalli
open it ..
then search for
.field private mScreenOn:Z
Click to expand...
Click to collapse
then below it add
.field private mStartForIntent:Landroid/content/Intent;
Click to expand...
Click to collapse
then search for
.method createLockScreen()Landroid/view/View;
Click to expand...
Click to collapse
then after
.prologue
Click to expand...
Click to collapse
add this
.prologue
.line 660
const-string v3, "true"
const-string v2, "ro.origin.lockscreen"
.line 711
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_24
.line 712
new-instance v0, Lcom/android/internal/policy/impl/GreenOrange_LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/GreenOrange_LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallbackV
.line 726
:goto_23
return-object v0
.line 718
:cond_24
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_44
.line 719
new-instance v0, Lcom/android/internal/policy/impl/SimulateICS_LockScreen;
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/SimulateICS_LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallbackV
goto :goto_23
:cond_44
Click to expand...
Click to collapse
then search for
.method static synthetic access$100(Lcom/android/internal/policy/impl/LockPatternKeyguardViewZ
.registers 2
.parameter "x0"
.prologue
.line 65
iget-boolean v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsVerifyUnlockOnly:Z
return v0
.end method
Click to expand...
Click to collapse
then add this code under
.method static synthetic access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
.registers 2
.parameter "x0"
.prologue
.line 65
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
return-object v0
.end method
.method static synthetic access$1002(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Landroid/content/IntentLandroid/content/Intent;
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 65
iput-object p1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
return-object p1
.end method
Click to expand...
Click to collapse
Now our third step is completed
---------------------------------------------------------------------------------
Now our forth step here start
1. go to com\android\internal\policy\impl ( your decompiled android.policy.jar)
search for LockPatternKeyguardView$1.smalli
Now open it
then search for
.method public goToUnlockScreen()V
Click to expand...
Click to collapse
then you will see this method
.method public goToUnlockScreen()V
.registers 3
to
#calls: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->updateScreen(Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
invoke-static {v0, v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$200(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
goto :goto_8
.end method
Click to expand...
Click to collapse
so delete this full method
and add this
.method public goToUnlockScreen()V
.registers 6
.prologue
const/4 v2, 0x1
const-string v4, "true"
const-string v3, "ro.origin.lockscreen"
.line 248
invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->isSecure()Z
move-result v0
if-nez v0, :cond_3d
.line 249
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v3, v4}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_1f
.line 250
invoke-virtual {p0, v2}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->keyguardDone(Z)V
.line 259
:goto_1e
return-void
.line 251
:cond_1f
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v3, v4}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_33
.line 252
invoke-virtual {p0, v2}, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->keyguardDone(Z)V
goto :goto_1e
.line 254
:cond_33
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, v2}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
goto :goto_1e
.line 257
:cond_3d
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
sget-object v1, Lcom/android/internal/policy/impl/LockPatternKeyguardView$Mode;->UnlockScreen:Lcom/android/internal/policy/impl/LockPatternKeyguardView$Mode;
#calls: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->updateScreen(Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
invoke-static {v0, v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$200(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Lcom/android/internal/policy/impl/LockPatternKeyguardView$ModeV
goto :goto_1e
.end method
Click to expand...
Click to collapse
Now search for
.method public isSecure()Z
Click to expand...
Click to collapse
then above it add this
.method public isGotoUnlockscreen(Landroid/content/IntentV
.registers 3
.parameter "intent"
.prologue
.line 398
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#setter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1002(Lcom/android/internal/policy/impl/LockPatternKeyguardView;Landroid/content/IntentLandroid/content/Intent;
.line 399
return-void
.end method
Click to expand...
Click to collapse
========================================================================================================
Now search for
.method public keyguardDone(Z)V
Click to expand...
Click to collapse
replace full method with
.method public keyguardDone(Z)V
.registers 6
.parameter "authenticated"
.prologue
const-string v3, "true"
const-string v2, "ro.origin.lockscreen"
.line 334
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "false"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_3c
.line 335
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
.line 336
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#getter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v0
if-eqz v0, :cond_3b
.line 337
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v1, "mStartForIntent"
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/StringV
.line 338
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getContext()Landroid/content/Context;
move-result-object v0
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#getter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/IntentV
.line 349
:cond_3b
:goto_3b
return-void
.line 340
:cond_3c
const-string v0, "ro.origin.lockscreen"
const-string v0, "true"
invoke-static {v2, v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
move-result-object v0
const-string v1, "simulateICS"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/ObjectZ
move-result v0
if-eqz v0, :cond_6d
.line 341
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
.line 342
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#getter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v0
if-eqz v0, :cond_3b
.line 343
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getContext()Landroid/content/Context;
move-result-object v0
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
#getter for: Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mStartForIntent:Landroid/content/Intent;
invoke-static {v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->access$1000(Lcom/android/internal/policy/impl/LockPatternKeyguardViewLandroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/IntentV
goto :goto_3b
.line 346
:cond_6d
iget-object v0, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView$1;->this$0:Lcom/android/internal/policy/impl/LockPatternKeyguardView;
invoke-virtual {v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getCallback()Lcom/android/internal/policy/impl/KeyguardViewCallback;
move-result-object v0
invoke-interface {v0, p1}, Lcom/android/internal/policy/impl/KeyguardViewCallback;->keyguardDone(Z)V
goto :goto_3b
.end method
Click to expand...
Click to collapse
--------------------------------------------------------------------------------------------------------------------------------------
Now save this Smalli
Now search for this
KeyguardScreenCallback.smalli
then search for
.method public abstract goToUnlockScreen()V
.end method
Click to expand...
Click to collapse
then add this below this code
.method public abstract isGotoUnlockscreen(Landroid/content/IntentV
.end method
Click to expand...
Click to collapse
Here our fourth step is completed
Now here we start our 5th step
downlaod this Zip (5th step)
Now open zip copy this fonts to your system/fonts (necceassry step other wise you will face bootloop)
Now open you build.prop
then search for
# ADDITIONAL_BUILD_PROPERTIES
Click to expand...
Click to collapse
then above it add
#add wanglu 20120811 start
#do not greenorging lockscreen
ro.origin.lockscreen=simulateICS
#add wanglu 20120811 end
Click to expand...
Click to collapse
I provided this flashable zip you can use it for your Flashing lockscreen (FLASHABLE.ZIP)
Note:
1 .if you are using my work so plz give me credit . because i spend many night and days for getting success.
and
If you are porting this guide to To another inform me first . then i will create a seprate guide for your device.
by giving you credit and tester
​
SK(SurajKumar) said:
I am Suraj ​
again with New guide
How to port ICs lockscreen TO GB
Tested On micromax a57 a54 Both are qualcom so cant say about samsung and other Mediatech or mtk device
THis is full explained Guide dont bore
So let start
We have to Follow 5 step for gettings ics lockscreen
first step here start
download this zip firststep.zip
1.copy res folder to your framework-res folder
2. Open ids.xml under res/values foler and add these in last above
Code:
<item type="id" name="rl_multiWaveView">false</item>
<item type="id" name="digital_clock">false</item>
<item type="id" name="dateShow">false</item>
<item type="id" name="iv_drop">false</item>
<item type="id" name="ib_greenorange">false</item>
<item type="id" name="rl_click_after">false</item>
<item type="id" name="ib_photo">false</item>
<item type="id" name="ib_greenorange_gone">false</item>
<item type="id" name="ib_phone">false</item>
<item type="id" name="tv_phone_unread">false</item>
<item type="id" name="ib_sms">false</item>
<item type="id" name="tv_sms_unread">false</item>
<item type="id" name="ib_home">false</item>
<item type="id" name="tv_remind">false</item>
<item type="id" name="rl_multiWaveViewforsimulateics">false</item>
<item type="id" name="iv_wave">false</item>
<item type="id" name="iv_wave1">false</item>
<item type="id" name="iv_wave2">false</item>
<item type="id" name="iv_circle">false</item>
3.. compile the framework-res.apk
4.Now decompile your framework-res.apk
Now open your public.xml
Leave it alone Now first step complete
:fingers-crossed:
TIME TO DO SECOND SEC0ND STEP
HERE WE START
dOWNLAOD THIS zIP.(SECOND STEP.ZIP)
thats our smalli editing part
1.Now decompile your android.policy.jar ( I GIVEN TOOL INSIDE)
NOW copy all smalli to your decompiled android.policy .jar folder one by one
Now open all files related to com\android\internal\policy\impl mine files
Search " 0x10" Copy the whole id .
Open my provided public.xml
Search for that id in my public.xml
Copy the text of that id.
Like if my Public id is "0x101000e"
but in you pubilc.xml it start from "0x0101000e" means you have to add 0 before 1
its a boring part naa but its too much neccesarry too soo better you Do it carefully slow slow dont do fast other it will create reason for bootloop
NOW OUR 2ND PART IS COMPLETE nOW TIME TO START 3 PART
SO HERE WE START
DOWNLOAD THIS ZIP (THIRD PART.ZIP)
thats our Main and difficult part
in your android.policy.jar decompiled folder
search for LockPatternKeyguardView.smalli
open it ..
then search for
then below it add
then search for
then after
add this
then search for
then add this code under
Now our third step is completed
---------------------------------------------------------------------------------
Now our forth step here start
1. go to com\android\internal\policy\impl ( your decompiled android.policy.jar)
search for LockPatternKeyguardView$1.smalli
Now open it
then search for
then you will see this method
so delete this full method
and add this
Now search for
then above it add this
========================================================================================================
Now search for
replace full method with
--------------------------------------------------------------------------------------------------------------------------------------
Now save this Smalli
Now search for this
KeyguardScreenCallback.smalli
then search for
then add this below this code
Here our fourth step is completed
Now here we start our 5th step
downlaod this Zip (5th step)
Now open zip copy this fonts to your system/fonts (necceassry step other wise you will face bootloop)
Now open you build.prop
then search for
then above it add
I provided this flashable zip you can use it for your Flashing lockscreen (FLASHABLE.ZIP)
​
Click to expand...
Click to collapse
okay just tried replace every public id of our framework-res.apk to the smali files u given in step2 and copied everything into phone with permission rw-r-r but when restarted there was no lock screen
Lockscreen working
sssomnath474 said:
okay just tried replace every public id of our framework-res.apk to the smali files u given in step2 and copied everything into phone with permission rw-r-r but when restarted there was no lock screen
Click to expand...
Click to collapse
bro you need to complete all step after that you will get lockscreen by completing just step 2 you can get
you need first to add intergnate that lockscreen in LockPatternKeyguardView.smalli
then you have to put that all fonts in you system then edit build,prop then it will activiate
hi sir i have a question about the ids do we need to add 0 or remove 0? because in my ids they already have 0 but in your smalis id dont have 0 after x.. example ur ids are 0x1 and my ids is already 0x01..so i dont need to add 0 anymore because my ids already has 0 so i just need to replace all ur id
i got this error while recompilingandroid.policy.jar
Will it work on any GB devices??
+1
Good work bozz
:highfive:
markmellarpes said:
hi sir i have a question about the ids do we need to add 0 or remove 0? because in my ids they already have 0 but in your smalis id dont have 0 after x.. example ur ids are 0x1 and my ids is already 0x01..so i dont need to add 0 anymore because my ids already has 0 so i just need to replace all ur id
i got this error while recompilingandroid.policy.jar
Click to expand...
Click to collapse
you need to remove zero
Thanks Bro..
welcome
kiie said:
Thanks Bro..
Click to expand...
Click to collapse
welcome bro on which device you ported this?
mention here name i will add in working device list:fingers-crossed:
hehe
SK(SurajKumar) said:
welcome bro on which device you ported this?
mention here name i will add in working device list:fingers-crossed:
Click to expand...
Click to collapse
Cross A5 Bro
Hi, my device getting bootloop i think there was a problem with my smali editing. Can you help me ? My device Galaxy Y GT-S5360
[Help]
SK(SurajKumar) said:
welcome bro on which device you ported this?
mention here name i will add in working device list:fingers-crossed:
Click to expand...
Click to collapse
Can u give the instructions to port OEM specific apps to all other devices....like porting Calendar app from galaxy s4 to all other devices,so th.at it can be installed on every android device
Plz help me, I have been searchig 4 it for a very long time.
GSculerlor said:
Hi, my device getting bootloop i think there was a problem with my smali editing. Can you help me ? My device Galaxy Y GT-S5360
Click to expand...
Click to collapse
just give android.policy.jar and your framework-res.apk public.xml only
i dont have fast net :
Giridharbavana said:
Can u give the instructions to port OEM specific apps to all other devices....like porting Calendar app from galaxy s4 to all other devices,so th.at it can be installed on every android device
Plz help me, I have been searchig 4 it for a very long time.
Click to expand...
Click to collapse
bro you can port directly . if you know java and c++ then you have to build that same thing from scratch . like you call that apps lke thirdparty.
porting apps ics to ics platform is easy. like you can port any tw app to simple non tw device
SK(SurajKumar) said:
just give android.policy.jar and your framework-res.apk public.xml only
i dont have fast net :
Click to expand...
Click to collapse
Here
just one wait for one day i will port
but i can build for only one time
lockscreen for galaxy y
here is your android.policy.jar
and Now just skip that android.policy part
Can you help me
SK(SurajKumar) said:
here is your android.policy.jar
and Now just skip that android.policy part
Click to expand...
Click to collapse
hey guys iam a Galaxy Y Duos GT-6102 user i followed all of the guides and it successfully showed up but when i unlock it my phone keep on rebooting..
can someone help me about this.. i attached my files here can you guys check it for me :crying::crying::crying: i dont know whats wrong with it.
i already checked the IDs and its all ok , idont know about the files under the third step if i have done it correctly.. please help me guys.. i have uploaded the files just find out why it is not unlocking even if the camera on lockscreen.. thanks in advance guys.
Thanks bro. But i have one question. How can i do transparent lockscreen (Without wallpaper) ?
Me to want thay option in lockscreen . Just making lockscreen v2
Sent from my GT-S5830i using xda app-developers app

[MOD][TUTORIAL][i9500]Enable Flashlight, Screenshot PowerMenu on OFFICIAL Lollipop

1st THIS IS NOT MINE TUTORIAL
I just edit, fix and change the code from N9005 to I9500
Credits go to darkera13 (SAMSUNG Developer) from Samsungviet
Link to orginal thread here
2nd WHAT'D WE HAVE AFTER DOING THIS MOD
{
"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"
}
1. THIS MOD IS ONLY FOR DEODEXED OFFICIAL LOLLIPOP ROM: You'd prepare android.policy.jar and framework-res.apk
2. Decompile the framework-res.apk and open /res/values/arrays.xml with your favorite text editor
Search for:
Code:
[COLOR="SeaGreen"]<string-array name="config_globalActionsList">[/COLOR]
Add like following:
Code:
[COLOR="SeaGreen"]<string-array name="config_globalActionsList">
<item>power</item>
<item>datamode</item>
<item>airplane</item>
<item>restart</item>
<item>lockdown</item>
<item>bugreport</item>
<item>users</item>
<item>emergencymode</item>[/COLOR]
[COLOR="Red"] <item>flashlight</item>
<item>screenshot</item>[/COLOR]
[COLOR="SeaGreen"]</string-array>[/COLOR]
Save and open /res/values/strings.xml
Add to the end of file(EOF):
Code:
[COLOR="Red"] <string name="global_action_screenshot">Take Screenshot</string>
<string name="global_action_flashlight">Flashlight</string>
<string name="global_actions_flashlight_on_status">On</string>
<string name="global_actions_flashlight_off_status">Off</string>[/COLOR]
[COLOR="SeaGreen"]</resources>[/COLOR]
Save
Copy all PNG files in framework-res GlobalMenu_darkera13_samsungviet.vn.zip to /res/drawable-xhdpi and Compile
We'd get an apk: unsignedframework-res.apk
Now keep this file and decompile it. Then open /res/values/public.xml(in modified project unsignedframework-res.apk not framework-res.apk)
Note these lines to use in next big step
Code:
// This is what I got from recompiled [B]framework-res.apk[/B] might be different with your
// Note these lines to other place [B]not[/B] in public.xml because we just care about the number
<public type="string" name="global_action_screenshot" id="0x[B]01040ba5[/B]" /> -> const v4: [B]1040ba5[/B]
<public type="string" name="global_action_flashlight" id="0x[B]01040ba6[/B]" /> -> const v6: [B]1040ba6[/B]
<public type="string" name="global_actions_flashlight_on_status" id="0x0[B]1040ba7[/B]" /> -> const v7: [B]1040ba7[/B]
<public type="string" name="global_actions_flashlight_off_status" id="0x0[B]1040ba8[/B]" /> -> const v8: [B]1040ba8[/B]
<public type="drawable" name="tw_ic_lock_flashlight_on" id="0x0[B]1080b5c[/B]" /> -> const v4: [B]1080b5c[/B]
<public type="drawable" name="tw_ic_lock_flashlight_off" id="0x0[B]1080b5b[/B]" /> -> const v5: [B]1080b5b[/B]
<public type="drawable" name="tw_ic_lock_screenshot" id="0x0[B]1080b5d[/B]" /> -> const v3: [B]1080b5d[/B]
3. Decompile the android.policy.jar and open /com/android/internal/policy/impl/GlobalActions.smali
Search for:
Code:
[COLOR="SeaGreen"].field private mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
Add like following:
Code:
[COLOR="SeaGreen"].field private mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
[COLOR="Red"].field private mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
.field private mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
.field private mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"]iput-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
sget-object v3, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;[/COLOR]
Add like following:
Code:
[COLOR="SeaGreen"]iput-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
sget-object v3, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;[/COLOR]
[COLOR="Red"]iput-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
sget-object v3, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"].method static synthetic access$5000()Ljava/lang/String;[/COLOR]
Add like following:
Code:
[COLOR="SeaGreen"].method static synthetic access$5000()Ljava/lang/String;
.registers 1
.prologue
.line 161
sget-object v0, Lcom/android/internal/policy/impl/GlobalActions;->mScafe:Ljava/lang/String;
return-object v0
.end method[/COLOR]
[COLOR="Red"]
.method static synthetic access$500(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
.registers 2
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic access$5000(Lcom/android/internal/policy/impl/GlobalActions;)Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
.registers 2
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
return-object v0
.end method
.method static synthetic access$5001(Lcom/android/internal/policy/impl/GlobalActions;)Z
.registers 2
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->getTorchStatus()Z
move-result v0
return v0
.end method
[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"]iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
Add like following * Remember sections in bold the the ids from public.xml you'll get when editing the framework-res.apk:
Code:
// This is what I got from recompiled [B]framework-res.apk[/B] might be different with your
// These lines are in other place [B]not[/B] in public.xml
<public type="string" name="global_action_screenshot" id="0x[B]01040ba5[/B]" /> -> const v4: [B]1040ba5[/B]
<public type="string" name="global_action_flashlight" id="0x[B]01040ba6[/B]" /> -> const v6: [B]1040ba6[/B]
<public type="string" name="global_actions_flashlight_on_status" id="0x0[B]1040ba7[/B]" /> -> const v7: [B]1040ba7[/B]
<public type="string" name="global_actions_flashlight_off_status" id="0x0[B]1040ba8[/B]" /> -> const v8: [B]1040ba8[/B]
<public type="drawable" name="tw_ic_lock_flashlight_on" id="0x0[B]1080b5c[/B]" /> -> const v4: [B]1080b5c[/B]
<public type="drawable" name="tw_ic_lock_flashlight_off" id="0x0[B]1080b5b[/B]" /> -> const v5: [B]1080b5b[/B]
<public type="drawable" name="tw_ic_lock_screenshot" id="0x0[B]1080b5d[/B]" /> -> const v3: [B]1080b5d[/B]
Code:
[COLOR="SeaGreen"] iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
[COLOR="Red"]
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$Flashlight;
const v4, [B]0x1080b5c[/B]
const v5, [B]0x1080b5b[/B]
const v6, [B]0x1040ba6[/B]
const v7, [B]0x1040ba7[/B]
const v8, [B]0x1040ba8[/B]
move-object/from16 v3, p0
invoke-direct/range {v2 .. v8}, Lcom/android/internal/policy/impl/GlobalActions$Flashlight;-><init>(Lcom/android/internal/policy/impl/GlobalActions;IIIII)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$Screenshot;
const v3, [B]0x1080b5d[/B]
const v4, [B]0x1040ba5[/B]
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$Screenshot;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"]const/16 v2, 0x100[/COLOR]
Add like following:
Code:
[COLOR="SeaGreen"] const/16 v2, 0x10
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mDataModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
const/4 v5, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v2, v3, v4, v5}, Lcom/android/internal/policy/impl/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/internal/policy/impl/GlobalActions$Action;Ljava/util/ArrayList;Z)Z[/COLOR]
[COLOR="Red"] .line 1229
const/16 v2, 0x20
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
const/4 v5, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v2, v3, v4, v5}, Lcom/android/internal/policy/impl/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/internal/policy/impl/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
.line 1230
const/16 v2, 0x40
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
const/4 v5, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v2, v3, v4, v5}, Lcom/android/internal/policy/impl/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/internal/policy/impl/GlobalActions$Action;Ljava/util/ArrayList;Z)Z[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"]const-string v2, "emergencymode"[/COLOR]
Match 2 results, mark the line with:
Code:
:cond_2b6
const-string v2, "emergencymode"
Add like following:
Code:
[COLOR="SeaGreen"]:cond_2b6
const-string v2, "emergencymode"
invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2[/COLOR]
[COLOR="Red"]if-eqz v2, :cond_315[/COLOR]
[COLOR="SeaGreen"].line 1291
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mEmergency:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_24b[/COLOR]
[COLOR="Red"]:cond_315
const-string v2, "flashlight"
invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_32a
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_24b
:cond_32a
const-string v2, "screenshot"
invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2ca
move-object/from16 v0, p0
iget-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_24b[/COLOR]
[COLOR="SeaGreen"].line 1292
:cond_2ca
const-string v2, "silent"[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"].method private prepareDialog()V[/COLOR]
Add to bottom like following:
Code:
[COLOR="SeaGreen"].method private prepareDialog()V
.registers 8[/COLOR]
[COLOR="Red"]invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->getTorchStatus()Z
move-result v1
if-eqz v1, :cond_20
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->On:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :cond_21
:cond_20
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;->Off:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
goto :cond_21
:cond_21[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"].method private handleShow()V[/COLOR]
Add to above like following:
Code:
[COLOR="Red"].method private getTorchStatus()Z
.registers 7
.prologue
const/4 v0, 0x0
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "torch_light"
const/4 v3, -0x2
invoke-static {v1, v2, v0, v3}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v1
if-eqz v1, :cond_11
const/4 v0, 0x1
:cond_11
return v0
.end method[/COLOR]
[COLOR="SeaGreen"].method private handleShow()V
.registers 7[/COLOR]
Search for:
Code:
[COLOR="SeaGreen"]const-string v4, "content://com.sec.knox.provider2/KnoxCustomManagerService1"[/COLOR]
Add to above like following:
Code:
[COLOR="Red"] iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlight:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
iget-object v5, p0, Lcom/android/internal/policy/impl/GlobalActions;->mFlashlightState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
invoke-virtual {v4, v5}, Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;->updateState(Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;)V[/COLOR]
[COLOR="SeaGreen"]const-string v4, "content://com.sec.knox.provider2/KnoxCustomManagerService1"[/COLOR]
Copy all smali files in andorid.policy.jar GlobalMenu_darkera13_samsungviet.vn.zip to /smali/com/android/internal/policy/impl and Compile the android.policy.jar​4. Now you'd have unsignedframework-res.apk and mod_android.policy.jar. Rename them to framework-res.apk and android.policy.jar. Put it in CWM flashable zip and flash with TWRP or Philz.
Tested on:
LRX22C.I9500XXUHOAA Deodexed: Working
AURORA Lollipop Port Beta 5: Working
InFolder: Mediafire
reserver
Great guide
Great
good job mate :good: :highfive:
You're welcome
Great, thank you.
:good::good:
flash the zip ?
So flashing the zip will enable the toggles in the power menu ?
Can u provide screenshot .? It will be aweasome.
---------- Post added at 03:48 PM ---------- Previous post was at 03:45 PM ----------
Does it have 5way Reboot menu too?
gdskang said:
So flashing the zip will enable the toggles in the power menu ?
Click to expand...
Click to collapse
Of cause, flash the zip compatibles with your stock deodexed rom
HAYLCION said:
Can u provide screenshot .? It will be aweasome.
---------- Post added at 03:48 PM ---------- Previous post was at 03:45 PM ----------
Does it have 5way Reboot menu too?
Click to expand...
Click to collapse
Screenshot above. Definitely it has 5 ways reboot. If not please pm in this thread, I'll continue modding 5 ways reboot for you.
Flashed it and lost my power menu. Any fix for that ?
gdskang said:
Flashed it and lost my power menu. Any fix for that ?
Click to expand...
Click to collapse
What is the rom which you're using? Has it been deodexed yet?
ghoster76 said:
What is the rom which you're using? Has it been deodexed yet?
Click to expand...
Click to collapse
Using prism barebone v14.5
gdskang said:
Using prism barebone v14.5
Click to expand...
Click to collapse
I checked the Prism™ Barebone V14.5 and this rom might use 5 ways reboot mod and some other things, that in my modded OA7 hasn't already included. But luckily I did it for you. You could download modded Prism™ Barebone V14.5 files here
ghoster76 said:
I checked the Prism™ Barebone V14.5 and this rom might use 5 ways reboot mod and some other things, that in my modded OA7 hasn't already included. But luckily I did it for you. You could download modded Prism™ Barebone V14.5 files here
Click to expand...
Click to collapse
You modded the PBB files for the fix ?? Cool man.
ghoster76 said:
You're welcome
Click to expand...
Click to collapse
Btw, u come from samsungviet.vn right?? juz want to know your nick name on this forum [emoji16] [emoji14] [emoji173] [emoji7]
Sent from my SM-N910F
gdskang said:
You modded the PBB files for the fix ?? Cool man.
Click to expand...
Click to collapse
Yeah, I've done
nambavuong said:
Btw, u come from samsungviet.vn right?? juz want to know your nick name on this forum [emoji16] [emoji14] [emoji173] [emoji7]
Sent from my SM-N910F
Click to expand...
Click to collapse
I'm just a Junior Member with few posts. Here is my profile
ghoster76 said:
Yeah, I've done
I'm just a Junior Member with few posts. Here is my profile
Click to expand...
Click to collapse
Still no power menu. Flashed the file and the only the apps optimise. The phone just soft reboots when i hold the power button.
Found a fix yet ?
If you can't find a fix, can you upload the unmodded files ??
Pulling out the battery and rebooting into recovery is a tiresome job you know.
gdskang said:
Found a fix yet ?
If you can't find a fix, can you upload the unmodded files ??
Pulling out the battery and rebooting into recovery is a tiresome job you know.
Click to expand...
Click to collapse
Find your stock files here

[GUIDE][MOD][4.1+] How to add Blur background to your Recent Apps, Notification Panel

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?

Categories

Resources