Related
This howto will teach you how to add a quad lockscreen with phone and messaging to any jb rom in 2 ways:
[SMALI]: you're going to modify already compiled files, you will need a basic knowledge about decompiling/recompiling/editing jar, apk and smali files.
[JAVA]: you're going to modify the JB source code, you will need a basic knowledge about java and how to compile an AOSP.
Choose your path and always follow the instuction with that tag.
framework resources editing:
[SMALI]
Decompile your framework-res.apk
Put ic_lockscreen_phone_activated.png, ic_lockscreen_phone_normal.png, ic_lockscreen_sms_activated.png, ic_lockscreen_sms_normal.png in /res/drawable-hdpi/
[JAVA]
Put ic_lockscreen_phone_activated.png, ic_lockscreen_phone_normal.png, ic_lockscreen_sms_activated.png, ic_lockscreen_sms_normal.png in /frameworks/base/core/res/res/drawable-hdpi/
[SMALI]
Put ic_lockscreen_phone.xml, ic_lockscreen_sms.xml in /res/drawable/
[JAVA]
Put ic_lockscreen_phone.xml, ic_lockscreen_sms.xml in /frameworks/base/core/res/res/drawable/
Add the necessary entries in /frameworks/base/core/res/res/values/public.xml:
Code:
<java-symbol type="drawable" name="ic_lockscreen_sms" />
<java-symbol type="drawable" name="ic_lockscreen_phone" />
[SMALI]
Open /res/values/arrays.xml
[JAVA]
Open /frameworks/base/core/res/res/values/arrays.xml
[SMALI]/[JAVA]
Replace the whole array <array name="lockscreen_targets_with_camera"> .. </array> with:
Code:
<array name="lockscreen_targets_with_camera">
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_sms</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_phone</item>
<item>@drawable/ic_lockscreen_camera</item>
<item>@null</item>
<item>@null</item>
<item>@null</item>
</array>
Replace the whole array <array name="lockscreen_target_descriptions_with_camera"> .. </array> with:
Code:
<array name="lockscreen_target_descriptions_with_camera">
<item>@string/description_target_unlock</item>
<item>@string/description_target_sms</item>
<item>@string/description_target_search</item>
<item>@string/description_target_phone</item>
<item>@string/description_target_camera</item>
<item>@null</item>
<item>@null</item>
<item>@null</item>
</array>
[SMALI]
Open /res/values-land/arrays.xml
[JAVA]
Open /frameworks/base/core/res/res/values-land/arrays.xml
[SMALI]/[JAVA]
Replace the whole array <array name="lockscreen_targets_with_camera"> .. </array> with:
Code:
<array name="lockscreen_targets_with_camera">
<item>@null</item>
<item>@null</item>
<item>@drawable/ic_lockscreen_unlock</item>
<item>@drawable/ic_lockscreen_sms</item>
<item>@drawable/ic_action_assist_generic</item>
<item>@drawable/ic_lockscreen_phone</item>
<item>@drawable/ic_lockscreen_camera</item>
<item>@null</item>
</array>
Replace the whole array <array name="lockscreen_target_descriptions_with_camera"> .. </array> with:
Code:
<array name="lockscreen_target_descriptions_with_camera">
<item>@null</item>
<item>@null</item>
<item>@string/description_target_unlock</item>
<item>@string/description_target_sms</item>
<item>@string/description_target_search</item>
<item>@string/description_target_phone</item>
<item>@string/description_target_camera</item>
<item>@null</item>
</array>
[SMALI]
Open /res/values/strings.xml
[JAVA]
Open /frameworks/base/core/res/res/values/strings.xml
[SMALI]/[JAVA]
Add the following entries:
Code:
<string name="description_target_sms">Sms</string>
<string name="description_target_phone">Phone</string>
[SMALI]
Recompile your framework. Then decompile the new one and write down the addresses of the following resources in /res/values/pubblic.xml:
Code:
ic_action_assist_generic
ic_lockscreen_camera
ic_lockscreen_silent
ic_lockscreen_unlock
ic_lockscreen_unlock_phantom
ic_lockscreen_phone
ic_lockscreen_sms
framework editing: ***UPDATED***
[JAVA]
Edit /frameworks/base/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
Code:
- return mTargetDescriptions.get(index);
+ String targetZ = "";
+ try {
+ targetZ = mTargetDescriptions.get(index);
+ } catch (Exception e) {
+ }
+ return targetZ;
Code:
- return mDirectionDescriptions.get(index);
+ try {
+ String directionZ = mDirectionDescriptions.get(index);
+ return directionZ;
+ } catch (Exception e) {
+ return "";
+ }
[SMALI]
Disassemble your framework.jar
Edit /com/android/internal/widget/multiwaveview/GlowPadView.smali and replace the whole methods ".method private getDirectionDescription(I)Ljava/lang/String;" and ".method private getTargetDescription(I)Ljava/lang/String;" with the following methods:
Code:
.method private getDirectionDescription(I)Ljava/lang/String;
.locals 4
.parameter "index"
.prologue
.line 1119
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
if-eqz v2, :cond_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->isEmpty()Z
move-result v2
if-eqz v2, :cond_1
.line 1120
:cond_0
iget v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptionsResourceId:I
invoke-direct {p0, v2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->loadDescriptions(I)Ljava/util/ArrayList;
move-result-object v2
iput-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
.line 1121
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDrawables:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
iget-object v3, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-eq v2, v3, :cond_1
.line 1122
const-string v2, "GlowPadView"
const-string v3, "The number of target drawables must be equal to the number of direction descriptions."
invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1124
const/4 v0, 0x0
.line 1133
:goto_0
return-object v0
.line 1130
:cond_1
:try_start_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mDirectionDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 1131
.local v0, directionZ:Ljava/lang/String;
goto :goto_0
.line 1132
.end local v0 #directionZ:Ljava/lang/String;
:catch_0
move-exception v1
.line 1133
.local v1, e:Ljava/lang/Exception;
const-string v0, ""
goto :goto_0
.end method
Code:
.method private getTargetDescription(I)Ljava/lang/String;
.locals 4
.parameter "index"
.prologue
.line 1099
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
if-eqz v2, :cond_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->isEmpty()Z
move-result v2
if-eqz v2, :cond_1
.line 1100
:cond_0
iget v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptionsResourceId:I
invoke-direct {p0, v2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->loadDescriptions(I)Ljava/util/ArrayList;
move-result-object v2
iput-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
.line 1101
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDrawables:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
move-result v2
iget-object v3, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
move-result v3
if-eq v2, v3, :cond_1
.line 1102
const-string v2, "GlowPadView"
const-string v3, "The number of target drawables must be equal to the number of target descriptions."
invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 1104
const/4 v1, 0x0
.line 1114
:goto_0
return-object v1
.line 1109
:cond_1
const-string v1, ""
.line 1111
.local v1, targetZ:Ljava/lang/String;
:try_start_0
iget-object v2, p0, Lcom/android/internal/widget/multiwaveview/GlowPadView;->mTargetDescriptions:Ljava/util/ArrayList;
invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
move-object v0, v2
check-cast v0, Ljava/lang/String;
move-object v1, v0
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 1112
:catch_0
move-exception v2
goto :goto_0
.end method
Recompile your framework.jar
Now we're done with the framework, now we need to modify last file: android.policy.jar
android policy editing:
[JAVA]
Open /frameworks/base/policy/src/com/android/internal/policy/impl/LockScreen.java
Inside the method onTrigger, inside the switch (resId) add:
Code:
case com.android.internal.R.drawable.ic_lockscreen_phone:
Intent phoneIntent = new Intent(Intent.ACTION_MAIN);
phoneIntent.setClassName("com.android.contacts", "com.android.contacts.activities.DialtactsActivity");
phoneIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(phoneIntent);
mCallback.goToUnlockScreen();
break;
case com.android.internal.R.drawable.ic_lockscreen_sms:
Intent mmsIntent = new Intent(Intent.ACTION_MAIN);
mmsIntent.setClassName("com.android.mms", "com.android.mms.ui.ConversationList");
mmsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(mmsIntent);
mCallback.goToUnlockScreen();
break;
You're done, feel free to compile!
Of course you can use whatever activity you want, remember to change the images accordingly.
[SMALI]
Disassemble your android.policy.jar
Edit /com/android/internal/policy/impl/LockScreen.smali and add the following methods:
Code:
.method static synthetic access$1400(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
.locals 1
.parameter "x0"
.prologue
.line 56
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mContext:Landroid/content/Context;
return-object v0
.end method
.method static synthetic access$1500(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
.locals 1
.parameter "x0"
.prologue
.line 56
iget-object v0, p0, Lcom/android/internal/policy/impl/LockScreen;->mContext:Landroid/content/Context;
return-object v0
.end method
Edit /com/android/internal/policy/impl/LockScreen$GlowPadViewMethods.smali.
Replace the whole method onTrigger with:
Code:
.method public onTrigger(Landroid/view/View;I)V
.locals 7
.parameter "v"
.parameter "target"
.prologue
const/high16 v6, 0x1000
.line 313
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->mGlowPadView:Lcom/android/internal/widget/multiwaveview/GlowPadView;
invoke-virtual {v4, p2}, Lcom/android/internal/widget/multiwaveview/GlowPadView;->getResourceIdForTarget(I)I
move-result v3
.line 321
.local v3, resId:I
sparse-switch v3, :sswitch_data_0
.line 367
:goto_0
return-void
.line 323
:sswitch_0
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1200(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-static {v4}, Landroid/app/SearchManager;->getAssistIntent(Landroid/content/Context;)Landroid/content/Intent;
move-result-object v0
.line 324
.local v0, assistIntent:Landroid/content/Intent;
if-eqz v0, :cond_0
.line 325
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->launchActivity(Landroid/content/Intent;)V
.line 329
:goto_1
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto :goto_0
.line 327
:cond_0
const-string v4, "LockScreen"
const-string v5, "Failed to get intent for assist activity"
invoke-static {v4, v5}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_1
.line 333
.end local v0 #assistIntent:Landroid/content/Intent;
:sswitch_1
new-instance v4, Landroid/content/Intent;
const-string v5, "android.media.action.STILL_IMAGE_CAMERA"
invoke-direct {v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
invoke-direct {p0, v4}, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->launchActivity(Landroid/content/Intent;)V
.line 334
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto :goto_0
.line 339
:sswitch_2
new-instance v2, Landroid/content/Intent;
const-string v4, "android.intent.action.MAIN"
invoke-direct {v2, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 340
.local v2, phoneIntent:Landroid/content/Intent;
const-string v4, "com.android.contacts"
const-string v5, "com.android.contacts.activities.DialtactsActivity"
invoke-virtual {v2, v4, v5}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 341
invoke-virtual {v2, v6}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 342
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1300(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-virtual {v4, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 343
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto :goto_0
.line 348
.end local v2 #phoneIntent:Landroid/content/Intent;
:sswitch_3
new-instance v1, Landroid/content/Intent;
const-string v4, "android.intent.action.MAIN"
invoke-direct {v1, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 349
.local v1, mmsIntent:Landroid/content/Intent;
const-string v4, "com.android.mms"
const-string v5, "com.android.mms.ui.ConversationList"
invoke-virtual {v1, v4, v5}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 350
invoke-virtual {v1, v6}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 351
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$1400(Lcom/android/internal/policy/impl/LockScreen;)Landroid/content/Context;
move-result-object v4
invoke-virtual {v4, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 352
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto :goto_0
.line 357
.end local v1 #mmsIntent:Landroid/content/Intent;
:sswitch_4
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$500(Lcom/android/internal/policy/impl/LockScreen;)V
.line 358
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->pokeWakelock()V
goto/16 :goto_0
.line 364
:sswitch_5
iget-object v4, p0, Lcom/android/internal/policy/impl/LockScreen$GlowPadViewMethods;->this$0:Lcom/android/internal/policy/impl/LockScreen;
invoke-static {v4}, Lcom/android/internal/policy/impl/LockScreen;->access$400(Lcom/android/internal/policy/impl/LockScreen;)Lcom/android/internal/policy/impl/KeyguardScreenCallback;
move-result-object v4
invoke-interface {v4}, Lcom/android/internal/policy/impl/KeyguardScreenCallback;->goToUnlockScreen()V
goto/16 :goto_0
.line 321
:sswitch_data_0
.sparse-switch
0x1080294 -> :sswitch_0
0x10802dd -> :sswitch_1
0x10802f6 -> :sswitch_4
0x10802fe -> :sswitch_5
0x1080301 -> :sswitch_5
0x1080604 -> :sswitch_2
0x1080607 -> :sswitch_3
.end sparse-switch
.end method
Replace the values you wrote down back here:
Code:
0x1080294 -> :sswitch_0
0x10802dd -> :sswitch_1
0x10802f6 -> :sswitch_4
0x10802fe -> :sswitch_5
0x1080301 -> :sswitch_5
0x1080604 -> :sswitch_2
0x1080607 -> :sswitch_3
Recompile and you're good to go!
Enjoy and happy editing!
reserved
{
"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"
}
Make this into a flashable zip please?
onasri15 said:
Make this into a flashable zip please?
Click to expand...
Click to collapse
lazy people are lazy
http://forum.xda-developers.com/showthread.php?t=1794061
atl4ntis said:
lazy people are lazy
http://forum.xda-developers.com/showthread.php?t=1794061
Click to expand...
Click to collapse
I am curious those flash-able frameworks are only if u have STOCK and then they will add only that feature only. So if I am running another MOD I cannot flash those mods because they will overwrite the framework file and maybe change something else?
Dude. This mod is supposed to be in the Themes and Apps section, is not here. This is an Android Development section.
kalinusa said:
I am curious those flash-able frameworks are only if u have STOCK and then they will add only that feature only. So if I am running another MOD I cannot flash those mods because they will overwrite the framework file and maybe change something else?
Click to expand...
Click to collapse
this thread isn't about flashable stuff so please refrain from asking anything but editing coding stuff.
as for you question, of course if you got any other mods this one "MAY" break it, depends from the files involved in the mods. Do a nand backup and try yourself or get your modded files and edit them accordingly to this howto.
DaXmax said:
Dude. This mod is supposed to be in the Themes and Apps section, is not here. This is an Android Development section.
Click to expand...
Click to collapse
DUDE i see code and stuff here, i don't see why this doesn't belong to dev section. It's a ****ing howto. No themes or mods are published here.
This deserve more then any make -j1 otapackage + busybox stuff.
This won't work on CM10 right because the framework-res apk will probably be different than stock?
onasri15 said:
This won't work on CM10 right because the framework-res apk will probably be different than stock?
Click to expand...
Click to collapse
framework isn't an issue since you are just adding things..
android.policy could be a problem... if you know a bit about smali you could handle it.
Anyway the best way is to try.
Didn't cm10 already have a quad lockscreen btw?
im almost done but i dont know how to do this
"Disassemble your android.policy.jar"
mixtapes08 said:
im almost done but i dont know how to do this
"Disassemble your android.policy.jar"
Click to expand...
Click to collapse
use smali/baksmali or aapt/apktool
edit:typo
atl4ntis said:
use smali/baksmali or aapt/apktool
edit:typo
Click to expand...
Click to collapse
I didn't see this one but I've done it using my own self method lol and I got it on j belly 0.1.4 thank you so much
Sent from my Nexus S™
atl4ntis said:
This howto will teach you how to add a quad lockscreen with phone and messaging to any jb rom in 2 ways:
...
Enjoy and happy editing!
Click to expand...
Click to collapse
atl4ntis thanks for your explanation!
i have some problem whit my quad lockscreen! When i start a services on setting -> accessibility (as example talkback or iphone notification application services or an app that required his services activated!)
when i tap the center of screen to unlock the phone.. it reboot!
where i can look into the code for revolve this annoying problem?
thanks!
impazzito said:
atl4ntis thanks for your explanation!
i have some problem whit my quad lockscreen! When i start a services on setting -> accessibility (as example talkback or iphone notification application services or an app that required his services activated!)
when i tap the center of screen to unlock the phone.. it reboot!
where i can look into the code for revolve this annoying problem?
thanks!
Click to expand...
Click to collapse
+1 here. Do you have a solution?
reference.phone said:
+1 here. Do you have a solution?
Click to expand...
Click to collapse
do you have same problem?
i don't have this issue cos i'm not using the accessibiity service but i think the issue is here in:
/base/com/android/internal/widget/multiwaveview/GlobalPadView.java
Code:
private String getTargetDescription(int index) {
if (mTargetDescriptions == null || mTargetDescriptions.isEmpty()) {
mTargetDescriptions = loadDescriptions(mTargetDescriptionsResourceId);
if (mTargetDrawables.size() != mTargetDescriptions.size()) {
Log.w(TAG, "The number of target drawables must be"
+ " equal to the number of target descriptions.");
return null;
}
}
return mTargetDescriptions.get(index);
}
private String getDirectionDescription(int index) {
if (mDirectionDescriptions == null || mDirectionDescriptions.isEmpty()) {
mDirectionDescriptions = loadDescriptions(mDirectionDescriptionsResourceId);
if (mTargetDrawables.size() != mDirectionDescriptions.size()) {
Log.w(TAG, "The number of target drawables must be"
+ " equal to the number of direction descriptions.");
return null;
}
}
return mDirectionDescriptions.get(index);
}
specifically in the return mTargetDescriptions.get(index); and return mDirectionDescriptions.get(index);.
This should fix it:
Code:
- return mDirectionDescriptions.get(index);
+ try {
+ String directionZ = mDirectionDescriptions.get(index);
+ return directionZ;
+ } catch (Exception e) {
+ return "";
+ }
Code:
- return mTargetDescriptions.get(index);
+ try {
+ String targetZ = mTargetDescriptions.get(index);
+ } catch (Exception e) {
+ return targetZ;
+ }
Didn't try it and not sure when i can add the smali part, but it involves editing a new file, framework.jar.
I'm quite busy atm, going holiday tomorrow.
atl4ntis said:
i don't have this issue cos i'm not using the accessibiity service but i think the issue is here in:
/base/com/android/internal/widget/multiwaveview/GlobalPadView.java
Code:
private String getTargetDescription(int index) {
if (mTargetDescriptions == null || mTargetDescriptions.isEmpty()) {
mTargetDescriptions = loadDescriptions(mTargetDescriptionsResourceId);
if (mTargetDrawables.size() != mTargetDescriptions.size()) {
Log.w(TAG, "The number of target drawables must be"
+ " equal to the number of target descriptions.");
return null;
}
}
return mTargetDescriptions.get(index);
}
private String getDirectionDescription(int index) {
if (mDirectionDescriptions == null || mDirectionDescriptions.isEmpty()) {
mDirectionDescriptions = loadDescriptions(mDirectionDescriptionsResourceId);
if (mTargetDrawables.size() != mDirectionDescriptions.size()) {
Log.w(TAG, "The number of target drawables must be"
+ " equal to the number of direction descriptions.");
return null;
}
}
return mDirectionDescriptions.get(index);
}
specifically in the return mTargetDescriptions.get(index); and return mDirectionDescriptions.get(index);.
This should fix it:
Code:
- return mDirectionDescriptions.get(index);
+ try {
+ String directionZ = mDirectionDescriptions.get(index);
+ return directionZ;
+ } catch (Exception e) {
+ return "";
+ }
Code:
- return mTargetDescriptions.get(index);
+ try {
+ String targetZ = mTargetDescriptions.get(index);
+ } catch (Exception e) {
+ return targetZ;
+ }
Didn't try it and not sure when i can add the smali part, but it involves editing a new file, framework.jar.
I'm quite busy atm, going holiday tomorrow.
Click to expand...
Click to collapse
Im patiently waiting for your revisions sir
Sent from my Nexus S™
mixtapes08 said:
Im patiently waiting for your revisions sir
Sent from my Nexus S™
Click to expand...
Click to collapse
mixtapes08 may you make an alpha mod with this changes end give it to me so, if works, you will publish for the nex release of jelly belly?
thanks a lot!
impazzito said:
mixtapes08 may you make an alpha mod with this changes end give it to me so, if works, you will publish for the nex release of jelly belly?
thanks a lot!
Click to expand...
Click to collapse
That codes is for compiling from sources. Compiling from smali is different.
Sent from my Nexus S™
Hello Everyone ,
In this guide i'll show u how to add Reboot and Recovery option to power menu
There is lots of Guides on how to add recovery option to power menu but none worked perfectly on my device(MTK)
so i found a new way , in which we need not to find proper globalaction files
Requirements :
apktool
Notepad++
android.policy.jar
framework-res.apk
Time and Patience
Click to expand...
Click to collapse
Part-1
Decompile Your framework-res.apk and navigate to - res/value/strings.xml
add these lines at the end.
Code:
<string name="reboot_text">Reboot</string>
<string name="recovery_text">Recovery</string>
Like this
{
"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"
}
and add the attached pngs to - res/drawable-hdpi/ and compile the apk
again decompile the modded apk and open res/values/public.xml
Part-2
Now Decompile your "android.policy.jar" and add the attached files to - "android.policy.jar.out\smali\com\android\internal\policy\impl"
Now open GlobalActions.smali and find this method
Code:
.method private createDialog()Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
Below that you will see
Code:
.locals 11
change it to
Code:
.locals [COLOR="Red"]12[/COLOR]
Now find
Code:
.prologue
Below that paste this
Code:
const [COLOR="Red"]v11[/COLOR], 0x1080030 <------------ Replace the id with ic_lock_power_off (power off drawable) in the opened public.xml
Now Find this
Code:
new-instance [COLOR="Purple"]v1[/COLOR], Lcom/android/internal/policy/impl/GlobalActions$2;
const [COLOR="DarkGreen"]v2[/COLOR], 0x10400e7
change the id 0x10400e7 with the new id in public.xml
Code:
<public type="string" name="global_action_power_off"
now below that you will see
Code:
const [COLOR="Magenta"]v3[/COLOR], 0x10400e7
now delate the above line and paste this below
Code:
invoke-direct {v1, p0, v11, v2}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 317
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$98;
const [COLOR="Red"]v2[/COLOR], 0x108061a <----------id of <public type="drawable" name="ic_lock_reboot"
const [COLOR="Magenta"]v3[/COLOR], 0x104054f <----------id of <public type="string" name="reboot_text"
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$98;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 327
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;
const [COLOR="Red"]v2[/COLOR], 0x1080619 <---------- id of <public type="drawable" name="ic_lock_recovery"
const [COLOR="Magenta"]v3[/COLOR], 0x1040550 <-----------id of <public type="string" name="recovery_text"
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Replace the above ids with the id in your public.xml
Before :
Code:
.line 281
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
.line 284
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
[COLOR="RoyalBlue"]new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x10400e7
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[/COLOR]
.line 309
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 312
After :
Code:
.line 281
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
.line 284
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
[COLOR="Blue"] const v2, 0x10400e7
invoke-direct {v1, p0, v11, v2}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 317
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$98;
const v2, 0x108061a
const v3, 0x104054f
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$98;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 327
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;
const v2, 0x1080619
const v3, 0x1040550
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[/COLOR] .line 309
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Now compile and flash both the files
I have attached my GlobalActions.smali for comparision just change the extension from .zip to .smali
Result :
Hints :
1 . While Replacing the id from public.xml replace only last 7 digits
like this
2. keep track of registers (like v1 v2 v11 etc) and .Line numbers should be unique
3. Register values (like 0x108061a) will be Different for Different roms
I've Tested this guide on 3 different roms and it is working fine without any errors
If u Have any Problems Post here i'll try my best to help you
Credits/ Thanks
SuperDroidBond
Adi Aisiteru Reborn
Learnt many things from their guides ...
Click to expand...
Click to collapse
If you like my work Hit Thanks ..dont forget
Reserved ...
+1
reserved ..
Great guide bro :good:
hello aweasome guide sir thanks alot
put can you give me a smali tool you used
the guide is aweasome realy want to do it thanks
i have done the tutorial and when i press and hold power volume it softreboots
so where is the problem
hope any one here helps me
working for my device Xperia C
after changing Const V3 with V2 that u said in the section of putting the line 317 and 327
u have to fix it more as things are going wrong cause thereis gona be amiss in the last line
Mohamed Yahia San said:
working for my device Xperia C
after changing Const V3 with V2 that u said in the section of putting the line 317 and 327
u have to fix it more as things are going wrong cause thereis gona be amiss in the last line
Click to expand...
Click to collapse
hello how do you mean changing Const V3 with V2 ????
i mean instead OF
const v3, 0x10400e7
i made it
const v2, 0x10400e7
but with different id of course
Thanx sir it works on my mt6589 cross a88
*********RXS DEV TEAM Presents*********
Hello
We'll show you how to edit almost all applications Xperia, so to work with stock engine CM11 Theme
I'll show you how to change Xperia Theme accent color:
-somc_theme_accent_color_light
-somc_theme_accent_color_dark
-somc_accent_color_neutral
-semc_theme_accent_color
To stock CM11 theme engine colors:
-holo_blue_light
-holo_blue_dark
This Guide is for experienced themers !!!!
What we need:
-Apktool
-Notepad++
-Any file manager
-Xperia app running on your device With CM11 Rom
I use an application running on my ARC on LegacyXperia Cm11 build 906
Linki:
Z2 Home and widget: Z2 Home and Widget
Creadits RXS DEV TEAM
Here we go:
Decompile Z2 Home and Widget working on your Cm11
HOME.apk
-Find smili file : ThemeUtils.smali
smali\com\sonymobile\home\runtimeskinning\
-Open with Notepad++
Find this lines:
Code:
.line 36
.local v3, "themeColor":I
const-string v4, "somc_theme_accent_color_dark"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {v2, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v0
.line 38
.local v0, "colorId":I
if-nez v0, :cond_0
.line 40
const-string v4, "semc_theme_accent_color"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {v2, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v0
Change Code:
"somc_theme_accent_color_dark" to this "holo_blue_dark"
"semc_theme_accent_color" to this "holo_blue_dark"
"com.sonyericsson.uxp" to this "android"
SAVE FILE
CLOCK WIDGET
-Find file : Utils.smali
smali\com\sonyericsson\advancedwidget\clock\
-Open with Notepad++
-Find this lines:
Code:
.line 66
const-string v4, "somc_accent_color_neutral"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {p0, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
const-string v4, "somc_theme_accent_color_light"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {p0, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
Change Code:
"somc_accent_color_neutral" to this "holo_blue_light"
"somc_theme_accent_color_light" to this "holo_blue_light"
"com.sonyericsson.uxp" to this "android"
SAVE FILE
MUSIC WIDGET
Find file : Util.smali
smali\com\sonymobile\advancedwidget\util\
-Open with Notepad++
Find this lines:
Code:
.line 72
const-string v4, "somc_accent_color_neutral"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {p0, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
.line 78
const-string v4, "somc_theme_accent_color_light"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {p0, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
Change Code:
"somc_accent_color_neutral" to this "holo_blue_light"
"somc_theme_accent_color_light" to this "holo_blue_light"
"com.sonyericsson.uxp" to this "android"
SAVE FILE
TOP Contact WIDGET
Find file : TopContactsUtils.smali
smali\com\sonymobile\advancedwidget\topcontacts\
-Open with Notepad++
Find this lines:
Code:
.line 262
const-string v4, "somc_accent_color_neutral"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {p0, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
.line 268
const-string v4, "somc_theme_accent_color_light"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {p0, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
Change Code:
"somc_accent_color_neutral" to this "holo_blue_light"
"somc_theme_accent_color_light" to this "holo_blue_light"
"com.sonyericsson.uxp" to this "android"
SAVE FILE
World Clock WIDGET
Find file : ColorizeUtils.smali
\smali\com\sonymobile\advancedwidget\util\
-Open with Notepad++
Find this lines:
Code:
line 53
const-string v4, "somc_accent_color_neutral"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {p0, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
.line 59
const-string v4, "somc_theme_accent_color_light"
const-string v5, "color"
const-string v6, "com.sonyericsson.uxp"
invoke-virtual {p0, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
Change Code:
"somc_accent_color_neutral" to this "holo_blue_light"
"somc_theme_accent_color_light" to this "holo_blue_light"
"com.sonyericsson.uxp" to this "android"
SAVE FILE
RECOMPILE ALL APPS
Copy applications in the right places and Done
You now have the Xperia apps changing accent color According holo_blue_light and holo_blue_dark
Of course, not all app can thus modify. Sometimes a person making the Port of APP to CM11 can delete these lines in smili files
The color codes and packages can be in different places, depending on the device and Rom
You should then find these lines in the files smili
const-string v4, "holo_blue_light" This line represents the value in the file color.xml
const-string v5, "color"
const-string v6, "android" This value is the name of the package that contains the file color.xml
"android" is the name of the package framework-res.apk
More Apps Soon Greetings RXS DEV TEAM
BEFORE:
{
"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"
}
AFTER:
1. Decompile Z3 Calendar working on your Cm11
SemcCalendar.apk
2. Find smili file : ThemeFinder.smali
smali\android\util\
3. Open with Notepad++
Find this lines:
Code:
.method public static getColor(Landroid/content/res/Resources;)I
.locals 6
.param p0, "res" # Landroid/content/res/Resources;
.prologue
.line 63
const-string v3, "somc_theme_accent_color_light"
const-string v4, "color"
const-string v5, "com.sonyericsson.uxp"
invoke-virtual {p0, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
.line 67
.end local v0 # "accentColor":I
.end local v2 # "themeColors":[I
:cond_2
const-string v3, "semc_theme_accent_color"
const-string v4, "color"
const-string v5, "com.sonyericsson.uxp"
invoke-virtual {p0, v3, v4, v5}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
goto :goto_0
.end method
Change Code:
"somc_theme_accent_color_light" to this "holo_blue_light"
"semc_theme_accent_color" to this "holo_blue_light"
"com.sonyericsson.uxp" to this "android"
SAVE FILE
Recompile
Before:
After:
reserved
Disable Bluetooth/Alarm/Volume Notifications in StatusBar
This MOD disables the ongoing Notifications for Bluetooth, Alarm and Volume
and can easily be modified to remove other ongoing statusbar notifications.
this MOD operates a little different it not only removes the icon but also the notification
as well, thus freeing up the statusbar. I tried several different mods for this and none seemed to work
the way I wanted them to so with a lot of searching and a little luck i found the smali code to disable
them rather than just hide the icons.
STEP 1:
Pull SystemUI.apk either from your device or from your ROM.zip file
from device: adb pull /system/priv-app/SystemUI.apk
from ROM.zip: extract /system/priv-app/SystemUI.apk
STEP 2:
using available tools decompile the apk (either using apktool or Virtuous Ten Studio) I recomend VTS
Locate smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali
make the changes listed below:
For Bluetooth notifications:
Search for .method private final updateBluetooth(Landroid/content/IntentV
in that method search for const-string v6, "bluetooth" it should look like this
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_aa[/COLOR]
const-string v6, "bluetooth"
invoke-virtual {v4, v6, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
invoke-virtual {v4, v5, v6}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_aa[/COLOR]
:cond_0
return-void"
For Alarm search for .method private final updateAlarm(Landroid/content/IntentV
Add the lines in BLUE
Code:
.method private final updateAlarm(Landroid/content/Intent;)V
.locals 3
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
[COLOR="Blue"]goto :goto_cc[/COLOR]
const-string v2, "alarm_clock"
invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_cc[/COLOR]
return-void
.end method
For volume search for .method private final updateVolume()V
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_bb[/COLOR]
const-string v7, "volume"
invoke-virtual {v6, v7, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
:cond_1
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
if-eq v4, v5, :cond_2
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v6, "volume"
invoke-virtual {v5, v6, v4}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
[COLOR="Blue"]:goto_bb[/COLOR]
:cond_2
return-void
STEP 3:
Save the smali file, recompile the SystemUI.apk and push to your device to test
adb push SystemUI.apk /system/priv-app/SystemUI.apk
adb shell
cd /system/priv-app
chmod 0644 SystemUI.apk
reboot
This smali fragment contains many other ongoing statusbar notifications that can be disabled using the same methods as above.
@cstayton
You made the community alive .... Till we have Official LP.... Awesome work as always Sir[emoji106]
{
"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"
}
cstayton said:
Disable Bluetooth/Alarm/Volume Notifications in StatusBar
This MOD disables the ongoing Notifications for Bluetooth, Alarm and Volume
and can easily be modified to remove other ongoing statusbar notifications.
this MOD operates a little different it not only removes the icon but also the notification
as well, thus freeing up the statusbar. I tried several different mods for this and none seemed to work
the way I wanted them to so with a lot of searching and a little luck i found the smali code to disable
them rather than just hide the icons.
STEP 1:
Pull SystemUI.apk either from your device or from your ROM.zip file
from device: adb pull /system/priv-app/SystemUI.apk
from ROM.zip: extract /system/priv-app/SystemUI.apk
STEP 2:
using available tools decompile the apk (either using apktool or Virtuous Ten Studio) I recomend VTS
Locate smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali
make the changes listed below:
For Bluetooth notifications:
Search for .method private final updateBluetooth(Landroid/content/IntentV
in that method search for const-string v6, "bluetooth" it should look like this
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_aa[/COLOR]
const-string v6, "bluetooth"
invoke-virtual {v4, v6, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
invoke-virtual {v4, v5, v6}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_aa[/COLOR]
:cond_0
return-void"
For Alarm search for .method private final updateAlarm(Landroid/content/IntentV
Add the lines in BLUE
Code:
.method private final updateAlarm(Landroid/content/Intent;)V
.locals 3
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
[COLOR="Blue"]goto :goto_cc[/COLOR]
const-string v2, "alarm_clock"
invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_cc[/COLOR]
return-void
.end method
For volume search for .method private final updateVolume()V
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_bb[/COLOR]
const-string v7, "volume"
invoke-virtual {v6, v7, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
:cond_1
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
if-eq v4, v5, :cond_2
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v6, "volume"
invoke-virtual {v5, v6, v4}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
[COLOR="Blue"]:goto_bb[/COLOR]
:cond_2
return-void
STEP 3:
Save the smali file, recompile the SystemUI.apk and push to your device to test
adb push SystemUI.apk /system/priv-app/SystemUI.apk
adb shell
cd /system/priv-app
chmod 0644 SystemUI.apk
reboot
This smali fragment contains many other ongoing statusbar notifications that can be disabled using the same methods as above.
Click to expand...
Click to collapse
Hey man! Thanks for this!
I was wondering if you could help me out with the following, I want to hide my bluetooth icon if bluetooth is enable and not connected to a paired device, but show it if I am connected to a paired device.
Thanks.
Rkr87 said:
Hey man! Thanks for this!
I was wondering if you could help me out with the following, I want to hide my bluetooth icon if bluetooth is enable and not connected to a paired device, but show it if I am connected to a paired device.
Thanks.
Click to expand...
Click to collapse
that'll take a little digging i'll see what i can find, no guarantees tho
Hi All
{
"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"
}
iam apk5656 now with this new thread i think this is the first thread in whole world talking about android O easter egg and without xposed
/*I 'm Not Responsible For Any Damage Of Your Phone. Take Necessary Backup If You Are Indoubt.*/
this will work on any device GB/Ics/JB/KK even LP(not sure about LP+)
but give it a try you will lose nothing
Big Note
this is moded guide to suite android o plat logo the original thread is by aryan A.R and his Android N platlogo guide
his original theread: https://forum.xda-developers.com/an.../guide-add-android-n-platlogo-app-to-t3362744
so thx to him:fingers-crossed::fingers-crossed:
i didnt remove his name from the app he done a lot of greate works
so lets start with my moded guide over here
note: some pictures are low quality so you may see a crashed pictures
Features
Guide
Requirements:
1. De-compile your framework.jar. (In some cases like some Samsung Roms, and kitkat Roms it can be framework2.jar).
2. Know how to decompile JARs
3. PlatLogo app Download From-
HERE- https://drive.google.com/open?id=0B9PzgNqzqhBweWRsT05FdHJiZms
(If You Need To Just Test This App, You Are Free To Download It From Above)
Procedure:
1. Decompile framework.jar
2. Go to smali/com/android/internal/app and open PlatLogoActivity.smali
select all and replace with
Code:
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
.registers 7
.parameter "savedInstanceState"
.prologue
.line 16
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 18
new-instance v1, Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 19
.local v1, intent:Landroid/content/Intent;
new-instance v2, Landroid/content/ComponentName;
const-string v3, "com.aryan.nplatlogo"
const-string v4, "com.aryan.nplatlogo.PlatLogoActivity"
invoke-direct {v2, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 23
:try_start_16
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/Intent;)V
:try_end_19
.catch Landroid/content/ActivityNotFoundException; {:try_start_16 .. :try_end_19} :catch_1d
.line 39
:goto_19
invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
.line 41
return-void
.line 31
:catch_1d
move-exception v0
.line 35
.local v0, e:Landroid/content/ActivityNotFoundException;
const-string v2, "Install AndroidN PlatLogo By Aryan"
const/4 v3, 0x0
invoke-static {p0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v2
invoke-virtual {v2}, Landroid/widget/Toast;->show()V
goto :goto_19
.end method
4. Recompile framework.jar, Push it into system/framework. Set correct permissions(rw-r--r--).
5. Install My Android-O Platlogo. or push it into system
Credits:
Aryan A.R
iamareebjamal
[email protected]
Droidbuster
and me apk5656
If You Are Using This PlatLogo In Your ROM, Just Give A Credit To My Work.
If Your Liked My Work, Just Press Thanks Below
visit our site www.mohamedovic.com