[Guides & Links] TOUCHWIZ UNIFIED MODS THREAD

Search This thread

ShaDisNX255

Senior Member
Apr 3, 2014
3,107
2,097
Matamoros
Samsung Galaxy A52s 5G
[Guide] Color QS Tile Text 6.0.1

Ok so, here is a guide I kind of had to put together since the original guides were not working for me for some reason :(

I tried: This guide
and
this method since it is somewhat similar but no dice ;'( no changes were ever applied (even moving and editing some registers, thanks @Many40 for your help even though we didn't get it to work D; )

But, I wasn't about to give up on this! I know MM is a somewhat old version of Android, but I'm sticking to it! And this was a test I needed to pass, so I applied the knowledge I've gathered in the last couple of months about smalis and copying another method of coloring text, I went ahead and composed this guide

So to give credit where credit is due, here is the method I based myself on: [Guide] Quickpanel Toggle on/off colors for Android MM
Thanks to: @thereassaad for this guide

Now, let's get started:


Decompile SystemUI

Navigate to smali\com\android\systemui\qs\QSTileView.smali

Add new instance field in blue:

Code:
# instance fields
[COLOR="Blue"].field private mTextColor:I[/COLOR]

.field private mCellWidth:I

.field private mClickPrimary:Landroid/view/View$OnClickListener;

.field private mClickSecondary:Landroid/view/View$OnClickListener;

Search for this method:

Code:
.method protected handleStateChanged(Lcom/android/systemui/qs/QSTile$State;)V

It should start something like this (added a little explanation in red):

Code:
.method protected handleStateChanged(Lcom/android/systemui/qs/QSTile$State;)V
    .locals 8
    .param p1, "state"    # Lcom/android/systemui/qs/QSTile$State;

    .prologue
	
    const v7, 0x7f0a0076 [COLOR="Red"]##this is the public id for qs_tile_secondary_text_color (yours may be different, obviously). It is pretty much the color text gets when you are connected to WiFi, bluetooth and I can't recall what else. You can color this too by applying this tutorial to a somewhat similar way, but I will not go over that in this tutorial[/COLOR]

    const [COLOR="Blue"]v6[/COLOR], 0x7f0a005a [COLOR="Red"]##this is the public id for qs_tile_text which is what I am going to teach you how to color in this tutorial. This register (v6) is important since this tells us what we're going to color :) [/COLOR]

Add the code in blue:

Code:
.method protected handleStateChanged(Lcom/android/systemui/qs/QSTile$State;)V
    .locals 8
    .param p1, "state"    # Lcom/android/systemui/qs/QSTile$State;

    .prologue
	
[COLOR="Blue"]    invoke-virtual {p0}, Lcom/android/systemui/qs/QSTileView;->setQSTextColor()V[/COLOR]
	
    const v7, 0x7f0a0076

    const v6, 0x7f0a005a

Now, the easiest way to look for where we need to add the next code is by searching for the qs_tile_text register (v6 in my case, it should only be used twice in this method so that is why I search for it that way) in the same method and it should look something like this, now we just need to add the code in blue:

Code:
.method protected handleStateChanged(Lcom/android/systemui/qs/QSTile$State;)V
.
.
.
    iget-object v2, p0, Lcom/android/systemui/qs/QSTileView;->mDualLabel:Lcom/android/systemui/qs/QSDualTileLabel;

    iget-object v3, p0, Lcom/android/systemui/qs/QSTileView;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v6}, Landroid/content/Context;->getColor(I)I

    move-result v3

[COLOR="blue"]    iget v3, p0, Lcom/android/systemui/qs/QSTileView;->mTextColor:I[/COLOR] ##make sure your first register v3 is the same as the above register
	
    invoke-virtual {v2, v3}, Lcom/android/systemui/qs/QSDualTileLabel;->setTextColor(I)V

    .line 682
    iget-object v2, p0, Lcom/android/systemui/qs/QSTileView;->mDualLabel:Lcom/android/systemui/qs/QSDualTileLabel;

    iget-object v3, p0, Lcom/android/systemui/qs/QSTileView;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3, v6}, Landroid/content/res/Resources;->getColor(I)I

    move-result v3
	
[COLOR="blue"]    iget v3, p0, Lcom/android/systemui/qs/QSTileView;->mTextColor:I[/COLOR]
	
    invoke-virtual {v2, v3}, Lcom/android/systemui/qs/QSDualTileLabel;->setCaretColor(I)V

    .line 683
    iget-object v2, p0, Lcom/android/systemui/qs/QSTileView;->mDivider:Landroid/view/View;

Now just add the following at the end of the smali:

Code:
.method setQSTextColor()V
    .locals 3

    iget-object v0, p0, Lcom/android/systemui/qs/QSTileView;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "qstile_text_color"

    const v2, -0xda7a27

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/android/systemui/qs/QSTileView;->mTextColor:I

    return-void
.end method

And done, you can now recompile your SystemUI and you should be able to color QS Tile text

Add in RC in xml of your choosing:

Code:
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:title="QS Tile Text Color" android:key="qstile_text_color" android:summary="Choose text color" android:defaultValue="-14606047" hexValue="true" alphaSlider="true" />

I don't know if this will work for everybody (hopefully it will work for those who tried the methods I stated and failed) but it sure made my day :)

Thanks for this community that while it may be slowly dying, everybody is always willing to help even if you are on newer firmwares. Seriously, thanks guys! :)
 

Attachments

  • photo5035313877537106060.jpg
    photo5035313877537106060.jpg
    57.5 KB · Views: 656
  • photo5035313877537106061.jpg
    photo5035313877537106061.jpg
    38.3 KB · Views: 648
  • photo5035313877537106062.jpg
    photo5035313877537106062.jpg
    57.8 KB · Views: 630
  • photo5035313877537106063.jpg
    photo5035313877537106063.jpg
    45.8 KB · Views: 620
Last edited:
  • Like
Reactions: gia01

Er. Aditya

Senior Member
Feb 28, 2014
4,358
6,130
BraveFort
[MOD/TWEAK]How to use 6thGear CustomBg as notification panel background

hi guys this mod shows the image/color/gradient used in lockscreen also, is there any fix for this ?
 

gia01

Member
Jul 14, 2017
27
1
please help me sir fix the edge edge border of the visible toggles panel shown
 

Attachments

  • Screenshot_20180712-001257.png
    162 bytes · Views: 946

stevevais

Senior Member
Apr 19, 2014
58
40
Hello, no one knows how to change the background to black transparent.
 

Attachments

  • InkedScreenshot_20180722-141616_LI.jpg
    InkedScreenshot_20180722-141616_LI.jpg
    91.6 KB · Views: 311

ShaDisNX255

Senior Member
Apr 3, 2014
3,107
2,097
Matamoros
Samsung Galaxy A52s 5G
[Mod][GUIDE][CUSTOM VIEW] 6thGear Custom View for any app

Wow so this is almost 2 years old. I'm not sure if I should ask but, I will go ahead and try it anyway
I want to apply this to SecSettings2, how do I know what xml I should add "<com.android.wubydax.CustomBg android:layout_height="fill_parent" android:layout_width="fill_parent"/>" to
In SystemUI, it was added to layout-v21/status_bar_expanded.xml
In IncallUI, it was added to layout/sec_voice_call_button_fragment.xml

Is this the whole fun of trying it out? To find it out by yourself?
I'd love to find it by myself, but I'm kind of walking blindly
Is there any type of hint to find the right xml I should be placing this?

Thanks :D
 
Last edited:

kin201303

Senior Member
May 13, 2013
498
261
Wow so this is almost 2 years old. I'm not sure if I should ask but, I will go ahead and try it anyway
I want to apply this to SecSettings2, how do I know what xml I should add "<com.android.wubydax.CustomBg android:layout_height="fill_parent" android:layout_width="fill_parent"/>" to
In SystemUI, it was added to layout-v21/status_bar_expanded.xml
In IncallUI, it was added to layout/sec_voice_call_button_fragment.xml

Is this the whole fun of trying it out? To find it out by yourself?
I'd love to find it by myself, but I'm kind of walking blindly
Is there any type of hint to find the right xml I should be placing this?

Thanks :D

yes you can find the right xml can add
i use this guide from 6.0.1~8.0
AODService_v30
Messaging_Common_5.0
SamsungContacts90Star
SamsungInCallUI
SecMyFiles2017
SecSettings
SystemUI


SecSettings 7.0~8.0 settings_main_dashboard.xml

SecSettings2 6.0
i forget you find have dashboard.xm
 

Attachments

  • A.jpg
    A.jpg
    227.8 KB · Views: 229
  • C.jpg
    C.jpg
    48.5 KB · Views: 242
  • B.jpg
    B.jpg
    69.3 KB · Views: 219
  • D.jpg
    D.jpg
    211.2 KB · Views: 231
Last edited:
D

Deleted member 7866064

Guest
Oreo 8.0
aod_layout_service_box_container.xml[/QUOTE

since i use Nougat on s6 i only have Problems with this mod. I had fc Rom Control if choosing bg Image uri, this was solved by installing another Gallery app, but than twsipe app in my launcer force closed.

In the custombg.smali there are references to the Framework.jar. I compared this parts in Framework.jar mm and framewor.jar Nougat and found some differences. I am not able to make it work 100% correctly and do not use it anymore.
Do you use the original smalis and those Problems never occured?
 

kin201303

Senior Member
May 13, 2013
498
261
Oreo 8.0
aod_layout_service_box_container.xml[/QUOTE

since i use Nougat on s6 i only have Problems with this mod. I had fc Rom Control if choosing bg Image uri, this was solved by installing another Gallery app, but than twsipe app in my launcer force closed.

In the custombg.smali there are references to the Framework.jar. I compared this parts in Framework.jar mm and framewor.jar Nougat and found some differences. I am not able to make it work 100% correctly and do not use it anymore.
Do you use the original smalis and those Problems never occured?

powerbg
navbuttonsbg
pulldownBg
 

Attachments

  • smali.rar
    8.2 KB · Views: 25

Tulsadiver

Recognized Contributor
Jul 11, 2013
9,890
7,439
Google Pixel 7 Pro
Hello, no one know guide dynamic for navigation bar ? Nougat 7.1.1
View attachment 4560526

Typically you mod the styles.xml in framework-res.apk or maybe twframework-res.apk in your case. Change all statusbarColor and navigationbarColor to ?colorPrimaryDark

Some people also change input_method_navigation_guard to that in colors.xml also.
 
  • Like
Reactions: tokyo25

Top Liked Posts