[MOD][HOWTO][JB]Add quad lockscreen to any stock based JB rom. **UPDATED** - Nexus S Android Development

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™

Related

[guide][jb][3-way] easily enable extended power menu for mtk devices

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

[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]

[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]
How to permenantly remove SysScope from your Samsung Touchwiz ROM​
Tired of the constant custom padlock on startup? Want permenant device status "Official"?​
Team Blackout and KoolKit ROMs are not responsible if you blow up your house, your dog eats your homework,
the zombie apacolypse, your wife/husband divorcing you or if your device turns into an unrecognizable
smoldering pile of plastic. by reading this you agree to take all responsibility for any damage you do to the
universe, your device, your marriage or your failing grades in school or college.
Click to expand...
Click to collapse
This guide and mod originated in the Galaxy S4 threads and was created by @Aou who has since left the AT&T world so development
stopped at that point, I have taken the code and modded it slightly to work for our S5 devices (All variants even the Active)
Click to expand...
Click to collapse
All devs are free to use this MOD with proper recognition in your OP make sure you provide a mention to "Aou" for the
original code found here Removing SysScope - Permanent "Official" Device Status
and myself for the re-write of the instructions and changes to make this work for our devices.
Click to expand...
Click to collapse
NOTICE:
This MOD is not for the squeamish or novice modder it requires patience and a good amount of time to complete.
Click to expand...
Click to collapse
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Main Instructions:
1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)
2. Pull a copy of the SecSettings.apk
adb pull /system/priv-app/SecSettings.apk
3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)
4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.
REMOVE:
Code:
.field private isSysScopeStatus:I
REMOVE:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
REMOVE:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
REMOVE:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
REMOVE:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.
Code:
.line 952
const v1, 0x7f0901a7
TO:
Code:
.line 952
const v1, [B]0x7f0901a5[/B]
CHANGE:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
TO:
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
[B]const v1, 0x7f0901a6[/B]
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
Delete: /smali/com/android/settings/deviceinfo/status$2.smali
re-compile SecSettings.apk
INSTALL:
Install! Use "adb shell" to begin, and use the following commands, one at a time:
rm /system/app/SysScope.apk
rm -r /data/dalvik-cache/*
push SecSettings.apk /system/priv-app/SecSettings.apk
chmod 0644 /system/priv-app/SecSettings.apk
reboot
Click to expand...
Click to collapse
reserved
reserved
Nice. People with o.c.d. are gonna love this. Nice work.
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
GDofWR420 said:
Nice. People with o.c.d. are gonna love this. Nice work.
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Click to expand...
Click to collapse
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
cstayton said:
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
Click to expand...
Click to collapse
Lol. Yea no coffee this morning but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.
Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Here is not working
The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?
or change this
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
for this
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f0901a6
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
?
eric-filth said:
Here is not working
The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?
or change this
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
for this
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f0901a6
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
?
Click to expand...
Click to collapse
you need to change the whole method out the lines with the ID are what you need to look up in your build to match to the appropriate status response.
GDofWR420 said:
Lol. Yea no coffee this morning but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.
Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Click to expand...
Click to collapse
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
cstayton said:
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
Click to expand...
Click to collapse
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.
Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
GDofWR420 said:
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.
Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
Click to expand...
Click to collapse
hmmmm, i wonder if it has an entry in csc that it couldnt handle because its locked down? I might have to re-think the whole "xPosed-Proof" feature mod.
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
{
"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"
}
deduction said:
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
Click to expand...
Click to collapse
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
cstayton said:
How to permenantly remove SysScope from your Samsung Touchwiz ROM​
Tired of the constant custom padlock on startup? Want permenant device status "Official"?​
NOTICE:
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Main Instructions:
1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)
2. Pull a copy of the SecSettings.apk
adb pull /system/app/SecSettings.apk
3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)
4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.
REMOVE:
Code:
.field private isSysScopeStatus:I
REMOVE:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
REMOVE:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
REMOVE:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
REMOVE:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.
Code:
.line 952
const v1, 0x7f0901a7
TO:
Code:
.line 952
const v1, [B]0x7f0901a5[/B]
CHANGE:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
TO:
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
[B]const v1, 0x7f0901a6[/B]
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
INSTALL:
Click to expand...
Click to collapse
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
elliwigy said:
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
from the error looks as if you are trying to decompile with the wrong frameworks youll need to make sure the framework-res.apk and twframework-res.apk are the ones unmodded stock ones from your rom base
elliwigy said:
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
once you have the mod completed yes, remove sysscope.apk and place modded secsettings in rom base and flash
ok...can you take a look at these? I get about half way through your guide and then it gets lost. I don't know if the info just isnt there or what?
Thanks!
deduction said:
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
Click to expand...
Click to collapse
your not looking sysscope your actually looking for " <public type="string" name="sysscope_normal" you have to be specific in the search
am having trouble getting dropbox or anywhere to work. Here is the untouched status.smali.
Thanks very much...I keep getting stumped because the edits I need to make just don't seem to be there when I decompile the apk. Not sure why.
small change in OP
small change in OP
Delete: /smali/com/android/settings/deviceinfo/status$2.smali
re-compile SecSettings.apk
Hello.thanks man. Working great on my 5.1.1 Samsung note edge ROM..
regards
@cstayton
"<public type="string" name="sysscope_tampered" id="0x7f0a01be" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0a01bd" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0a01bc" />"
Those are my public values.
Im having trouble with the last Change. I have changed and removed everything else, could you help me with the last step? Im not sure what needs to be changed. My smali.status should be attached. any help is appreciated. thank you

[GUIDE][CM9-11] Add partition info in Settings.apk

Assalamualaikum
Hello guys, i want to share a simple guide with you
WHAT IS IT?
it's a guide to make a partition info in the Settings.apk
Source:
SCREENSHOT
{
"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"
}
Ok, let's start working on it
WHATS NEEDED?
- Brain
- A cup of coffe
- Use Apktool v 2.0.0 beta 9
- Settings.apk
- Attachment file
1. Decompile your Settings.apk
2. Download and extrack Attachment file and place it in the right place
3. Go to the ~\Settings\res\values\strings.xml
Add this code below before </resources>
Code:
<string name="partition_info_title">Partition info</string>
<string name="partition_info_system">/system</string>
<string name="partition_info_data">/data</string>
<string name="partition_info_cache">/cache</string>
<string name="partition_info_sdcard">/sdcard (FAT)</string>
<string name="partition_info_sdext">/sd-ext (EXT)</string>
<string name="partition_info_used_of">/</string>
<string name="nol">Unavailable</string>
</resources>
3. Go to the ~\Settings\res\xml\settings_headers.xml
Add this code below wherever you want inside settings_headers.xml
Code:
<header android:icon="@drawable/partition_info" android:title="@string/partition_info_title">
<intent android:targetPackage="com.android.settings" android:action="com.android.action.MAIN" android:targetClass="com.android.settings.ktech.PartitionInfo" />
</header>
4. Compile your Settings.apk and decompile again
5. Go to ~\Settings\AndroidManifest.xml
Code:
<activity android:label="@string/partition_info_title" android:name=".ktech.PartitionInfo">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.VOICE_LAUNCH"/>
</intent-filter>
</activity>
6. Go to the ~\Settings\smali\com\android\settings\ktech\PartitionInfo.smali
Find & replace this code below with your public id
Code:
Line 110 0x7f080403 public type="string" name="partition_info_used_of"
Line 189 0x7f050043 public type="xml" name="partition_info"
7. Recompile Settings.apk then Sign it
8. Push it in your phone
hi i have one problem i make all the steps and im getting fc of settings when im pushing ''partition info'' and then i see that after decompile (the second decompile) the partition_info is in pyblic type drawable and not in pyblic type xml im trying 5 times but nothing (sorry for my bad english)
G.M.L said:
hi i have one problem i make all the steps and im getting fc of settings when im pushing ''partition info'' and then i see that after decompile (the second decompile) the partition_info is in pyblic type drawable and not in pyblic type xml im trying 5 times but nothing (sorry for my bad english)
Click to expand...
Click to collapse
Post your log here
Here is it
OK I made it I changed the icon name in drawable-hdpi and after decomplile (the second time) in public the names are correct thanks k_tech!!!!!!
G.M.L.
G.M.L said:
OK I made it I changed the icon name in drawable-hdpi and after decomplile (the second time) in public the names are correct thanks k_tech!!!!!!
G.M.L.
Click to expand...
Click to collapse
Ok, good job
Thx sir, its work on my LG P713 (4.1.2)
Thx sir...
step6 is little confusing....could u plz be in detail.
rrajesh011 said:
step6 is little confusing....could u plz be in detail.
Click to expand...
Click to collapse
Open smali/com/android/settings/k_tech/partitioninfo.smali and leave it open
Open value/public.xml and find
type=string name=partition_info_used_of id=this number copy and paste to partition info.smali in line 1100
And
type=xml name=partition_info id=this number copy and paste in partition info.Smali in line 1890
Compile and its ready!!!
G.M.L.
G.M.L said:
Open smali/com/android/settings/k_tech/partitioninfo.smali and leave it open
Open value/public.xml and find
type=string name=partition_info_used_of id=this number copy and paste to partition info.smali in line 1100
And
type=xml name=partition_info id=this number copy and paste in partition info.Smali in line 1890
Compile and its ready!!!
G.M.L.
Click to expand...
Click to collapse
this is my partitioninfo.smali i didnot find line 189. i found line 110 but where to add public id.
Code:
.class public Lcom/android/settings/ktech/PartitionInfo;
.super Landroid/preference/PreferenceActivity;
.source "PartitionInfo.java"
# instance fields
.field private extfsIsMounted:Z
.field private mCachePartSize:Landroid/preference/Preference;
.field private mDataPartSize:Landroid/preference/Preference;
.field private mSDCardPartEXTSize:Landroid/preference/Preference;
.field private mSDCardPartFATSize:Landroid/preference/Preference;
.field private mSystemPartSize:Landroid/preference/Preference;
# direct methods
.method public constructor <init>()V
.locals 1
.prologue
.line 45
invoke-direct {p0}, Landroid/preference/PreferenceActivity;-><init>()V
.line 60
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/android/settings/ktech/PartitionInfo;->extfsIsMounted:Z
return-void
.end method
.method private ObtainFSPartSize(Ljava/lang/String;)Ljava/lang/String;
.locals 11
.param p1, "PartitionPath" # Ljava/lang/String;
.prologue
.line 103
new-instance v4, Ljava/io/File;
invoke-direct {v4, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 104
.local v4, "extraPath":Ljava/io/File;
new-instance v5, Landroid/os/StatFs;
invoke-virtual {v4}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v7
invoke-direct {v5, v7}, Landroid/os/StatFs;-><init>(Ljava/lang/String;)V
.line 105
.local v5, "extraStat":Landroid/os/StatFs;
invoke-virtual {v5}, Landroid/os/StatFs;->getBlockSize()I
move-result v7
int-to-long v0, v7
.line 106
.local v0, "eBlockSize":J
invoke-virtual {v5}, Landroid/os/StatFs;->getBlockCount()I
move-result v7
int-to-long v2, v7
.line 107
.local v2, "eTotalBlocks":J
mul-long v7, v2, v0
invoke-virtual {v5}, Landroid/os/StatFs;->getAvailableBlocks()I
move-result v9
int-to-long v9, v9
mul-long/2addr v9, v0
sub-long/2addr v7, v9
invoke-static {p0, v7, v8}, Landroid/text/format/Formatter;->formatFileSize(Landroid/content/Context;J)Ljava/lang/String;
move-result-object v6
.line 108
.local v6, "retstr":Ljava/lang/String;
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
const-string v8, " "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {p0}, Lcom/android/settings/ktech/PartitionInfo;->getResources()Landroid/content/res/Resources;
move-result-object v8
const v9, 0x7f080403
invoke-virtual {v8, v9}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v8
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
const-string v8, " "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
.line 109
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
mul-long v8, v2, v0
invoke-static {p0, v8, v9}, Landroid/text/format/Formatter;->formatFileSize(Landroid/content/Context;J)Ljava/lang/String;
move-result-object v8
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
.line 110
return-object v6
.end method
# virtual methods
.method public fileExists(Ljava/lang/String;)Z
.locals 2
.param p1, "filename" # Ljava/lang/String;
.prologue
.line 114
new-instance v0, Ljava/io/File;
invoke-direct {v0, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 115
.local v0, "f":Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v1
return v1
.end method
.method protected onCreate(Landroid/os/Bundle;)V
.locals 5
.param p1, "icicle" # Landroid/os/Bundle;
.prologue
const/4 v4, 0x1
.line 64
invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onCreate(Landroid/os/Bundle;)V
.line 66
const v2, 0x7f050043
invoke-virtual {p0, v2}, Lcom/android/settings/ktech/PartitionInfo;->addPreferencesFromResource(I)V
.line 68
invoke-virtual {p0}, Lcom/android/settings/ktech/PartitionInfo;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v1
.line 70
.local v1, "prefSet":Landroid/preference/PreferenceScreen;
const-string v2, "system_part_info"
invoke-virtual {v1, v2}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
iput-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mSystemPartSize:Landroid/preference/Preference;
.line 71
const-string v2, "data_part_info"
invoke-virtual {v1, v2}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
iput-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mDataPartSize:Landroid/preference/Preference;
.line 72
const-string v2, "cache_part_info"
invoke-virtual {v1, v2}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
iput-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mCachePartSize:Landroid/preference/Preference;
.line 73
const-string v2, "sdcard_part_info_fat"
invoke-virtual {v1, v2}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
iput-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mSDCardPartFATSize:Landroid/preference/Preference;
.line 74
const-string v2, "sdcard_part_info_ext"
invoke-virtual {v1, v2}, Landroid/preference/PreferenceScreen;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
iput-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mSDCardPartEXTSize:Landroid/preference/Preference;
.line 76
const-string v2, "/dev/block/mmcblk0p2"
invoke-virtual {p0, v2}, Lcom/android/settings/ktech/PartitionInfo;->fileExists(Ljava/lang/String;)Z
move-result v2
if-ne v2, v4, :cond_0
.line 77
const-string v2, "PartitionInfo"
const-string v3, "sd: ext partition mounted"
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 78
iput-boolean v4, p0, Lcom/android/settings/ktech/PartitionInfo;->extfsIsMounted:Z
.line 84
:goto_0
:try_start_0
iget-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mSystemPartSize:Landroid/preference/Preference;
const-string v3, "/system"
invoke-direct {p0, v3}, Lcom/android/settings/ktech/PartitionInfo;->ObtainFSPartSize(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 85
iget-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mDataPartSize:Landroid/preference/Preference;
const-string v3, "/data"
invoke-direct {p0, v3}, Lcom/android/settings/ktech/PartitionInfo;->ObtainFSPartSize(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 86
iget-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mCachePartSize:Landroid/preference/Preference;
const-string v3, "/cache"
invoke-direct {p0, v3}, Lcom/android/settings/ktech/PartitionInfo;->ObtainFSPartSize(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 87
iget-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mSDCardPartFATSize:Landroid/preference/Preference;
const-string v3, "/sdcard"
invoke-direct {p0, v3}, Lcom/android/settings/ktech/PartitionInfo;->ObtainFSPartSize(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 89
iget-boolean v2, p0, Lcom/android/settings/ktech/PartitionInfo;->extfsIsMounted:Z
if-ne v2, v4, :cond_1
.line 90
iget-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mSDCardPartEXTSize:Landroid/preference/Preference;
const-string v3, "/external_sd"
invoke-direct {p0, v3}, Lcom/android/settings/ktech/PartitionInfo;->ObtainFSPartSize(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
:try_end_0
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
.line 99
:goto_1
return-void
.line 80
:cond_0
const-string v2, "PartitionInfo"
const-string v3, "sd: ext partition not mounted"
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
.line 92
:cond_1
:try_start_1
iget-object v2, p0, Lcom/android/settings/ktech/PartitionInfo;->mSDCardPartEXTSize:Landroid/preference/Preference;
const/4 v3, 0x0
invoke-virtual {v2, v3}, Landroid/preference/Preference;->setEnabled(Z)V
:try_end_1
.catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_0
goto :goto_1
.line 95
:catch_0
move-exception v0
.line 96
.local v0, "e":Ljava/lang/IllegalArgumentException;
invoke-virtual {v0}, Ljava/lang/IllegalArgumentException;->printStackTrace()V
goto :goto_1
.end method
Change
0x7f080403 in line 110 with the id of partition_info_used_of
and
0x7f050058 in line 189 with the id of partition_info
Thanks
nice sir.
but i have problem, for /sd-ext(EXT) is displayed unavailable. i have 16gb external storage..
My rom is stock 4.1.2 touchwiz.
hope can fix :fingers-crossed:
syaeful said:
nice sir.
but i have problem, for /sd-ext(EXT) is displayed unavailable. i have 16gb external storage..
My rom is stock 4.1.2 touchwiz.
hope can fix :fingers-crossed:
Click to expand...
Click to collapse
Try this smali and tell me if it work
G.M.L said:
Try this smali and tell me if it work
Click to expand...
Click to collapse
thanks sir... i will try and give feedback later
---------- Post added at 10:23 AM ---------- Previous post was at 10:04 AM ----------
Still same sir,,
syaeful said:
thanks sir... i will try and give feedback later
---------- Post added at 10:23 AM ---------- Previous post was at 10:04 AM ----------
Still same sir,,
Click to expand...
Click to collapse
I will check it again later and I will tell you
G.M.L.
syaeful said:
thanks sir... i will try and give feedback later
---------- Post added at 10:23 AM ---------- Previous post was at 10:04 AM ----------
Still same sir,,
Click to expand...
Click to collapse
in partition_info.xml try to change @string/nol with @string/status_unavailable and tell me
in Android_manifest.xml did you add the activity?
G.M.L said:
in partition_info.xml try to change @string/nol with @string/status_unavailable and tell me
in Android_manifest.xml did you add the activity?
Click to expand...
Click to collapse
i have done with manifest..
i wil try for strings. thanks before
G.M.L said:
Try this smali and tell me if it work
Click to expand...
Click to collapse
thank you. ROM cook me JB 4.1.2
i try this smali

[GUIDE]How To Replace Standered Platlogo With Lollipop Platlogo

HELLLO EVERYONE!! I AM BACK WITH MY GUIDE WHICH WILL HELP YOU REPLACE THE STANDARD PLATLOGO WITH THE LATEST LOLLIPOP PLATLOGO......​REQUIREMENTS
[*]Apktool
[*]Java Runtime Environment
[*]Java Development Kit
[*]Notepad++
[*]A WORKING BRAIN!!
LETS GET STARTED.....
[*]Decompile Framework.jar
[*]goto framework.jar.out\smali\com\android\internal\app
[*]Open PlatLogoActivity.xml
[*]Replace The Whole Code With Mine
Code:
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
.locals 5
.param p1, "savedInstanceState" # Landroid/os/Bundle;
.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, "areeb.xposed.eggster"
const-string v4, "areeb.xposed.eggster.lp.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_0
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 39
:goto_0
invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
.line 41
return-void
.line 31
:catch_0
move-exception v0
.line 35
.local v0, "e":Landroid/content/ActivityNotFoundException;
const-string v2, "First install that app Chetan told you to!"
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_0
.end method
[*]Save The XML
[*]Recompile The Framework
[*]Now Download The 2 APK's From Attachments And Install Them Before Pushing The Framework
[*]Push The framework.jar To Device
[*]ENJOY!!
AND THE MOST IMPORTANT THING..............HIT THANKS IF YOU LIKE M WORK!!
i can't see any code
+1
WAIT
AuliaYF said:
i can't see any code
Click to expand...
Click to collapse
I am making the thread now bro......wait
AuliaYF said:
i can't see any code
Click to expand...
Click to collapse
Added It!!HIT THANKS IF I HELPED U!!

[MOD][Guide]Toggles for devs to add to Custom Settings [Lollipop]

Couple Status Bar Icon Toggles I'll share. Thanks to @loserskater for his guides pointing me in the right direction. Also to @Goldie for the smali guide. And a little bit of digging through @tdunham and @rompnit's SystemUI from MOAR. I've gotten their permission to post these guides and I plan to expand upon it. Figured I'd give it its own thread too.
Add Toggle On/Off for Alarm Icon
First you will want to increase .locals by 1. Mine was .locals 5 and I changed it to .locals 6 for this. The basic idea when doing these is that you need to look at the locals you have right now. They are always 1 higher than what the highest value or v in the method is. Noting this so that this can be done on other devices besides the S5 in case code has changed and the values.
For a quick example of what values you need for the new code we're adding. We will look at what I've done with this alarm on/off toggle. We are adding 2 new values so look at the locals now. Look at the method and see what the highest value is. Where I have v4 in all the lines we're adding you will be putting it 1 value (v) higher than what the highest one in the file is. Next is the string for the toggle itself in this case it is const-string v5, "statusbar_hide_alarm". This is you key that the toggle runs off of. It will need to be 1 higher than the others. Next you will see this line with 3 values. v4 which we just went over is the first value. Then v5 which is the key will be second. And lastly v1 which is going to always be from the setIconVisibility line that was originally in the code where we are modifying to add the toggle. In this case. "invoke-virtual {v2, v3, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V" As you can see it is v1 in that line so you will place it last in the getInt line and replace it in the const/4 v1, 0x0 near the end of what we're adding.
invoke-static {v4, v5, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
As far as the cond (condition) lines go you can make them :condtm or whatever you want as long as the condition isn't already used in the method. Similar to the values.​
In SystemUI.apk edit com/android/statusbar/phone/StatusBarPhonePolicy.smali
Search for .method private updateAlarm()V
Add lines in blue. Change lines in green.
Code:
.method private updateAlarm()V
[COLOR="Green"].locals 6[/COLOR]
.prologue
.line 221
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const-string v3, "alarm"
invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/AlarmManager;
.line 222
.local v0, "alarmManager":Landroid/app/AlarmManager;
const/4 v2, -0x2
invoke-virtual {v0, v2}, Landroid/app/AlarmManager;->getNextAlarmClock(I)Landroid/app/AlarmManager$AlarmClockInfo;
move-result-object v2
if-eqz v2, :cond_0
const/4 v1, 0x1
.line 223
.local v1, "alarmSet":Z
:goto_0
[COLOR="Blue"]iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "statusbar_hide_alarm"
invoke-static {v4, v5, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-nez v4, :cond_tm
const/4 v1, 0x0
:cond_tm[/COLOR]
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v3, "alarm_clock"
invoke-virtual {v2, v3, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 224
return-void
.line 222
.end local v1 # "alarmSet":Z
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
In your CustomSettings.apk add this line to preferences.xml where you want the toggle to appear.
<CheckBoxPreference android:title="Hide Alarm Icon" android:key="statusbar_hide_alarm" android:summaryOn="Alarm icon is visible." android:summaryOff="Alarm icon is hidden." />
Add Toggle On/Off for Bluetooth Icon
In SystemUI.apk edit com/android/statusbar/phone/StatusBarPhonePolicy.smali
First you will want to increase .locals by 2 because we are adding 2 new values. Mine was .locals 6 and I changed it to .locals 8 for this. The basic idea when doing these is that you need to look at the locals you have right now. They are always 1 higher than what the highest value or v in the method is. Noting this so that this can be done on other devices besides the S5 in case code has changed and the values.
Code:
.method private final updateBluetooth()V
[COLOR="green"].locals 8[/COLOR]
.prologue
const/4 v4, 0x0
.line 393
invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;
move-result-object v0
.line 394
.local v0, "adapter":Landroid/bluetooth/BluetoothAdapter;
const v2, 0x7f0202a8
.line 395
.local v2, "iconId":I
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const v5, 0x7f0c020a
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
.line 397
.local v1, "contentDescription":Ljava/lang/String;
if-eqz v0, :cond_2
.line 398
invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getState()I
move-result v3
const/16 v5, 0xc
if-ne v3, v5, :cond_1
const/4 v3, 0x1
:goto_0
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
.line 399
invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getConnectionState()I
move-result v3
const/4 v5, 0x2
if-ne v3, v5, :cond_0
.line 400
const v2, 0x7f0202a9
.line 401
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const v5, 0x7f0c0209
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
.line 407
:cond_0
:goto_1
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
invoke-virtual {v3, v5, v2, v4, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
.line 408
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v4, "bluetooth"
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
[COLOR="Blue"]iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v6}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v6
const-string v7, "statusbar_hide_bluetooth"
invoke-static {v6, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v6
if-nez v6, :cond_tm
const/4 v5, 0x0
:cond_tm[/COLOR]
invoke-virtual {v3, v4, v5}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 409
return-void
:cond_1
move v3, v4
.line 398
goto :goto_0
.line 367
:cond_2
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
goto :goto_1
.end method
In your CustomSettings.apk add this line to preferences.xml where you want the toggle to appear.
<CheckBoxPreference android:title="Hide Bluetooth Icon" android:key="statusbar_hide_bluetooth" android:summaryOn="Bluetooth Icon is visible." android:summaryOff="Bluetooth Icon is hidden." />
Volume Icons (Vibrate/Silent) on/off
This guide will be split into 2 parts. 1st for those that have enough registers left in this method we're adding then for those that don't. How to tell if you have enough room? If the locals is higher than 13 than you have too many in the method from the start for us to add these. Again I raised the locals by 2 since we're adding 2 more to it. So from 13 to 15 (the max). So if its 13 you'll be changing them to 15 like so
Code:
.method private final updateVolumeZen()V
[COLOR="Green"].locals 15[/COLOR]
Now that we fixed the locals search in the same method for these strings. It will make life easier than posting the long method for this since they're toward the end.
Search for Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V and add the blue lines above it.
Code:
iget-object v7, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v8, "volume"
[COLOR="Blue"] iget-object v14, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v14}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v14
const-string v13, "statusbar_hide_volume"
invoke-static {v14, v13, [COLOR="Purple"]v3[/COLOR]}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v14
if-nez v14, :cond_tm
const/4 [COLOR="Purple"]v3[/COLOR], 0x0
:cond_tm[/COLOR]
invoke-virtual {v7, v8, [COLOR="Purple"]v3[/COLOR]}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
Now we will have to repeat this a 2nd time for the 2nd icon.
Search again for Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V and add the blue lines above it.
I will make the values match those above because thats what it needs so adjust accordingly. Then you need to input the correct value from setIconVisibilty line like I showed in the first guide. It will be the 3rd Value(v) in this line which I marked them with purple. So as you'll see they match.
Code:
iget-object v7, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v8, "zen"
[COLOR="Blue"]iget-object v14, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v14}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v14
const-string v13, "statusbar_hide_volume"
invoke-static {v14, v13, [COLOR="Purple"]v6[/COLOR]}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v14
if-nez v14, :cond_b
const/4 [COLOR="Purple"]v6[/COLOR], 0x0
:cond_b[/COLOR]
invoke-virtual {v7, v8, [COLOR="Purple"]v6}[/COLOR], Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mZenVisible:Z
Now to add the toggle to custom settings. Add it in with the last 2 in preferences.xml
<CheckBoxPreference android:title="Hide Volume Icons" android:key="statusbar_hide_volume" android:summaryOn="Vibration and Silent Icons are visible." android:summaryOff="Vibration and Silent Icons are hidden." />
Part 2 for those of you like me who have too many registers.
Haven't figured this one out yet. Having some trouble with it.
Reserved 2
Awesome, thank you for this.
Almost forgot I did one for Home Key Wake too. I'll add this one in this post in a few minutes. Thanks to @rompnit and @tdunham for their guide for disabling this which pointed me in the right direction.
[Guide] How To Add Toggle for Home Key Wake
Edit android.policy.jar edit the smali/com/android/interal/policy/impl/PhoneWindowManager.smali
Search for .method private isWakeKeyWhenScreenOff(I)Z
Add lines in blue. Change ones in green.
Ignore .line codes they probably will be different. I changed the locals for this method from 3 to 5 because we're adding 2 more values here. The basic idea when doing these is that you need to look at the locals you have right now in the method. They are always 1 higher than what the highest value or v in the method is.
Code:
.method private isWakeKeyWhenScreenOff(I)Z
[COLOR="Green"] .locals 5[/COLOR]
.param p1, "keyCode" # I
.prologue
const/4 v0, 0x1
const/4 v1, 0x0
.line 5966
sparse-switch p1, :sswitch_data_0
.line 5992
:cond_0
:goto_0
return v0
.line 5971
:sswitch_0
iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mDockMode:I
if-nez v2, :cond_0
move v0, v1
goto :goto_0
:sswitch_1
move v0, v1
.line 5990
goto :goto_0
[COLOR="Blue"]:sswitch_2
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "wake_home"
const v4, 0x1
invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-nez v3, :cond_0
return v1[/COLOR]
.line 5966
:sswitch_data_0
.sparse-switch
[COLOR="Green"]0x3 -> :sswitch_2[/COLOR]
0x19 -> :sswitch_0
0x1b -> :sswitch_1
0x4f -> :sswitch_1
0x55 -> :sswitch_1
0x56 -> :sswitch_1
0x57 -> :sswitch_1
0x58 -> :sswitch_1
0x59 -> :sswitch_1
0x5a -> :sswitch_1
0x5b -> :sswitch_1
0x7e -> :sswitch_1
0x7f -> :sswitch_1
0x82 -> :sswitch_1
0xa4 -> :sswitch_0
0xde -> :sswitch_1
0x149 -> :sswitch_1
.end sparse-switch
.end method
Now to add it to CustomSettings.apk. This will add a screen just for Hardware Key Mods. You can just add the part in red wherever if you don't want it in its own screen.
<PreferenceScreen android:title="Hardware Key Mods">
<PreferenceScreen android:title="Home Button Wake" android:summary="Prevents screen wake with Home button.">
<CheckBoxPreference android:title="Disable Home Button Wake" android:key="wake_home" android:defaultValue="false" android:summaryOn="Home Button Enabled" android:summaryOff="Home Button Disabled" />
</PreferenceScreen>
</PreferenceScreen>
Very nice guides! I'm going to try these out on my S6. I'll let you know how it goes when I get a chance to try them. Thanks.
Awesome guides @talkingmonkeys keep em coming!! Can't wait to try these!
Perhaps @Goldie or @txr33 or @daxgirl if any of you have the time you could any of you help me with adding the code for a toggle when theres already too many values in the method? I have 23 locals for the method that the volume icons for status bar are in. @tdunham suggested trying to find some between 1-15 that were unused but after trying every one its always telling me its wrong on the compile. Thanks for any help! I'll provide files if needed.
I will gladly have a look
And btw although I was the first one with thanks, still didn't get time to congratulate! You always do amazing job! Any guide you make is amazing! Keep'em coming!
Sent from my awesome g920f powered by 6thGear
daxgirl said:
I will gladly have a look
And btw although I was the first one with thanks, still didn't get time to congratulate! You always do amazing job! Any guide you make is amazing! Keep'em coming!
Sent from my awesome g920f powered by 6thGear
Click to expand...
Click to collapse
Sent you what needs looked at in a pm. Thank you but if it wasn't for you, goldie, tdunham and rompnit I would still be lost with all of this.
talkingmonkeys said:
Couple Status Bar Icon Toggles I'll share. Thanks to @loserskater for his guides pointing me in the right direction. Also to @Goldie for the smali guide. And a little bit of digging through @tdunham and @rompnit's SystemUI from MOAR. I've gotten their permission to post these guides and I plan to expand upon it. Figured I'd give it its own thread too.
Add Toggle On/Off for Alarm Icon
First you will want to increase .locals by 1. Mine was .locals 5 and I changed it to .locals 6 for this. The basic idea when doing these is that you need to look at the locals you have right now. They are always 1 higher than what the highest value or v in the method is. Noting this so that this can be done on other devices besides the S5 in case code has changed and the values.
For a quick example of what values you need for the new code we're adding. We will look at what I've done with this alarm on/off toggle. We are adding 2 new values so look at the locals now. Look at the method and see what the highest value is. Where I have v4 in all the lines we're adding you will be putting it 1 value (v) higher than what the highest one in the file is. Next is the string for the toggle itself in this case it is const-string v5, "statusbar_hide_alarm". This is you key that the toggle runs off of. It will need to be 1 higher than the others. Next you will see this line with 3 values. v4 which we just went over is the first value. Then v5 which is the key will be second. And lastly v1 which is going to always be from the setIconVisibility line that was originally in the code where we are modifying to add the toggle. In this case. "invoke-virtual {v2, v3, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V" As you can see it is v1 in that line so you will place it last in the getInt line and replace it in the const/4 v1, 0x0 near the end of what we're adding.
invoke-static {v4, v5, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
As far as the cond (condition) lines go you can make them :condtm or whatever you want as long as the condition isn't already used in the method. Similar to the values.​
In SystemUI.apk edit com/android/statusbar/phone/StatusBarPhonePolicy.smali
Search for .method private updateAlarm()V
Add lines in blue. Change lines in green.
Code:
.method private updateAlarm()V
[COLOR="Green"].locals 6[/COLOR]
.prologue
.line 221
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const-string v3, "alarm"
invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/AlarmManager;
.line 222
.local v0, "alarmManager":Landroid/app/AlarmManager;
const/4 v2, -0x2
invoke-virtual {v0, v2}, Landroid/app/AlarmManager;->getNextAlarmClock(I)Landroid/app/AlarmManager$AlarmClockInfo;
move-result-object v2
if-eqz v2, :cond_0
const/4 v1, 0x1
.line 223
.local v1, "alarmSet":Z
:goto_0
[COLOR="Blue"]iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v5, "statusbar_hide_alarm"
invoke-static {v4, v5, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v4
if-nez v4, :cond_tm
const/4 v1, 0x0
:cond_tm[/COLOR]
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v3, "alarm_clock"
invoke-virtual {v2, v3, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 224
return-void
.line 222
.end local v1 # "alarmSet":Z
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
In your CustomSettings.apk add this line to preferences.xml where you want the toggle to appear.
<CheckBoxPreference android:title="Hide Alarm Icon" android:key="statusbar_hide_alarm" android:summaryOn="Alarm icon is visible." android:summaryOff="Alarm icon is hidden." />
Add Toggle On/Off for Bluetooth Icon
In SystemUI.apk edit com/android/statusbar/phone/StatusBarPhonePolicy.smali
First you will want to increase .locals by 2 because we are adding 2 new values. Mine was .locals 6 and I changed it to .locals 8 for this. The basic idea when doing these is that you need to look at the locals you have right now. They are always 1 higher than what the highest value or v in the method is. Noting this so that this can be done on other devices besides the S5 in case code has changed and the values.
Code:
.method private final updateBluetooth()V
[COLOR="green"].locals 8[/COLOR]
.prologue
const/4 v4, 0x0
.line 393
invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;
move-result-object v0
.line 394
.local v0, "adapter":Landroid/bluetooth/BluetoothAdapter;
const v2, 0x7f0202a8
.line 395
.local v2, "iconId":I
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const v5, 0x7f0c020a
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
.line 397
.local v1, "contentDescription":Ljava/lang/String;
if-eqz v0, :cond_2
.line 398
invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getState()I
move-result v3
const/16 v5, 0xc
if-ne v3, v5, :cond_1
const/4 v3, 0x1
:goto_0
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
.line 399
invoke-virtual {v0}, Landroid/bluetooth/BluetoothAdapter;->getConnectionState()I
move-result v3
const/4 v5, 0x2
if-ne v3, v5, :cond_0
.line 400
const v2, 0x7f0202a9
.line 401
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
const v5, 0x7f0c0209
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
.line 407
:cond_0
:goto_1
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
invoke-virtual {v3, v5, v2, v4, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
.line 408
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v4, "bluetooth"
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
[COLOR="Blue"]iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v6}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v6
const-string v7, "statusbar_hide_bluetooth"
invoke-static {v6, v7, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v6
if-nez v6, :cond_tm
const/4 v5, 0x0
:cond_tm[/COLOR]
invoke-virtual {v3, v4, v5}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 409
return-void
:cond_1
move v3, v4
.line 398
goto :goto_0
.line 367
:cond_2
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
goto :goto_1
.end method
In your CustomSettings.apk add this line to preferences.xml where you want the toggle to appear.
<CheckBoxPreference android:title="Hide Bluetooth Icon" android:key="statusbar_hide_bluetooth" android:summaryOn="Bluetooth Icon is visible." android:summaryOff="Bluetooth Icon is hidden." />
Click to expand...
Click to collapse
with .local 4 .local change and would be 5 or more things have to change?
talkingmonkeys said:
Almost forgot I did one for Home Key Wake too. I'll add this one in this post in a few minutes. Thanks to @rompnit and @tdunham for their guide for disabling this which pointed me in the right direction.
[Guide] How To Add Toggle for Home Key Wake
Edit android.policy.jar edit the smali/com/android/interal/policy/impl/PhoneWindowManager.smali
Search for .method private isWakeKeyWhenScreenOff(I)Z
Add lines in blue. Change ones in green.
Ignore .line codes they probably will be different. I changed the locals for this method from 3 to 5 because we're adding 2 more values here. The basic idea when doing these is that you need to look at the locals you have right now in the method. They are always 1 higher than what the highest value or v in the method is.
Code:
.method private isWakeKeyWhenScreenOff(I)Z
[COLOR="Green"] .locals 5[/COLOR]
.param p1, "keyCode" # I
.prologue
const/4 v0, 0x1
const/4 v1, 0x0
.line 5966
sparse-switch p1, :sswitch_data_0
.line 5992
:cond_0
:goto_0
return v0
.line 5971
:sswitch_0
iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mDockMode:I
if-nez v2, :cond_0
move v0, v1
goto :goto_0
:sswitch_1
move v0, v1
.line 5990
goto :goto_0
[COLOR="Blue"]:sswitch_2
iget-object v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "wake_home"
const v4, 0x1
invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-nez v3, :cond_0
return v1[/COLOR]
.line 5966
:sswitch_data_0
.sparse-switch
[COLOR="Green"]0x3 -> :sswitch_2[/COLOR]
0x19 -> :sswitch_0
0x1b -> :sswitch_1
0x4f -> :sswitch_1
0x55 -> :sswitch_1
0x56 -> :sswitch_1
0x57 -> :sswitch_1
0x58 -> :sswitch_1
0x59 -> :sswitch_1
0x5a -> :sswitch_1
0x5b -> :sswitch_1
0x7e -> :sswitch_1
0x7f -> :sswitch_1
0x82 -> :sswitch_1
0xa4 -> :sswitch_0
0xde -> :sswitch_1
0x149 -> :sswitch_1
.end sparse-switch
.end method
Now to add it to CustomSettings.apk. This will add a screen just for Hardware Key Mods. You can just add the part in red wherever if you don't want it in its own screen.
<PreferenceScreen android:title="Hardware Key Mods">
<PreferenceScreen android:title="Home Button Wake" android:summary="Prevents screen wake with Home button.">
<CheckBoxPreference android:title="Disable Home Button Wake" android:key="wake_home" android:defaultValue="false" android:summaryOn="Home Button Enabled" android:summaryOff="Home Button Disabled" />
</PreferenceScreen>
</PreferenceScreen>
Click to expand...
Click to collapse
bro in the latest version of lollipop for note 4 there have been some changes .locals have been changed to .registers
does this make any difference ??
and i get bootloop when ever i try to make changes
i have attached stock file if you can take a look
Er. Aditya said:
bro in the latest version of lollipop for note 4 there have been some changes .locals have been changed to .registers
does this make any difference ??
and i get bootloop when ever i try to make changes
i have attached stock file if you can take a look
Click to expand...
Click to collapse
The registers instead of locals is because of the version of apktool you are using. It won't make any difference just for those.
tdunham said:
The registers instead of locals is because of the version of apktool you are using. It won't make any difference just for those.
Click to expand...
Click to collapse
il try again sir , but it gave me bootloop and report back here with all the reports
Didn't read all the posts
Can we utilize some .end local for hiding of the sound icon? Just thinking out loud.
evilvoice said:
Can we utilize some .end local for hiding of the sound icon? Just thinking out loud.
Click to expand...
Click to collapse
@daxgirl do you think we would?
{
"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"
}
talkingmonkeys said:
@daxgirl do you think we would?
Click to expand...
Click to collapse
I think it should be noted that there is only 1 setIconVisibility in the updateVolumeZen method. Also, in talking about .end local. I see v15 is never restarted. They also end a bunch of locals from dnd and noti settings. These are restarted AFTER the setIconVisibility. There is also this at the beginning of the mthod
Code:
.line 278
.local v18, "zenVisible":Z
const/16 v17, 0x0
.
.
.
.line 282
.local v14, "volumeVisible":Z
const/4 v13, 0x0
.
.
.
## and further down
.
.
.
:cond_5
if-eqz v14, :cond_6
.line 387
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
move-object/from16 v19, v0
const-string v20, "volume"
const/16 v21, 0x0
move-object/from16 v0, v19
move-object/from16 v1, v20
move/from16 v2, v21
invoke-virtual {v0, v1, v13, v2, v12}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
.line 389
:cond_6
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
move/from16 v19, v0
move/from16 v0, v19
if-eq v14, v0, :cond_7
.line 390
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
move-object/from16 v19, v0
const-string v20, "volume"
move-object/from16 v0, v19
move-object/from16 v1, v20
invoke-virtual {v0, v1, v14}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 391
move-object/from16 v0, p0
iput-boolean v14, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
.line 393
:cond_7
return-void
What stands out to me is the Visible portions of the code...maybe we can manipulate these to work for us
Very well written, thanks for sharing. I'm trying to add a toggle for center clock, and to add options for normal/small/no am/pm. No crazy color changing or size changing for the clock. If you have any input on that I would be very grateful!
Okay, so back to the volume hide mod, tdunham just posted a mod that increased locals from 31 to 33, so it is possible to go higher than 15. Maybe just try the mod and see what happens? I do know that only the 1st part of the mod is contained in that method, the 2nd part is contained in the public constructor and a bit different.

Categories

Resources