[How-To]CRT-OFF Animation Toggle (made using XXEMB5 [4.1.2]) - Galaxy S III Android Development

I'm posting this here as I helped Kryten2k35 make this for his base XXEMB5 (4.1.2) but they are all likely very similar.
The code is very similar to the SGS2 and I have edited it for this base. My original thread is here: http://forum.xda-developers.com/showthread.php?t=2194003
I've been having many PM's on how to create this toggle and honestly I have been meaning to post this for a while.
Firstly thanks to Mirko-ddd for enabling Crt-Off Animation which allowed me to do this. Thank him HERE
No need to enable from the link above as I have included it with this toggle How-To.
Also Thanks to my teammate Jeboo for teaching me some smali and helping me with this function!
So I'm not a posting master and I do have 2 kids buzzing around me while I type this!.. LOL :highfive:
Here we start with SecSettings.apk
1)
/res/values/Strings.xml
Code:
<string name="crtanimation_title">CRT Animation</string>
<string name="crtanimation_summary">Enables animation when powering off screen</string>
2)
/res/xml/Display_Settings.xml (Input this line where you want it to show.)
Code:
<CheckBoxPreference android:title="@string/crtanimation_title" android:summary="@string/crtanimation_summary" android:key="crtanimation_toggle" />
3)
\SecSettings\smali\com\android\settings\DisplaySettings.smali
Add the RED
Code:
.field mSupportFolderType:Z
.field private mTouchKeyLight:Landroid/preference/ListPreference;
[COLOR="red"].field private mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
4)
Code:
const-string v13, "key_multi_window"
move-object/from16 v0, p0
invoke-virtual {v0, v13}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v13
check-cast v13, Landroid/preference/CheckBoxPreference;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[COLOR="red"] const-string v13, "crtanimation_toggle"
move-object/from16 v0, p0
invoke-virtual {v0, v13}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v13
check-cast v13, Landroid/preference/CheckBoxPreference;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual/range {p0 .. p0}, Lcom/android/settings/DisplaySettings;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v13
const-string v14, "com.sec.feature.multiwindow.phone"
invoke-virtual {v13, v14}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z
5)
Code:
:cond_15
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
[COLOR="Red"]if-eqz v0, :cond_new[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :cond_16
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v2, "multi_window_enabled"
invoke-static {v0, v2, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
:cond_16
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
[COLOR="red"] :cond_new
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 987
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 988
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "crtanimation_toggle"
if-nez v0, :cond_newA
const/4 v0, 0x0
goto :cond_newB
:cond_newA
const/4 v0, 0x1
:cond_newB
invoke-static {v3, v4, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
[/COLOR]
.end method
6)
Code:
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_5
:goto_2
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
:cond_2
[COLOR="red"] iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "crtanimation_toggle"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :goto_2b
const/4 v1, 0x1
goto :goto_2c
:goto_2b
const/4 v1, 0x0
:goto_2c
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
return-void
:cond_3
move v0, v2
goto :goto_0
:cond_4
iget v0, p0, Lcom/android/settings/DisplaySettings;->mDirect:I
That's it for SecSettings.
Recompile and test it functions before continuing.
Once that works lets enable the function.
I'm including the function to enable as previously linked to mirko_ddd's thread.
Next we mod services.jar
7)
\services\smali\com\android\server\PowerManagerService$ScreenBrightnessAnimator.smali
Code:
#setter for: Lcom/android/server/PowerManagerService;->mHighestLightSensorValue:I
invoke-static {v7, v9}, Lcom/android/server/PowerManagerService;->access$8202(Lcom/android/server/PowerManagerService;I)I
:cond_1
:goto_1
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
[COLOR="Red"] move-object v0, p0
iget-object v2, v0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/server/PowerManagerService;->access$2300(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v9, "crtanimation_toggle"
const/4 v10, 0x0
invoke-static {v2, v9, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_new2
if-eqz p2, :cond_new2
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_new2
[/COLOR]
const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
const/16 v9, 0xa
invoke-virtual {v7, v9, p1, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v2
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
And that's it!
Recompile and enjoy.
All I ask is for credit in your Mod or Rom.

Re: [How-To]CRT-OFF Animation Toggle (made using XXEMR2 [4.1.2])
thanx, I will try to add it to my frmaework

Chaos ^_^ said:
thanx, I will try to add it to my frmaework
Click to expand...
Click to collapse
when i tried to recompile SecSettings.apk i got this message
C:\apktoolv3>apktool b working/SecSettings built/SecSettings-unsigned.apk
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:243)
at brut.androlib.Androlib.buildSources(Androlib.java: 200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
any idea ?

Chaos ^_^ said:
when i tried to recompile SecSettings.apk i got this message
C:\apktoolv3>apktool b working/SecSettings built/SecSettings-unsigned.apk
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:243)
at brut.androlib.Androlib.buildSources(Androlib.java: 200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
any idea ?
Click to expand...
Click to collapse
Please attach/post the decompiled XML's and Smali that were modded so I can look at what was done.

ok
shoman94 said:
Please attach/post the decompiled XML's and Smali that were modded so I can look at what was done.
Click to expand...
Click to collapse
here is the files

Chaos ^_^ said:
here is the files
Click to expand...
Click to collapse
So I can see a typo (extra space) in string.xml which is likely not a problem but should be fixed.
You didn't attach display_settings.xml so I can't see that one.
But the main Issue I see is Edit#5.
You changed the line to cond_new but you didn't add the :cond_new code at the end of that method. Scroll down edit#5 in the OP and you will see.
I hope that helps.

shoman94 said:
So I can see a typo (extra space) in string.xml which is likely not a problem but should be fixed.
You didn't attach display_settings.xml so I can't see that one.
But the main Issue I see is Edit#5.
You changed the line to cond_new but you didn't add the :cond_new code at the end of that method. Scroll down edit#5 in the OP and you will see.
I hope that helps.
Click to expand...
Click to collapse
unfortunately its still not working, thanks anyway

Chaos ^_^ said:
unfortunately its still not working, thanks anyway
Click to expand...
Click to collapse
Sorry you are having trouble. Before adding the changes make sure you can compile it to begin with. I know it works as Kryten2k35 compiled it without issue and it all works fine.
Good luck.

shoman94 said:
Sorry you are having trouble. Before adding the changes make sure you can compile it to begin with. I know it works as Kryten2k35 compiled it without issue and it all works fine.
Good luck.
Click to expand...
Click to collapse
its working without adding your mod, anyway I will try again tonight

Works fine for me. CRT-OFF is correct enabled/disabled with this mod
I have only one problem with display correct name of the toggle added.
{
"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"
}

slim80 said:
Works fine for me. CRT-OFF is correct enabled/disabled with this mod
I have only one problem with display correct name of the toggle added.
Click to expand...
Click to collapse
What language is that?
I'm taking a guess here, but you need to add translations to other strings for different languages.
Like for example you want to add the mod to the russian language, you have to mod strings-ru.
Try that...
---------- Post added at 06:22 PM ---------- Previous post was at 06:18 PM ----------
Thanks for this mod.
Works perfect for me.

I cannot find :cond_0 from step #5 in the OP.
I even looking in Wanam's MB5 smali and could not find a match for it in there either. Was this a typo or can someone give me some surrounding code to port this over please? Tnx
Edit: Should it be :cond_new maybe?

tdunham said:
I cannot find cond_0 from step #5 in the OP.
I even looking in Wanam's MB5 smali and could not find it in there either. Was this a typo or can someone give me some surrounding code to port this over please? Tnx
Click to expand...
Click to collapse
What the condition was that you changed to cond_new will go in place of cond_0 in step 5. Understand?
Edit: that cond can depend on the decompiler.
Edit2: don't forget to scroll down in step 5 for more code to put in.
Sent from my Transformer Prime TF201 using Tapatalk 2

any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali

AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
You cannot, you need a custom kernel to do that and there are'nt for leaked roms. Maybe you can have it working to some degree but it always be defective. That mod requires support by the kernel, smali modifications apart.

Ive done this mod on stock 4.1.2 also and there wasnt any problem.
And it works with stock kernel as long as your connected to wifi.
My question is since i cant find that specific smali, do i edit another smali or search in another folder?
I can do the rest x)
Sent from my GT-N7100 using Tapatalk 4 Beta

AskinSavascisi said:
Ive done this mod on stock 4.1.2 also and there wasnt any problem.
And it works with stock kernel as long as your connected to wifi.
My question is since i cant find that specific smali, do i edit another smali or search in another folder?
I can do the rest x)
Sent from my GT-N7100 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Sorry buddy, I think I misunderstood the thread for another one.
Sorry I can't help, though.

AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
Maybe you can ask @criscan to help you out

AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
It's totally different on 4.2.2.... look in the sgs4 section under themes and apps.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta

@shoman94
Thanks to your awesome tutorial, I've added CRT Off animation to my ROM.. But there is something I'd like to mention... The CRT off effect works great.. no lag, no nothing.. but if I turn CRT animation off from Settings then there is always a "slight delay" when I lock my phone (i.e power off the display with the power button).. like the screen will be "almost dark" for a second then it will shut off completely..
Its kind of hard for me to explain this in words but I hope that you understood what I meant.. PS: In addition to your tutorial, I also followed this to prevent a "glitch turning off effect"

Related

[MOD] status bar bluetooth/silent toggles improved - update 10/23/2010

s0niqu3 brought it to my attention how much the status bar bluetooth toggle
sucked so I changed the onClick method to toggle the bluetooth state instead
of opening settings to the bluetooth page
this is the replacement method for com/android/server/status/StatusBarService$31
which is in the services file in framework.
Code:
.method public onClick(Landroid/view/View;)V
.registers 7
.parameter "v"
.prologue
const-string v1, "StatusBar"
iget-object v3, p0, Lcom/android/server/status/StatusBarService$31;->this$0:Lcom/android/server/status/StatusBarService;
iget-object v3, v3, Lcom/android/server/status/StatusBarService;->mContentResolver:Landroid/content/ContentResolver;
const-string v4, "airplane_mode_on"
const/4 v5, 0x0
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-nez v2, :exit
invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;
move-result-object v0
if-eqz v0, :exit
const/4 v5, 0x1
const-string v3, "bluetooth"
invoke-static {v3}, Landroid/os/ServiceManager;->checkService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v3
invoke-static {v3}, Landroid/bluetooth/IBluetooth$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetooth;
move-result-object v2
invoke-interface {v2}, Landroid/bluetooth/IBluetooth;->getBluetoothState()I
move-result v3
const/16 v4, 0xc
if-ne v3, v4, :toggleOn
:toggleOff
const-string v4, "Disabling Bluetooth"
invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
invoke-interface {v2, v5}, Landroid/bluetooth/IBluetooth;->disable(Z)Z
goto :exit
:toggleOn
const/16 v4, 0xa
if-ne v3, v4, :exit
const-string v4, "Enabling Bluetooth"
invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
invoke-interface {v2, v5}, Landroid/bluetooth/IBluetooth;->enable(Z)Z
:exit
return-void
.end method
I added flashables to this post use the stock updater to install, these should
be compatible with any JI6 based ROM because I don't think there are a lot
of mods for /system/framework/services.*. I also killed the battery full notification.
EDIT:
added 3 state toggle to the silent button so now you can toggle from Ringer on --> Vibrate --> Silent
below is the replacement onClick method com/android/server/status/StatusBarService$33
which is in the services file in framework.
Code:
.method public onClick(Landroid/view/View;)V
.registers 7
.parameter "v"
.prologue
const/4 v2, 0x0
const/4 v3, 0x1
const/4 v4, 0x2
.line 3641
iget-object v0, p0, Lcom/android/server/status/StatusBarService$33;->this$0:Lcom/android/server/status/StatusBarService;
iget-boolean v0, v0, Lcom/android/server/status/StatusBarService;->mSilentStatus:Z
if-nez v0, :cond_10
.line 3642
iget-object v0, p0, Lcom/android/server/status/StatusBarService$33;->this$0:Lcom/android/server/status/StatusBarService;
iget-object v0, v0, Lcom/android/server/status/StatusBarService;->mContentResolver:Landroid/content/ContentResolver;
const-string v1, "driving_mode_on"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 3646
:cond_10
iget-object v0, p0, Lcom/android/server/status/StatusBarService$33;->this$0:Lcom/android/server/status/StatusBarService;
iget-object v0, v0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
const-string v1, "audio"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/media/AudioManager;
iget-object v1, p0, Lcom/android/server/status/StatusBarService$33;->this$0:Lcom/android/server/status/StatusBarService;
iget v1, v1, Lcom/android/server/status/StatusBarService;->mSoundProfile:I
if-eqz v1, :ringerOn
if-eq v1, v4, :vibrate
if-eq v1, v3, :ringerOff
:ringerOn
move v1, v4
:goto_23
invoke-virtual {v0, v1}, Landroid/media/AudioManager;->setRingerMode(I)V
.line 3648
return-void
:ringerOff
move v1, v2
goto :goto_23
:vibrate
iget-object v1, p0, Lcom/android/server/status/StatusBarService$33;->this$0:Lcom/android/server/status/StatusBarService;
iget-object v1, v1, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
const-string v2, "vibrator"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/os/Vibrator;
const-wide/16 v2, 0x32
invoke-virtual {v1, v2, p3}, Landroid/os/Vibrator;->vibrate(J)V
const/4 v1, 0x1
goto :goto_23
.end method
replacement method for StatusBarService.smali, this enables the 3 icons for the silent button.
you also have to add the image resource to twframework-res.apk and a line in public.xml
Code:
<public type="drawable" name="quick_panel_icon_vibrate" id="0x020200d8" />
Code:
.method private prepareQuickPanelSettingIcon(I)V
.registers 7
.parameter "mask"
.prologue
.line 1344
const/4 v2, 0x0
.line 1345
.local v2, textColor:I
const/4 v0, 0x0
.line 1346
.local v0, btnTextView:Landroid/widget/TextView;
const/4 v1, 0x0
.line 1348
.local v1, settingIcon:Landroid/graphics/drawable/Drawable;
packed-switch p1, :pswitch_data_c6
.line 1400
:goto_6
:pswitch_6
invoke-direct {p0, v0, v1, v2}, Lcom/android/server/status/StatusBarService;->updateQuickPanelSettingIcon(Landroid/widget/TextView;Landroid/graphics/drawable/Drawable;I)V
.line 1401
return-void
.line 1350
:pswitch_a
iget-object v0, p0, Lcom/android/server/status/StatusBarService;->mWiFiBtn:Landroid/widget/TextView;
.line 1352
iget-boolean v3, p0, Lcom/android/server/status/StatusBarService;->mWiFiStatus:Z
if-eqz v3, :cond_2a
.line 1353
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x2020062
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1354
const v2, -0xff8b34
.line 1355
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mWiFiBtn:Landroid/widget/TextView;
const-string v4, "WI-FI(ON)"
invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 1360
:goto_27
iget-object v0, p0, Lcom/android/server/status/StatusBarService;->mWiFiBtn:Landroid/widget/TextView;
.line 1361
goto :goto_6
.line 1357
:cond_2a
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x202005f
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1358
const/4 v2, -0x1
goto :goto_27
.line 1364
:pswitch_39
iget-object v0, p0, Lcom/android/server/status/StatusBarService;->mBTBtn:Landroid/widget/TextView;
.line 1366
iget-boolean v3, p0, Lcom/android/server/status/StatusBarService;->mBTStatus:Z
if-eqz v3, :cond_50
.line 1367
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x202005d
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1368
const v2, -0xff8b34
goto :goto_6
.line 1370
:cond_50
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x202005c
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1371
const/4 v2, -0x1
.line 1373
goto :goto_6
.line 1376
:pswitch_5f
iget-object v0, p0, Lcom/android/server/status/StatusBarService;->mSoundBtn:Landroid/widget/TextView;
.line 1378
iget v3, p0, Lcom/android/server/status/StatusBarService;->mSoundProfile:I
const/4 v2, 0x2
if-eq v3, v2, :cond_8c
const/4 v2, 0x1
if-eq v3, v2, :cond_7a
.line 1379
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x20200b3
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1380
const v2, -0xff8b34
goto :goto_6
:cond_7a
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x20200d8
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1380
const v2, -0xff8b34
goto/16 :goto_6
.line 1382
:cond_8c
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x20200b2
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1383
const/4 v2, -0x1
.line 1385
goto/16 :goto_6
.line 1388
:pswitch_9c
iget-object v0, p0, Lcom/android/server/status/StatusBarService;->mGpsBtn:Landroid/widget/TextView;
.line 1390
iget-boolean v3, p0, Lcom/android/server/status/StatusBarService;->mGpsStatus:Z
if-eqz v3, :cond_b4
.line 1391
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x202005e
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1392
const v2, -0xff8b34
goto/16 :goto_6
.line 1394
:cond_b4
iget-object v3, p0, Lcom/android/server/status/StatusBarService;->mContext:Landroid/content/Context;
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x20200b4
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
.line 1395
const/4 v2, -0x1
goto/16 :goto_6
.line 1348
nop
nop
:pswitch_data_c6
.packed-switch 0x1
:pswitch_a
:pswitch_39
:pswitch_6
:pswitch_5f
:pswitch_6
:pswitch_6
:pswitch_6
:pswitch_9c
.end packed-switch
.end method
Sounds great, one less widget I will have to use, any way someone could make it a flashable zip so us none coders can use it?
I added flashables to this thread use the stock updater to install, these should
be compatible with any JI6 based ROM because I don't think there are a lot
of mods for /system/framework/services.*. I also killed the battery full notification.
which I don't think any one will miss.
untermensch said:
s0niqu3 brought it to my attention how much the status bar bluetooth toggle
sucked so I changed the onClick method to toggle the bluetooth state instead
of opening settings to the bluetooth page
this is the replacement method for com/android/server/status/StatusBarService$31
which is in the services file in framework.
Code:
.method public onClick(Landroid/view/View;)V
.registers 7
.parameter "v"
.prologue
const-string v1, "StatusBar"
iget-object v3, p0, Lcom/android/server/status/StatusBarService$31;->this$0:Lcom/android/server/status/StatusBarService;
iget-object v3, v3, Lcom/android/server/status/StatusBarService;->mContentResolver:Landroid/content/ContentResolver;
const-string v4, "airplane_mode_on"
const/4 v5, 0x0
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-nez v2, :exit
invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;
move-result-object v0
if-eqz v0, :exit
const/4 v5, 0x1
const-string v3, "bluetooth"
invoke-static {v3}, Landroid/os/ServiceManager;->checkService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v3
invoke-static {v3}, Landroid/bluetooth/IBluetooth$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetooth;
move-result-object v2
invoke-interface {v2}, Landroid/bluetooth/IBluetooth;->getBluetoothState()I
move-result v3
const/16 v4, 0xc
if-ne v3, v4, :toggleOn
:toggleOff
const-string v4, "Disabling Bluetooth"
invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
invoke-interface {v2, v5}, Landroid/bluetooth/IBluetooth;->disable(Z)Z
goto :exit
:toggleOn
const/16 v4, 0xa
if-ne v3, v4, :exit
const-string v4, "Enabling Bluetooth"
invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
invoke-interface {v2, v5}, Landroid/bluetooth/IBluetooth;->enable(Z)Z
:exit
return-void
.end method
I added flashables to this post use the stock updater to install, these should
be compatible with any JI6 based ROM because I don't think there are a lot
of mods for /system/framework/services.*. I also killed the battery full notification.
Click to expand...
Click to collapse
Thanks again for everything you've done, glad to have so many annoying samsung bugs fixed by such awesome people in the community.
Cheers, =)
Thanks for a fix to a very annoying issue. Noob question: which of these would I use with the Bionix. ROMs?
Sent from my SGH-T959 using XDA App
murse said:
Thanks for a fix to a very annoying issue. Noob question: which of these would I use with the Bionix. ROMs?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Hi,
I can't guarantee anything, but always try the JI6 deodexed version on the bionix roms first.
Cheers, =)
Not sure why but JI6 deodexed would not install in clockwork, just got stuck saying installing update, So i just had to just pull the services.jar and use root explorer and pasted it in system/framework. It hung when restarting, but then I rebooted into recovery wiped both caches and that fixed the hang issue. Works great thanks for this. One of these days I will learn some coding stuff so i can do it myself.
For those interested, that is what i had to do to get it to work on fusion1.1 with the King Klicks Kernel.
mikey98277 said:
Not sure why but it would not install in clockwork, just got stuck saying installing update, So i just had to just pull the services.jar and use root explorer and pasted it in system/framework. It hung when restarting, but then I rebooted into recovery wiped both caches and that fixed the hang issue. Works great thanks for this. One of these days I will learn some coding stuff so i can do it myself.
For those interested, that is what i had to do to get it to work on fusion1.1 with the King Klicks Kernel.
Click to expand...
Click to collapse
FYI, the flashable update.zip is in the download file.
EDIT: Just installed on Bionix FINAL and the bluetooth status update works great. Nice addition. Haven't tried to charge 100%, but I certainly won't miss that notification. Thanks untermensch for all of your mods!!!
a400meter said:
FYI, the flashable update.zip is in the download file.
Not sure what you meant by that, As I said I tried the update.zip file and it did not work on Fusion 1.1 with KK Kernel. So I pulled the file from it and pushed it manually.
Click to expand...
Click to collapse
mikey98277 said:
a400meter said:
FYI, the flashable update.zip is in the download file.
Not sure what you meant by that, As I said I tried the update.zip file and it did not work on Fusion 1.1 with KK Kernel. So I pulled the file from it and pushed it manually.
Click to expand...
Click to collapse
What that means is that the update.zip file that is located inside the zip you downloaded is not meant to be installed through clockwork, but instead through the stock phone recovery menu. Replace the clockwork update.zip on your internal memory with the downloaded one, and then go to the phone recovery and hit "Reinstall Packages".
I know you already installed the file manually, the clarification is more for others who may need help.
Click to expand...
Click to collapse
untermensch said:
s0niqu3 brought it to my attention how much the status bar bluetooth toggle
sucked so I changed the onClick method to toggle the bluetooth state instead
of opening settings to the bluetooth page
this is the replacement method for com/android/server/status/StatusBarService$31
which is in the services file in framework.
Code:
.method public onClick(Landroid/view/View;)V
.registers 7
.parameter "v"
.prologue
const-string v1, "StatusBar"
iget-object v3, p0, Lcom/android/server/status/StatusBarService$31;->this$0:Lcom/android/server/status/StatusBarService;
iget-object v3, v3, Lcom/android/server/status/StatusBarService;->mContentResolver:Landroid/content/ContentResolver;
const-string v4, "airplane_mode_on"
const/4 v5, 0x0
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-nez v2, :exit
invoke-static {}, Landroid/bluetooth/BluetoothAdapter;->getDefaultAdapter()Landroid/bluetooth/BluetoothAdapter;
move-result-object v0
if-eqz v0, :exit
const/4 v5, 0x1
const-string v3, "bluetooth"
invoke-static {v3}, Landroid/os/ServiceManager;->checkService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v3
invoke-static {v3}, Landroid/bluetooth/IBluetooth$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetooth;
move-result-object v2
invoke-interface {v2}, Landroid/bluetooth/IBluetooth;->getBluetoothState()I
move-result v3
const/16 v4, 0xc
if-ne v3, v4, :toggleOn
:toggleOff
const-string v4, "Disabling Bluetooth"
invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
invoke-interface {v2, v5}, Landroid/bluetooth/IBluetooth;->disable(Z)Z
goto :exit
:toggleOn
const/16 v4, 0xa
if-ne v3, v4, :exit
const-string v4, "Enabling Bluetooth"
invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
invoke-interface {v2, v5}, Landroid/bluetooth/IBluetooth;->enable(Z)Z
:exit
return-void
.end method
I added flashables to this post use the stock updater to install, these should
be compatible with any JI6 based ROM because I don't think there are a lot
of mods for /system/framework/services.*. I also killed the battery full notification.
Click to expand...
Click to collapse
First of all, great work with this fix.
Is there any way that this method could be used to change the Silent shortcut to a Vibrate shortcut? I'm not sure about others, but I personally never use Silent mode, and it bugs the hell out of me that it's so easily accessible yet useless for me.
gilbar said:
mikey98277 said:
What that means is that the update.zip file that is located inside the zip you downloaded is not meant to be installed through clockwork, but instead through the stock phone recovery menu. Replace the clockwork update.zip on your internal memory with the downloaded one, and then go to the phone recovery and hit "Reinstall Packages".
I know you already installed the file manually, the clarification is more for others who may need help.
Click to expand...
Click to collapse
ahh... i get it now, maybe thats why it didnt work, well I got it going anyways thanks.
Click to expand...
Click to collapse
So the deodexed one should work fine with Eugene's frankin final?
Thanks, this makes life easier.
I used RootExplorer to copy your services.odex into android's /system/framework folder. Painless and it works perfectly.
I wish the notification bar had the option to enable/disable TV out.
Thanks for this - works well to turn BT off, but to turn on it's very slow. Is that just me?
Turns on or off in less than 2 or 3 seconds here.
Colt1911 said:
Turns on or off in less than 2 or 3 seconds here.
Click to expand...
Click to collapse
Wow, that's instant compared to my phone.
My phone takes usually 10-11 seconds to turn on bluetooth, and that's totally independent of how I go about turning it on. If I use the notification toggle, or turn on directly from the settings menu, or use the default android power control widget, they all take 10-11 seconds to turn on bluetooth.
So, my guess is that maybe bluetooth on/off speed is affected by custom kernels or custom roms, or a combination of both and still unknown factors.
Honestly, I don't really mind how long it takes, I don't use bluetooth all that often, but the few times I do, the toggle has always annoyed me that it just opened bluetooth settings, so this mod is perfect for me.
Thanks again, cheers everyone, =)
s0niqu3 said:
Wow, that's instant compared to my phone.
My phone takes usually 10-11 seconds to turn on bluetooth, and that's totally independent of how I go about turning it on. If I use the notification toggle, or turn on directly from the settings menu, or use the default android power control widget, they all take 10-11 seconds to turn on bluetooth.
So, my guess is that maybe bluetooth on/off speed is affected by custom kernels or custom roms, or a combination of both and still unknown factors.
Honestly, I don't really mind how long it takes, I don't use bluetooth all that often, but the few times I do, the toggle has always annoyed me that it just opened bluetooth settings, so this mod is perfect for me.
Thanks again, cheers everyone, =)
Click to expand...
Click to collapse
I have the same issue, and it started exactly when i started installing Bionix ROMs on both my phone and my wife's. I figured it was something about how he built his ROM, and just deided to live with it. It could either be Bionix orJAC. I havent tried Bionix with stock kernel to try and troubleshoot.
I updated the OP files, you can now toggle from Ringer On --> Vibrate --> Silent
seems like the button icon should be changed to 3 state also for a more finished
look.
untermensch said:
I updated the OP files, you can now toggle from Ringer On --> Vibrate --> Silent
seems like the button icon should be changed to 3 state also for a more finished
look.
Click to expand...
Click to collapse
Sounds great, thanks!
Would you mind posting the code to make the silent/vibrate change manually?
Thanks again, cheers, =)

(Development) swipe to remove notifications for galaxy y duos

This thread is just for development purpose and will be used to discuss on the development of the feature "swipe to remove notifications". Currently i am Trying it on the ics fusion rom created by hell_lock. So if anyone who can contribute is welcomed.
Here is the tutorial that i am using to implement the function- http://forum.xda-developers.com/showthread.php?t=1658720
If anyone wants to start the development then i have attached the stock deodexed 'SystemUI.apk' and 'framework.jar' in the attachments.
reserved for testing
Can you post a log of compiling? that guide is good enough.Are you geting a multiple definition error?
b16h22 said:
Can you post a log of compiling? that guide is good enough.Are you geting a multiple definition error?
Click to expand...
Click to collapse
now i am not facing any error in compiling, i guess i made a mistake before,
So now i am working on this from the begining.
Anshul Rajput said:
now i am not facing any error in compiling, i guess i made a mistake before,
So now i am working on this from the begining.
Click to expand...
Click to collapse
There is a small change in the last edit of IStatusBarService$Stub$Proxy.smali
The red part in the code below must be same as
.method public onNotificationClear(Ljava/lang/String;Ljava/lang/String;I)V
.registers 9
.parameter "pkg"
.parameter "tag"
.parameter "id"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/os/RemoteException;
}
.end annotation
.prologue
.line 359
invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;
move-result-object v0
.line 360
.local v0, _data:Landroid/os/Parcel;
invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;
move-result-object v1
.line 362
.local v1, _reply:Landroid/os/Parcel;
:try_start_8
const-string v2, "com.android.internal.statusbar.IStatusBarService"
invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/StringV
.line 363
invoke-virtual {v0, p1}, Landroid/os/Parcel;->writeString(Ljava/lang/StringV
.line 364
invoke-virtual {v0, p2}, Landroid/os/Parcel;->writeString(Ljava/lang/StringV
.line 365
invoke-virtual {v0, p3}, Landroid/os/Parcel;->writeInt(I)V
.line 366
iget-object v2, p0, Lcom/android/internal/statusbar/IStatusBarService$Stub$Proxy;->mRemote:Landroid/os/IBinder;
const/16 v3, 0xa
const/4 v4, 0x0
invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
.line 367
invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
:try_end_21
.catchall {:try_start_8 .. :try_end_21} :catchall_28
.line 370
invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V
.line 371
invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V
.line 373
return-void
.line 370
:catchall_28
move-exception v2
invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V
.line 371
invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V
throw v2
.end method
Click to expand...
Click to collapse
the red part in this code in IStatusBarService$Stub.smali
.field static final TRANSACTION_onNotificationError:I = 0xc
Click to expand...
Click to collapse
so change the code to
const/16 v3, 0xc
Click to expand...
Click to collapse
I wl try today ..for 3rd time
Sent from my GT-S6102 using Tapatalk 2
b16h22 said:
Can you post a log of compiling? that guide is good enough.Are you geting a multiple definition error?
Click to expand...
Click to collapse
now i am getting this error while compiling the SystemUI
HTML:
C:\Users\Anshul Rajput\Desktop\New folder (2)\SystemUI\dist>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Anshul Rajput said:
now i am getting this error while compiling the SystemUI
HTML:
C:\Users\Anshul Rajput\Desktop\New folder (2)\SystemUI\dist>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Click to expand...
Click to collapse
Use smali/baksmali or baksmali manager.That'll give you more clear idea of the error.
b16h22 said:
Use smali/baksmali or baksmali manager.That'll give you more clear idea of the error.
Click to expand...
Click to collapse
can you tell me, what i am doing wrong and correct me.
manoranjan2050 said:
I wl try today ..for 3rd time
Sent from my GT-S6102 using Tapatalk 2
Click to expand...
Click to collapse
bro, can you tell me what problem you faced last time when you tried to get this work.
Anshul Rajput said:
can you tell me, what i am doing wrong and correct me.
Click to expand...
Click to collapse
what i was saying that You cant figure out the error from that log.Using smali/baksmali tool can give you can find out the error.
extract this zip View attachment 1294021.Put the contents in a folder.Drag and drop classes.dex from systemui.apk into the same folder.Open command prompt in that folder.Type this
java -jar baksmali.jar -o dexout/ classes.dex
Click to expand...
Click to collapse
that will give you a folder "dexout".It's the same folder as "smali" in apktool.Edit the smali files.To recompile, type
java -jar smali.jar dexout/ -o new-classes.dex
Click to expand...
Click to collapse
Delete the old classes.dex.Rename "new-classes.dex" to "classes.dex".Drag this classes.dex into systemui.apk using winrar or 7zip.
First of all, thanks to OP to open such a thread for my rom development. I am going to try compiling using baksmali, will giv u log as fast as possible.
---------- Post added at 07:22 PM ---------- Previous post was at 07:15 PM ----------
no viable at input '<'
problem in StatusBarService.smali[3871,85]
hell_lock said:
First of all, thanks to OP to open such a thread for my rom development. I am going to try compiling using baksmali, will giv u log as fast as possible.
---------- Post added at 07:22 PM ---------- Previous post was at 07:15 PM ----------
no viable at input '<'
problem in StatusBarService.smali[3871,85]
Click to expand...
Click to collapse
can you correct me, where i am wrong
HTML:
invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v7, p1
invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v9
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
.line 581
:cond_1
.line 658
const v1, 0x7f09002f
invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v1
move-object v0, v1
Anshul Rajput said:
can you correct me, where i am wrong
HTML:
invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v7, p1
invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v9
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
.line 581
:cond_1
.line 658
const v1, 0x7f09002f
invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v1
move-object v0, v1
Click to expand...
Click to collapse
this is my code
Code:
invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v7, p1
invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v9
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
.line 581
:cond_1
const v1, 0x7f09002f
invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v1
move-object v0, v1
b16h22 said:
this is my code
Code:
invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;
.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x2
if-nez v4, :cond_1
move-object/from16 v0, v2
iget v0, v0, Landroid/app/Notification;->flags:I
move v4, v0
and-int/lit8 v4, v4, 0x20
if-nez v4, :cond_1
new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;
move-object v0, v4
move-object/from16 v1, p0
move-object/from16 v7, p1
invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V
move-object/from16 v0, v9
move-object v1, v4
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
.line 735
.line 581
:cond_1
const v1, 0x7f09002f
invoke-virtual {v9, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->findViewById(I)Landroid/view/View;
move-result-object v1
move-object v0, v1
Click to expand...
Click to collapse
not able to compile even using your code
are you able to compile SystemUI ?
Anshul Rajput said:
not able to compile even using your code
are you able to compile SystemUI ?
Click to expand...
Click to collapse
cond_1 has multiple definitions-error
---------- Post added at 08:02 PM ---------- Previous post was at 07:55 PM ----------
I finally compiled it without errors!! To fix that errors change "cond_1" to "cond_5"
hell_lock said:
cond_1 has multiple definitions-error
---------- Post added at 08:02 PM ---------- Previous post was at 07:55 PM ----------
I finally compiled it without errors!! To fix that errors change "cond_1" to "cond_5"
Click to expand...
Click to collapse
thanks very much, was able to compile at last.
can anyone, help me while compiling framework.jar i am getting this error
HTML:
Smali selected
Smali working...
framework\com\android\internal\statusbar\IStatusBarService$Stub$Proxy.smali[1024,
0] missing END_METHOD_DIRECTIVE at '.method'
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[607,4] Labe
l sswitch_132 has multiple defintions.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[148,23] Lab
el "sswitch_data_15a" is not defined.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[0,0] mismat
ched tree node: I_STATEMENTS expecting <UP>
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[134,0] A no
n-abstract/non-native method must have at least 1 instruction
Finished
Press any key to continue . . .
Anshul Rajput said:
can anyone, help me while compiling framework.jar i am getting this error
HTML:
Smali selected
Smali working...
framework\com\android\internal\statusbar\IStatusBarService$Stub$Proxy.smali[1024,
0] missing END_METHOD_DIRECTIVE at '.method'
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[607,4] Labe
l sswitch_132 has multiple defintions.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[148,23] Lab
el "sswitch_data_15a" is not defined.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[0,0] mismat
ched tree node: I_STATEMENTS expecting
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[134,0] A no
n-abstract/non-native method must have at least 1 instruction
Finished
Press any key to continue . . .
Click to expand...
Click to collapse
There is duplicate of same coding in the file.Search for sswitch_132.Check the codes above and below to identify the duplicate.
wait,i'll upload my file.
EDIT: here it is View attachment IStatusBarService$Stub.zip
sent while doin' some burnouts
Anshul Rajput said:
thanks very much, was able to compile at last.
Click to expand...
Click to collapse
Anshul Rajput said:
can anyone, help me while compiling framework.jar i am getting this error
HTML:
Smali selected
Smali working...
framework\com\android\internal\statusbar\IStatusBarService$Stub$Proxy.smali[1024,
0] missing END_METHOD_DIRECTIVE at '.method'
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[607,4] Labe
l sswitch_132 has multiple defintions.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[148,23] Lab
el "sswitch_data_15a" is not defined.
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[0,0] mismat
ched tree node: I_STATEMENTS expecting <UP>
framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[134,0] A no
n-abstract/non-native method must have at least 1 instruction
Finished
Press any key to continue . . .
Click to expand...
Click to collapse
Wait.. I am starting to mod framework.jar right now.. will report soon. a tip for u.. if you get multiple definitions error then you need to locate the wrong line and modify it like we did it last time for "cond_1". I hope the rest of the code is not dependant on the line we modified or we would get into trouble...

[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 How-to] KitKat 4.4.2/Android L Music Control - Volume Music Skip and More

[Guide How-to] KitKat 4.4.2/Android L Music Control - Volume Music Skip
UPDATED FOR ANDROID L
This guide requires knowledge of decompiling and compiling apk and smali files.
It is only a guide.
I do not take requests. If you want this mod for your rom, get with a dev with the knowledge to get it done.
I have attached android.policy files for diffing in case you get stuck on a section.
SecSettings.apk
In SecSettings.apk we setup the Music Control menu items & toggles.
(This edit does not work on Android L)
*** Add the two new files from the SecSettings_new_files.zip attached at the bottom of this post.
res/values/strings.xml edit:
Add new lines
Code:
<string name="volbtn_toggle_title">Music Control</string>
<string name="volbtn_timeout_title">Button Delay</string>
<string name="volbtn_timeout_summary">%s</string>
<string name="volbtn_vol_up_title">Volume Up Action</string>
<string name="volbtn_vol_up_summary">%s</string>
<string name="volbtn_vol_down_title">Volume Down Action</string>
<string name="volbtn_vol_down_summary">%s</string>
res/values/arrays.xml edit:
Add new lines
Code:
<string-array name="volbtn_action_entries">
<item>Next</item>
<item>Pause</item>
<item>Play</item>
<item>Play/Pause</item>
<item>Previous</item>
<item>Stop</item>
</string-array>
<string-array name="volbtn_action_values">
<item>87</item>
<item>127</item>
<item>126</item>
<item>85</item>
<item>88</item>
<item>86</item>
</string-array>
<string-array name="volbtn_timeout_entries">
<item>100ms</item>
<item>150ms</item>
<item>200ms</item>
<item>250ms</item>
<item>300ms</item>
<item>350ms</item>
<item>400ms</item>
<item>450ms</item>
<item>500ms</item>
</string-array>
<string-array name="volbtn_timeout_values">
<item>100</item>
<item>150</item>
<item>200</item>
<item>250</item>
<item>300</item>
<item>350</item>
<item>400</item>
<item>450</item>
<item>500</item>
</string-array>
res/xml/sound_settings.xml edit:
Add new line where you want the menu item to appear in the Sound settings menu.
Code:
<SwitchPreferenceScreen android:title="@string/volbtn_toggle_title" android:key="volbtn_music_controls" android:fragment="com.android.settings.VolBtnSettings" />
Smali Edit:
smali/com/android/settings/SoundSettings.smali
Add new line in BLUE
Code:
.field private mVibrateWhenRinging:Landroid/preference/CheckBoxPreference;
[COLOR="Blue"].field private mVolBtnMusicCtrl:Landroid/preference/SwitchPreferenceScreen;
[/COLOR]
.field private mVolume:Lcom/android/settings/RingerVolumePreference;
Increase locals value by 1 indicated in GREEN
Note:
When the change to .locals is increased by one, both of the V7 values in the new lines should be one LESS than the .locals value.
(New .locals value in our example is 8. 8-1=7, so we use V7)
Add new lines indicated in BLUE
Code:
.method private updateState(Z)V
[COLOR="Green"].locals 8
[/COLOR]
const/4 v2, 0x1
const/4 v4, 0x0
invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;
move-result-object v0
if-nez v0, :cond_1
:cond_0
:goto_0
return-void
:cond_1
iget-object v0, p0, Lcom/android/settings/SoundSettings;->mAudioManager:Landroid/media/AudioManager;
invoke-virtual {v0}, Landroid/media/AudioManager;->getRingerMode()I
move-result v6
[COLOR="Blue"] iget-object v1, p0, Lcom/android/settings/SoundSettings;->mVolBtnMusicCtrl:Landroid/preference/SwitchPreferenceScreen;
if-eqz v1, :cond_td
iget-object v3, p0, Lcom/android/settings/SoundSettings;->mVolBtnMusicCtrl:Landroid/preference/SwitchPreferenceScreen;
invoke-virtual {p0}, Lcom/android/settings/SoundSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v7, "volbtn_music_controls"
invoke-static {v1, v7, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-eqz v1, :cond_vol
move v1, v2
:goto_vol
invoke-virtual {v3, v1}, Landroid/preference/SwitchPreferenceScreen;->setChecked(Z)V
:cond_td
[/COLOR] const-string v0, "CTC"
New lines at the end of the same method.
Add lines indicated in BLUE
Code:
.method private updateState(Z)V
.
.
.
goto/16 :goto_1
[COLOR="Blue"] :cond_vol
move v1, v4
goto/16 :goto_vol
[/COLOR].end method
Search for the string "phone_vibration" in SoundSettings.smali and add the new lines indicated in BLUE right above it.
Code:
[COLOR="Blue"]const-string v32, "volbtn_music_controls"
move-object/from16 v0, p0
move-object/from16 v1, v32
invoke-virtual {v0, v1}, Lcom/android/settings/SoundSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v32
check-cast v32, Landroid/preference/SwitchPreferenceScreen;
move-object/from16 v0, v32
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/settings/SoundSettings;->mVolBtnMusicCtrl:Landroid/preference/SwitchPreferenceScreen;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/settings/SoundSettings;->mVolBtnMusicCtrl:Landroid/preference/SwitchPreferenceScreen;
move-object/from16 v32, v0
move-object/from16 v0, v32
move-object/from16 v1, p0
invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
[/COLOR]
const-string v32, "phone_vibration"
Add new lines indicated in BLUE
Make sure values v2, v3 & v4 values match surrounding code.
Code:
.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
.locals 6
const/4 v0, 0x0
const/4 v1, 0x1
invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;
move-result-object v2
const-string v3, "SoundSettings"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "onPreferenceChange : "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/secutil/Log;->secV(Ljava/lang/String;Ljava/lang/String;)I
[COLOR="Blue"]const-string v3, "volbtn_music_controls"
invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_td3
check-cast p2, Ljava/lang/Boolean;
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
move-result v3
if-eqz v3, :cond_td4
const/4 v0, 0x1
:goto_td5
invoke-virtual {p0}, Lcom/android/settings/SoundSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v4
const-string v3, "volbtn_music_controls"
invoke-static {v4, v3, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_0
:cond_td4
const/4 v0, 0x0
goto :goto_td5
:cond_td3[/COLOR]
const-string v3, "emergency_tone"
We need to change three public value so compile the changed SecSettings.apk, then decompile it. Open res/values/public.xml and search for the string these strings and write down the public values:
"action_bar_switch_padding"
"volbtn_toggle_title"
"volbtn_settings"
Now in the original SecSettings, open the smali file we added
smali/com/android/settings/VolBtnSettings.smali, search for each of the strings and change your public value to match as indicated in BLUE.
Code:
const v4, 0x[COLOR="Blue"]7f0f0045[/COLOR] # type="dimen" name="action_bar_switch_padding"
const v4, 0x[COLOR="Blue"]7f091a29[/COLOR] # type="string" name="volbtn_toggle_title"
const v0, 0x[COLOR="Blue"]7f0700fe[/COLOR] # type="xml" name="volbtn_settings"
That should be it for SecSettings.apk. Compile after making these last value changes and make sure the Music Control menu functions before continuing with android.policy.jar.
android.policy.jar
(also see additional changes for Android L linked at the bottom of this post)
*** Add the two new files from the android.policy.new_files.zip attached at the bottom of this post.
Smali Edits
smali/com/android/internal/policy/impl/PhoneWindowManager.smali
Add new line in BLUE
Code:
.field private mKeyEventInjectionThread:Ljava/lang/Thread;
[COLOR="Blue"].field mIsVolLongPressed:Z
[/COLOR]
.field mKeyboardTapVibePattern:[J
Add new lines in BLUE
Code:
.field mVirtualKeyVibePattern:[J
[COLOR="Blue"].field mVolBtnMusicControls:I
.field mVolBtnTimeout:I
.field mVolBtnVolDown:I
.field mVolBtnVolUp:I
[/COLOR].field private mVolumeDownKeyConsumedByScreenshotChord:Z
.field private mVolumeDownKeyTime:J
.field private mVolumeDownKeyTriggered:Z
[COLOR="Blue"].field final mVolumeDownLongPress:Ljava/lang/Runnable;
[/COLOR]
.field private mVolumeUpKeyConsumedByScreenshotChord:Z
.field private mVolumeUpKeyTime:J
.field private mVolumeUpKeyTriggered:Z
[COLOR="Blue"].field final mVolumeUpLongPress:Ljava/lang/Runnable;
[/COLOR]
.field mWifiDisplayConnected:Z
Add new lines in BLUE near end of method BEFORE the return-void.
Code:
.method public constructor <init>()V
.
.
.
[COLOR="Blue"] new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$MusicNext;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$MusicNext;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$MusicPrev;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$MusicPrev;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
[/COLOR]
return-void
.end method
.method static synthetic access$000(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
Add new methods ABOVE
.method public hasNavigationBar()Z
Code:
.method handleVolumeLongPress(I)V
.locals 4
const/16 v1, 0x18
if-ne p1, v1, :cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_0
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnTimeout:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
:cond_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_0
.end method
.method handleVolumeLongPressAbort()V
.locals 2
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method
The next section may be a little difficult to find.
Search for the string: "interceptKeyBeforeQueueing: VOLUME key-down while ringing: Silence ringer!", scroll up a few lines and place the new lines indicated in BLUE, right below the :sswitch_1 statement.
Important Note:
(AFTER adding the new section below, come back here)
The v12 value may need to be changed to match surrounding code. The next occurrence in our code is this statement:
Code:
invoke-virtual {v0, v12, v6, v5}, Lcom/android/internal/policy/impl/sec/SamsungPhoneWindowManager;->handleSamsungVolumeControl(IZZ)V
Search for the next occurrence of handleSamsungVolumeControl(IZZ)V and if your second values of v12 & v6 match, then you are good to go. If it is NOT, then the v12 & v6 in the new code below needs to be changed to match that value.
Code:
:sswitch_1
[COLOR="Blue"] move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnMusicControls:I
if-eqz v0, :cond_td
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v0
if-eqz v0, :cond_td
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenOnEarly:Z
if-nez v0, :cond_td
if-eqz v6, :cond_td2
move-object/from16 v0, p0
move/from16 v1, v12
invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress(I)V
const/4 v15, 0x0
goto/16 :goto_0
:cond_td2
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
iget-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolLongPressed:Z
if-nez v1, :cond_td3
move/from16 v1, v12
const/4 v3, 0x3
invoke-virtual {v0, v3, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
:cond_td3
const/4 v1, 0x0
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolLongPressed:Z
:cond_td
[/COLOR]
if-eqz v6, :cond_19
invoke-static {}, Lcom/android/internal/policy/impl/PhoneWindowManager;->getTelephonyService()Lcom/android/internal/telephony/ITelephony;
move-result-object v17
if-eqz v17, :cond_19
:try_start_0
invoke-interface/range {v17 .. v17}, Lcom/android/internal/telephony/ITelephony;->isRinging()Z
move-result v21
if-eqz v21, :cond_19
const-string v21, "WindowManager"
const-string v22, "interceptKeyBeforeQueueing: VOLUME key-down while ringing: Silence ringer!"
invoke-static/range {v21 .. v22}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
invoke-interface/range {v17 .. v17}, Lcom/android/internal/telephony/ITelephony;->silenceRinger()V
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
and-int/lit8 v15, v15, -0x2
Android L version of previous section:
New code is BLUE, make sure the code in GREEN match original
Code:
:sswitch_0
[COLOR="Blue"] move-object/from16 v0, p0
iget v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnMusicControls:I
if-eqz v0, :cond_td
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isMusicActive()Z
move-result v0
if-eqz v0, :cond_td
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenOnEarly:Z
if-nez v0, :cond_td
if-eqz v5, :cond_td2
move-object/from16 v0, p0
move/from16 v1, v11
invoke-virtual {v0, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPress(I)V
const/16 v16, 0x0
goto/16[/COLOR] [COLOR="Green"]:goto_8[/COLOR]
[COLOR="Blue"]:cond_td2
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeLongPressAbort()V
iget-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolLongPressed:Z
if-nez v1, :cond_td3
move/from16 v1, v11
const/4 v3, 0x3
invoke-virtual {v0, v3, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->handleVolumeKey(II)V
:cond_td3
const/4 v1, 0x0
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolLongPressed:Z
:cond_td[/COLOR]
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->getTelecommService()Landroid/telecom/TelecomManager;
move-result-object v17
if-eqz v17, :cond_19
if-eqz v5, :cond_18
invoke-virtual/range {v17 .. v17}, Landroid/telecom/TelecomManager;->isRinging()Z
move-result v21
if-eqz v21, :cond_18
const-string v21, "WindowManager"
const-string v22, "interceptKeyBeforeQueueing: VOLUME key-down while ringing: Silence ringer!"
invoke-static/range {v21 .. v22}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
invoke-virtual/range {v17 .. v17}, Landroid/telecom/TelecomManager;->silenceRinger()V
and-int/lit8 v16, v16, -0x2
goto/16 [COLOR="Green"]:goto_8[/COLOR]
Add new method indicated in BLUE:
Code:
.method public isMetaKeyEventRequested(Landroid/content/ComponentName;)Z
.locals 1
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemKeyManager:Lcom/android/internal/policy/impl/sec/SystemKeyManager;
invoke-virtual {v0, p1}, Lcom/android/internal/policy/impl/sec/SystemKeyManager;->isMetaKeyEventRequested(Landroid/content/ComponentName;)Z
move-result v0
return v0
.end method
[COLOR="Blue"].method isMusicActive()Z
.locals 3
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v2, "audio"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/media/AudioManager;
if-nez v0, :cond_0
const-string v1, "WindowManager"
const-string v2, "isMusicActive: couldn\'t get AudioManager reference"
invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
const/4 v1, 0x0
:goto_0
return v1
:cond_0
invoke-virtual {v0}, Landroid/media/AudioManager;->isLocalOrRemoteMusicActive()Z
move-result v1
goto :goto_0
.end method[/COLOR]
Add new method indicated in BLUE:
Code:
.method sendCloseSystemWindows(Ljava/lang/String;)V
.locals 1
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-static {v0, p1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sendCloseSystemWindows(Landroid/content/Context;Ljava/lang/String;)V
return-void
.end method
[COLOR="Blue"].method protected sendMediaButtonEvent(I)V
.locals 13
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
new-instance v11, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v11, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v0, Landroid/view/KeyEvent;
const/4 v5, 0x0
const/4 v7, 0x0
move-wide v3, v1
move v6, p1
invoke-direct/range {v0 .. v7}, Landroid/view/KeyEvent;-><init>(JJIII)V
invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->dispatchMediaKeyWithWakeLockToAudioService(Landroid/view/KeyEvent;)V
const/16 v2, 0x1
invoke-static {v0, v2}, Landroid/view/KeyEvent;->changeAction(Landroid/view/KeyEvent;I)Landroid/view/KeyEvent;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->dispatchMediaKeyWithWakeLockToAudioService(Landroid/view/KeyEvent;)V
return-void
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v11, v4, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v11, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
new-instance v12, Landroid/content/Intent;
const-string v4, "android.intent.action.MEDIA_BUTTON"
const/4 v5, 0x0
invoke-direct {v12, v4, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
new-instance v3, Landroid/view/KeyEvent;
const/4 v8, 0x1
const/4 v10, 0x0
move-wide v4, v1
move-wide v6, v1
move v9, p1
invoke-direct/range {v3 .. v10}, Landroid/view/KeyEvent;-><init>(JJIII)V
const-string v4, "android.intent.extra.KEY_EVENT"
invoke-virtual {v12, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object v4, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const/4 v5, 0x0
invoke-virtual {v4, v12, v5}, Landroid/content/Context;->sendOrderedBroadcast(Landroid/content/Intent;Ljava/lang/String;)V
return-void
.end method[/COLOR]
Add new lines indicated in BLUE
NOTE:
Make note of the value of the line in GREEN.
If your value is different, the 4 occurrences of v13 in our new code must also be changed to match.
Example:
If your line before the new code is:
move-result-object v8
You would change the 4 values of v13 to v8.
Code:
.method public updateSettings()V
.locals 23
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
move-object/from16 v18, v0
invoke-virtual/range {v18 .. v18}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
[COLOR="Green"]move-result-object v13
[/COLOR]
[COLOR="Blue"]const-string v7, "volbtn_music_controls"
const/4 v9, 0x0
invoke-static {v13, v7, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnMusicControls:I
const-string v7, "volbtn_timeout"
const/16 v9, 0x190
invoke-static {v13, v7, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnTimeout:I
const-string v7, "volbtn_vol_up"
const/16 v9, 0x57
invoke-static {v13, v7, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnVolUp:I
const-string v7, "volbtn_vol_down"
const/16 v9, 0x58
invoke-static {v13, v7, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnVolDown:I[/COLOR]
Android L Version of previous section:
New code is in BLUE
Code:
.method public updateSettings()V
.locals 19
move-object/from16 v0, p0
iget-object v15, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v15}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v9
[COLOR="Blue"]const-string v7, "volbtn_music_controls"
const/4 v10, 0x0
invoke-static {v9, v7, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnMusicControls:I
const-string v7, "volbtn_timeout"
const/16 v10, 0x190
invoke-static {v9, v7, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnTimeout:I
const-string v7, "volbtn_vol_up"
const/16 v10, 0x57
invoke-static {v9, v7, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnVolUp:I
const-string v7, "volbtn_vol_down"
const/16 v10, 0x58
invoke-static {v9, v7, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnVolDown:I[/COLOR]
Smali edit
\com\android\internal\policy\impl\PhoneWindowManager$SettingsObserver.smali
Search for string "immersive_mode_confirmations" and add new section in BLUE right above that line.
Make sure the values above in GREEN match the new code.
Code:
const-string v1, "default_input_method"
invoke-static {v1}, Landroid/provider/Settings$Secure;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {[COLOR="Green"]v0, v1, v4, p0, v5[/COLOR]}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
[COLOR="Blue"] const-string v1, "volbtn_music_controls"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {v0, v1, v4, p0, v5}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
const-string v1, "volbtn_timeout"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {v0, v1, v4, p0, v5}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
const-string v1, "volbtn_vol_up"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {v0, v1, v4, p0, v5}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
const-string v1, "volbtn_vol_down"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
invoke-virtual {v0, v1, v4, p0, v5}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
[/COLOR]
const-string v1, "immersive_mode_confirmations"
Android L UPDATE:
Additional Android L Changes
Additional changes for Android L are here --->> Android L amended guide
Credits: @loserskater for the orginal mod HERE ; @jeboo for his GitHub HERE @sac23 for the tremendous help getting framework.jar changes
tdunham said:
[Guide How-to] KitKat 4.4.2 Music Control - Volume Music Skip and More
This guide requires knowledge of decompiling and compiling apk and smali files.
It is only a guide.
I do not take requests. If you want this mod for your rom, get with a dev with the knowledge to get it done.
I have attached android.policy files for diffing in case you get stuck on a section.
Click to expand...
Click to collapse
Thank you, thank. You are a god...
Sent from my SM-T320 using Xparent BlueTapatalk 2
Gotta agree with the above post... You are awesome dude...
Are you about to ask a question? Hold up. Before you do that, did you check HERE? or HERE? :good:
FOR ANY ND8 RELATED QUESTIONS PLEASE VISIT THIS THREAD ----> TouchWiz 4.4 KitKat ND8 myth busters
My KITKAT 4.4.2 Touchwiz, Blue PCB Theme
TOUCHWIZ KITKAT ANIMATED PULLDOWN BAR AND ANIMATED PULLDOWN BACKGROUND MOD​
Another awesome guide TD! Thank you for sharing your knowledge with the community!
Sent from my SM-G900P using Tapatalk
@tdunham, you point to the VolBtnSettings in the settings.apk, but you didn't attach the files. Just giving you a heads up. Glad to see my work lives on! Thanks for updating this :good:
loserskater said:
@tdunham, you point to the VolBtnSettings in the settings.apk, but you didn't attach the files. Just giving you a heads up. Glad to see my work lives on! Thanks for updating this :good:
Click to expand...
Click to collapse
Thanks. I'm glad someone's looking out for me.
Thanks a ton for sharing your knowledge. You're a real class act man!
Appreciate you sharing the knowledge, thank you sir.
Delete
tdunham said:
Thanks. I'm glad someone's looking out for me.
Click to expand...
Click to collapse
Hey @tdunham...this is the first time for me using <SwitchPreferenceScreen in any mod...there shouldn't be a problem with me adding an icon to line should there?
<SwitchPreferenceScreen android:icon="@drawable/xxxxxxxx" android:title="@string/volbtn_toggle_title" android:key="volbtn_music_controls" android:fragment="com.android.settings.VolBtnSettings" />
Edit: I'll post pics when I'm done
deuce_biggins said:
Hey @tdunham...this is the first time for me using <SwitchPreferenceScreen in any mod...there shouldn't be a problem with me adding an icon to line should there?
<SwitchPreferenceScreen android:icon="@drawable/xxxxxxxx android:title="@string/volbtn_toggle_title" android:key="volbtn_music_controls" android:fragment="com.android.settings.VolBtnSettings" />
Click to expand...
Click to collapse
I don't see why not.
The good thing about SecSettings is that modifying it won't cause a bootloop, just a force close when you try to access the part of it that isn't coded properly.
However, why set an icon? This is a submenu of sounds and not a single item has an icon, stock Touchwiz of course. I just checked on my Galaxy SIII KitKat and the same goes there.
My SS is attached (without this menu item, we use CustomSettings.apk for toggles, colorizers & scripts).
Anyone get the android.policy edits right on the Sprint Note 3?
If someone with the know-how could take a look at my PhoneWindowsManager I'd sure be greatful. I'll leave it here......PhoneWindowsManager.smali
This is an error I'm getting when I...1 2 3 4 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"
}
Thank you
Once again my Sammy tablet is a bit diff...
Code:
.method public updateSettings()V
.locals 17
.prologue
.line 1714
move-object/from16 v0, p0
iget-object v12, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v8
.line 1715
.local v8, resolver:Landroid/content/ContentResolver;
const/4 v9, 0x0
.line 1722
.local v9, updateRotation:Z
const-string v12, "multi_window_enabled"
const/4 v13, 0x0
const/4 v14, -0x2
invoke-static {v8, v12, v13, v14}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v1
.line 1726
.local v1, enableMultiWindowUISetting:I
move-object/from16 v0, p0
iget-object v13, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLock:Ljava/lang/Object;
monitor-enter v13
.line 1728
:try_start_0
move-object/from16 v0, p0
iget-boolean v12, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsMultiWindowEnabled:Z
if-eqz v12, :cond_1
.line 1729
move-object/from16 v0, p0
iget-boolean v12, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemReady:Z
if-eqz v12, :cond_1
.line 1730
move-object/from16 v0, p0
iget v12, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEnableMultiWindowUISetting:I
const/4 v14, -0x1
if-ne v12, v14, :cond_c
.line 1731
move-object/from16 v0, p0
iget-object v12, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v14, "multi_window_flashbar_shown"
const/4 v15, -0x1
const/16 v16, -0x2
move/from16 v0, v16
invoke-static {v12, v14, v15, v0}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I
move-result v6
.line 1734
.local v6, lastFlashBarVisibility:I
if-nez v6, :cond_b
Where and how to put this last piece of code. in. I have tried several times, but all I get is Sammy Logo. No boot...
Code:
#Music Mod
const-string v7, "volbtn_music_controls"
const/4 v9, 0x0
invoke-static {v12, v7, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnMusicControls:I
const-string v7, "volbtn_timeout"
const/16 v9, 0x190
invoke-static {v12, v7, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnTimeout:I
const-string v7, "volbtn_vol_up"
const/16 v9, 0x57
invoke-static {v12, v7, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnVolUp:I
const-string v7, "volbtn_vol_down"
const/16 v9, 0x58
invoke-static {v12, v7, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
move-object/from16 v0, p0
iput v3, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolBtnVolDown:I
#End of Add - Music Mod
1brainsurgeon said:
If someone with the know-how could take a look at my PhoneWindowsManager I'd sure be greatful. I'll leave it here......PhoneWindowsManager.smali
This is an error I'm getting when I...1 2 3 4 screenshot!
Thank you
Click to expand...
Click to collapse
The error is somewhere on or around line 16553 is what the baksmali is reporting there.
Gunthermic said:
Once again my Sammy tablet is a bit diff...
Click to expand...
Click to collapse
Line right before adding the new section:
Code:
move-result-object v8
You didn't use v8 in the 4 places like I recommended in the guide to replace v13 in the new code.
tdunham said:
Line right before adding the new section:
Code:
move-result-object v8
You didn't use v8 in the 4 places like I recommended in the guide to replace v13 in the new code.
Click to expand...
Click to collapse
Will try again. I actually tried be and v12.. but maybe the placement is the screwy part... will try and see.
Thank you for helping tdun
Sent from my SM-T320 using Xparent BlueTapatalk 2
Gunthermic said:
Will try again. I actually tried be and v12.. but maybe the placement is the screwy part... will try and see.
Click to expand...
Click to collapse
It HAS to be v8 in those 4 places but maybe we need to change some other values too. Let me know how you make out.
tdunham said:
It HAS to be v8 in those 4 places but maybe we need to change some other values too. Let me know how you make out.
Click to expand...
Click to collapse
I will try v8... I think that is the area that can cause a big issue... I will report back....
Sent from my SM-T320 using Xparent BlueTapatalk 2
Question. I haven't had time to try the android policy edits yet but finished settings.... I tried to click the menu in settings to see if it works.... But get an fc in tap, menu won't even open..... Is this due to not doing the policy edits yet.... Or should it at least open anyways? Curious if I should go back thru settings or not.
Thanks.

[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

Categories

Resources