[Guides & Links] TOUCHWIZ UNIFIED MODS THREAD

Search This thread

bilgerryan

Inactive Recognized Developer
Oct 23, 2011
22,148
38,016
263
Garrett, IN
Hi,

can someone tell me how to define the color of the background in the colors.xml of the systemUI package, instead of the romcontrol or customsettings? I have neither romcontrol or custom settings installed. Or where can i get the custom settings app? I'm using a rooted stock rom for my S7 Edge.

Best regards
hasenbolle
Both are located in the OP, I'm sure if you do a search you'll find one of them.

IWSJX5e.jpg
 

thereassaad

Recognized Contributor
Aug 22, 2013
7,620
9,713
263
Bierut
Hi guys,

i enabled the System UI Tuner on the S7Edge software. the demo and status bar switches are working well but i get a fc if i hit "add tile" at quick settings. May be because Samsung has it own structur for the tiles and it is not finished for them. Then i'll just delete that option. Anyway here is the log:




That's very nice my friend , mind u tell us how u enable it , i was trying to enable it but nothing happened , ????
 
  • Like
Reactions: filchi756

and2

Senior Member
Sep 25, 2008
1,612
1,200
143
Halle
That's very nice my friend , mind u tell us how u enable it , i was trying to enable it but nothing happened , ????

In the software of S7Edge and Note 5 the tuner is already implemented. I think samsung just disabled the enable option. The option could be in the status_bar_extented_header because there is the Tuner settings icon wich should appear if the tuner is enabled. But samsung uses the tw_status_bar_extented_header, i tried to call the status_bar_extented_header but fc.

What i did is put this code where you want in secsettings

Code:
    <PreferenceCategory android:title="System UI Tuner">
    <PreferenceScreen android:title="@string/status_bar_icon_blacklist_title" android:summary="@string/status_bar_icon_blacklist_summary">
        <intent android:targetPackage="com.android.systemui" android:action="android.intent.action.MAIN" android:targetClass="com.android.systemui.tuner.TunerActivity" />
    </PreferenceScreen>

plus i think some strings.

And in the Androidmanifest. of the SystemUI search this line and change

from:

Code:
        <activity android:enabled="[COLOR="Red"]false[/COLOR]" android:exported="true" android:icon="@drawable/tuner" android:label="@string/system_ui_tuner" android:name=".tuner.TunerActivity" android:process=":tuner" android:theme="@android:style/Theme.Material.Settings">
            <intent-filter>
                <action android:name="com.android.settings.action.EXTRA_SETTINGS"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.system"/>
            <meta-data android:name="com.sec.android.multiwindow.activity.STYLE" android:value="fullscreenOnly"/>
        </activity>

to:

Code:
        <activity android:enabled="[COLOR="DarkSlateBlue"]true[/COLOR]" android:exported="true" android:icon="@drawable/tuner" android:label="@string/system_ui_tuner" android:name=".tuner.TunerActivity" android:process=":tuner" android:theme="@android:style/Theme.Material.Settings">
            <intent-filter>
                <action android:name="com.android.settings.action.EXTRA_SETTINGS"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.system"/>
            <meta-data android:name="com.sec.android.multiwindow.activity.STYLE" android:value="fullscreenOnly"/>
        </activity>

If i haven't forgott something that's all.
 
K

kbythwood

Guest
No mate sendme the one that is not working. I cantry fixing it for you. I already have the fix. Anyway check your pm mate.
Thanks?

Sent from my SM-N930F using XDA-Developers mobile app

---------- Post added at 05:13 AM ---------- Previous post was at 04:35 AM ----------

No mate sendme the one that is not working. I cantry fixing it for you. I already have the fix. Anyway check your pm mate.
Hi
I was wondering if you knew how to add VoLTE
I've seen the strings for it
Ive even gotten it on Dr ketan for 910g Rom M6 on my 910t when I was trying add a few for my personal use
Im thinking there's some more editing that needs to be done to other files?
If you or anyone can help that would be great
Thanks in advance?

Sent from my SM-N930F using XDA-Developers mobile app
 
Last edited:

filchi756

Senior Member
Sep 29, 2010
3,892
5,051
263
Tarlac city
Thanks

Sent from my SM-N930F using XDA-Developers mobile app

---------- Post added at 05:13 AM ---------- Previous post was at 04:35 AM ----------


Hi
I was wondering if you knew how to add VoLTE
I've seen the strings for it
Ive even gotten it on Dr ketan for 910g Rom M6 on my 910t when I was trying add a few for my personal use
Im thinking there's some more editing that needs to be done to other files?
If you or anyone can help that would be great
Thanks in advance

Sent from my SM-N930F using XDA-Developers mobile app

Sorry mate. No idea about Volte. I haven't use that function and its not available in my location.
 

geiti94

Senior Member
Mar 18, 2009
2,117
11,110
203
Zürich
ios 10 emojis

So i made a little emoji mod for samsung marshmallow roms for the one that hate sammy emojis :p. are the ios 10 emojis :D no black boxes and all are working. feel free to use it in your rom etc. are made for samsung keyboard :D
 

Attachments

  • ios10_emojis_samsung_kb.zip
    17.2 MB · Views: 188
  • photo_2016-09-24_11-47-22.jpg
    photo_2016-09-24_11-47-22.jpg
    59.5 KB · Views: 434
  • photo_2016-09-24_11-47-27.jpg
    photo_2016-09-24_11-47-27.jpg
    51.7 KB · Views: 434
Last edited:

daxgirl

Senior Member
Jun 30, 2012
4,047
9,165
0
Jerusalem
So i made a little emoji mod for samsung marshmallow roms for the one that hate sammy emojis :p. are the ios 10 emojis :D no black boxes and all are working. feel free to use it in your rom etc. are made for samsung keyboard :D
Great work! I am looking at all those gesture emojis and thinking... my favourite gesture is still missing ???

Sent from my SM-N920C using Tapatalk
 

geiti94

Senior Member
Mar 18, 2009
2,117
11,110
203
Zürich
Great work! I am looking at all those gesture emojis and thinking... my favourite gesture is still missing

Sent from my SM-N920C using Tapatalk

because sammy use old unicode xD for get all ios emojis we need to find a way out for update the unicode in sammy kb like for google kb. but for no the uggly sammy one are no more here :D
 

Gayos24

Senior Member
Dec 22, 2015
192
239
0
Sion
Ok. In ToggleSlider.smali try replacing the setUpIconColor method with this one:
Code:
.method public setUpIconColor()V
    .locals 8

    iget-object v4, p0, Lcom/android/systemui/settings/ToggleSlider;->mIcon:Landroid/widget/ImageView;

    if-eqz v4, :cond_0

    invoke-virtual {p0}, Lcom/android/systemui/settings/ToggleSlider;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const-string v4, "animated_brightness_icon_color"

    const-string v5, "color"

    invoke-virtual {p0}, Lcom/android/systemui/settings/ToggleSlider;->getContext()Landroid/content/Context;

    move-result-object v6

    invoke-virtual {v6}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v3, v4, v5, v6}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v4

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

    move-result v2

    invoke-virtual {p0}, Lcom/android/systemui/settings/ToggleSlider;->getContext()Landroid/content/Context;

    move-result-object v4

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

    move-result-object v4

    const-string v5, "brightness_icon_color"

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

    move-result v1

    invoke-virtual {p0}, Lcom/android/systemui/settings/ToggleSlider;->isCustomColorEnabled()Z

    move-result v4

    if-eqz v4, :cond_1

    move v0, v1

    :goto_0
    iget-object v4, p0, Lcom/android/systemui/settings/ToggleSlider;->mIcon:Landroid/widget/ImageView;

    sget-object v5, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setImageTintMode(Landroid/graphics/PorterDuff$Mode;)V

    iget-object v4, p0, Lcom/android/systemui/settings/ToggleSlider;->mIcon:Landroid/widget/ImageView;

    invoke-static {v0}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/widget/ImageView;->setImageTintList(Landroid/content/res/ColorStateList;)V

    :cond_0
    return-void

    :cond_1
    move v0, v2

    goto :goto_0
.end method

Explanation:
In your smali you can see the view doesn't use the object mAnimateIcon as icon. Instead it has ImageView object called mIcon. I can't see your resporces, But I guess they removed the use of animated icon and they use regular image view instead. So we set tint list and tint mode like we would for any image view.


hey

thanks for that but with latest n7 base BPI7 it's not working anyway

https://drive.google.com/file/d/0B3Grn2v5z6WkTEcyc3NPeFpqQU0/view?usp=sharing

here is link for smalis

if someone can help me that would be great
 

koko115

Senior Member
Jul 1, 2012
1,821
334
113
[Guide] Lockscreen Timeout Delay - MM

The elusive lockscreen timeout...
This will allow you to control the timeout delay for the lockscreen.

SystemUI.apk smali edits
SystemUI\smali\com\android\systemui\statusbar\phone\StatusBarWindowManager.smali
Add new code in BLUE
Code:
.method public getUserActivityTimeout()J
    .locals 8

    const/4 v5, 0x1

    sget v6, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->AWAKE_INTERVAL_DEFAULT_MS:I

    [COLOR="blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarWindowManager;->mContext:Landroid/content/Context;

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

    move-result-object v1

    const-string v2, "display_timeout_delay"

    const/16 v3, 0x2710

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

    move-result v6  [/COLOR]   ## [COLOR="Red"]Make sure this variable matches the one below
[/COLOR]
    int-to-long v0, v6
Rom Control V2 Entry
Add arrays
Code:
    <string-array name="display_timeout_entries">
        <item>5 seconds</item>
        <item>10 seconds (default)</item>
        <item>15 seconds</item>
        <item>30 seconds</item>
        <item>60 seconds</item>
        <item>2 minutes</item>
        <item>5 minutes</item>
    </string-array>
    <string-array name="display_timeout_values">
        <item>5000</item>
        <item>10000</item>
        <item>15000</item>
        <item>30000</item>
        <item>60000</item>
        <item>120000</item>
        <item>300000</item>
    </string-array>
Rom Control pref entry
Code:
    <com.wubydax.romcontrol.v2.prefs.MyListPreference
        android:entries="@array/display_timeout_entries"
        android:title="Lockscreen Display Timeout"
        android:key="display_timeout_delay"
        android:defaultValue="10000"
        android:entryValues="@array/display_timeout_values"
        app:packageNameToKill="com.android.systemui"/>
Note:
For now, this requires a UI restart onchange.
The silent UI restart command is included for those of you already using RC V2.
Great mod thx. But this mod no working when SmartStay is On. Any fix for this ?
 

Silassi1

Senior Member
Jan 29, 2014
71
39
0
My humble addition to Network Traffic Color

GUIDE - HOW TO ADD NETWORK TRAFFIC TINT ON LIGHT STATUS BAR

CREDITS TO @daxgirl for original mod!

First you will need to add <item type="id" name="network_traffic">false</item> to your ids.xml, you can call the id whatever you want just remember it

Second add the newly created id to res/layout/status_bar.xml, I have highlighted it here in blue, note it matches the id created <com.android.wubydax.NetworkTraffic android:id="@id/network_traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" />

Third we will add this id in StatusbarIconController in the method noted below - addition noted in blue, I have included some code here as an example from my file - I also increased my locals to use the new way of adding ids without decompiling and recompiling systemUI. Please also add field mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic;:

Code:
.method public constructor <init>(Landroid/content/Context;Landroid/view/View;Landroid/view/View;Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    .locals 9
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "statusBar"    # Landroid/view/View;
    .param p3, "keyguardStatusBar"    # Landroid/view/View;
    .param p4, "phoneStatusBar"    # Lcom/android/systemui/statusbar/phone/PhoneStatusBar;

    .prologue
    .
    .
    .
    .

     .line 183
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNotificationIcons:Lcom/android/systemui/statusbar/phone/IconMerger;

    iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mMoreIcon:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/IconMerger;->setOverflowIndicator(Landroid/view/View;)V

    .line 184
    invoke-virtual {p3, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mStatusIconsKeyguard:Landroid/widget/LinearLayout;

    .line 185
    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/android/systemui/BatteryMeterView;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mBatteryMeterView:Lcom/android/systemui/BatteryMeterView;

  [COLOR="Blue"] const-string v7, "network_traffic"

    const-string v8, "id"

    invoke-static {v7, v8}, Lcom/android/wubydax/GearUtils;->getIdentifier(Ljava/lang/String;Ljava/lang/String;)I

    move-result v1
	
    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/android/wubydax/NetworkTraffic;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic;[/COLOR]

    .
    .
    .

Fourth in the same smali in .method private applyIconTint()V add the following (I added it just under he battery meter view section - but i have tried adding it other places and it works.

Code:
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mBatteryMeterView:Lcom/android/systemui/BatteryMeterView;

    iget v3, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mDarkIntensity:F

    invoke-virtual {v2, v3}, Lcom/android/systemui/BatteryMeterView;->setDarkIntensity(F)V
    #####
    [COLOR="Blue"]iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic;

    iget v3, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mDarkIntensity:F

    invoke-virtual {v2, v3}, Lcom/android/wubydax/NetworkTraffic;->setDarkIntensity(F)V[/COLOR]

Fifth The rest of he work will be in the NetworkTraffic smali that was added from @daxgirl mod:

Add the following fields:

.field private mLightModeIconColorSingleTone:I

.field private mDarkModeIconColorSingleTone:I

.field private mDownloadTint:I

.field private mUploadTint:I

.field private mNetworkTrafficTint:I

.field private mNetworkTrafficArrowTint:I


sixth Same smali in .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V add the following, I included additional code to show where added:

Code:
.   
. 
   const-string v3, "dimen"

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v2, v3, v4}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->txtSizeMulti:I
    
    .line 231
    
   [COLOR="Blue"] const v2, 0x7f0a00ad ##make sure this agrees to your id for "dark_mode_icon_color_single_tone"

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

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->mDarkModeIconColorSingleTone:I

    const v2, 0x7f0a00b1  ##make sure this agrees to your id for "light_mode_icon_color_single_tone"

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

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->mLightModeIconColorSingleTone:I[/COLOR]

seventh Add the following private method which is really a copy past from StatusbarIconController smali - however PLEASE ENSURE to change the float in the bracket to (FII) since the evaluation method in the NetworkTraffic.smali is written slighly different, also make sure path is updated in appropriate spot to Lcom/android/wubydax/NetworkTraffic

Code:
[COLOR="blue"].method private getTintInternal(FII)I
    .locals 3

    invoke-static {}, Landroid/animation/ArgbEvaluator;->getInstance()Landroid/animation/ArgbEvaluator;

    move-result-object v0

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mDarkModeIconColorSingleTone:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v0, p1, v1, v2}, Landroid/animation/ArgbEvaluator;->evaluate(FLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    return v0
.end method[/COLOR]

eight in .method private updateSettings()V do the following, again I have included some code to show what I did. Since you are using the same NetworkTraffic smali it will be easy to find:

Code:
if-eqz v9, :cond_95

    .line 289
    [COLOR="Red"]#iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I #I have found that it works without this change[/COLOR]
    [COLOR="Blue"]iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I[/COLOR]

.
.
.local v8, "uploadColored":Landroid/text/SpannableString;
[COLOR="Red"]#    iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I[/COLOR]
   [COLOR="Blue"] iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I[/COLOR]

.
.
.local v2, "downloadColored":Landroid/text/SpannableString;
[COLOR="Red"]#    iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I[/COLOR]
   [COLOR="Blue"] iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I[/COLOR]

.
.

ninth in .method private updateTrafficDrawable()V do the following:

Code:
.
.
[COLOR="Red"]#    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I[/COLOR]
   [COLOR="Blue"] iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I[/COLOR]
.
.
.
.
[COLOR="Red"]#    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowColor:I[/COLOR]
    [COLOR="Blue"]iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowTint:I[/COLOR]

tenth add the following method at the bottom of smali:

Code:
[COLOR="Blue"].method public setDarkIntensity(F)V
    .locals 2
    .param p1, "darkIntensity"    # F

    .prologue
    .line 371
    iget v1, p0, Lcom/android/wubydax/NetworkTraffic;->mLightModeIconColorSingleTone:I

    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FII)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I
   
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FII)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowTint:I
    
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FII)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I
   
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FII)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I

    .line 373
    invoke-direct {p0}, Lcom/android/wubydax/NetworkTraffic;->updateSettings()V

    .line 374
    return-void
.end method[/COLOR]

Note there is a bug on updating colors which will either require a systemUI restart of go from regular statusbar to light statusbar then after the tint animation the color updates - I am not an expert so not sure about this yet. Maybe an expert can help - @daxgirl I certainly hope you don't mind me messing up you mod! thanks in advance - please help with kinks?? Thanks. This was a lot of trial and error - of course with some understanding (a little...hahaha) of what i was doing

oh - also i had to make these access changes it would not work properly until i did, they are called in NetworkTraffic$1 smali:

Code:
.method static synthetic access$1200(Lcom/android/wubydax/NetworkTraffic;)I
    .registers 2
    .param p0, "x0"    # Lcom/android/wubydax/NetworkTraffic;

    .prologue
    .line 42
[COLOR="Red"]#    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I[/COLOR]
    [COLOR="Blue"]iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I[/COLOR]

    return v0
.end method

Code:
.method static synthetic access$900(Lcom/android/wubydax/NetworkTraffic;)I
    .registers 2
    .param p0, "x0"    # Lcom/android/wubydax/NetworkTraffic;

    .prologue
    .line 42
[COLOR="Red"]#    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I[/COLOR]
   [COLOR="Blue"] iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I[/COLOR]

    return v0
.end method
 
Last edited:

daxgirl

Senior Member
Jun 30, 2012
4,047
9,165
0
Jerusalem
GUIDE - HOW TO ADD NETWORK TRAFFIC TINT ON LIGHT STATUS BAR

CREDITS TO @daxgirl for original mod!
You got it, my friend! Not only that you got how the mod works, you ALSO got how the darkening works from my three huge scary guides!! Cudos!!!!! Nicely done. I will make the source code available some time soon. This mod is based on open source protected class. To be compliant with license we need to publish source. I'll take care of it some time later this week maybe. Great job!!!
 

Silassi1

Senior Member
Jan 29, 2014
71
39
0
You got it, my friend! Not only that you got how the mod works, you ALSO got how the darkening works from my three huge scary guides!! Cudos!!!!! Nicely done. I will make the source code available some time soon. This mod is based on open source protected class. To be compliant with license we need to publish source. I'll take care of it some time later this week maybe. Great job!!!

your teachings/guides are SUPER CLEAR, and well laid out so with some studying it possible to try things (albeit difficult for me) Thanks again!
 
  • Like
Reactions: daxgirl

koko115

Senior Member
Jul 1, 2012
1,821
334
113
GUIDE - HOW TO ADD NETWORK TRAFFIC TINT ON LIGHT STATUS BAR

CREDITS TO @daxgirl for original mod!

First you will need to add <item type="id" name="network_traffic">false</item> to your ids.xml, you can call the id whatever you want just remember it

Second add the newly created id to res/layout/status_bar.xml, I have highlighted it here in blue, note it matches the id created <com.android.wubydax.NetworkTraffic android:id="@id/network_traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" />

Third we will add this id in StatusbarIconController in the method noted below - addition noted in blue, I have included some code here as an example from my file - I also increased my locals to use the new way of adding ids without decompiling and recompiling systemUI. Please also add field mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic:

Code:
.method public constructor <init>(Landroid/content/Context;Landroid/view/View;Landroid/view/View;Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
    .locals 9
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "statusBar"    # Landroid/view/View;
    .param p3, "keyguardStatusBar"    # Landroid/view/View;
    .param p4, "phoneStatusBar"    # Lcom/android/systemui/statusbar/phone/PhoneStatusBar;

    .prologue
    .
    .
    .
    .

     .line 183
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNotificationIcons:Lcom/android/systemui/statusbar/phone/IconMerger;

    iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mMoreIcon:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/IconMerger;->setOverflowIndicator(Landroid/view/View;)V

    .line 184
    invoke-virtual {p3, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mStatusIconsKeyguard:Landroid/widget/LinearLayout;

    .line 185
    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/android/systemui/BatteryMeterView;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mBatteryMeterView:Lcom/android/systemui/BatteryMeterView;

  [COLOR="Blue"] const-string v7, "network_traffic"

    const-string v8, "id"

    invoke-static {v7, v8}, Lcom/android/wubydax/GearUtils;->getIdentifier(Ljava/lang/String;Ljava/lang/String;)I

    move-result v1

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/android/wubydax/NetworkTraffic;

    iput-object v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic;[/COLOR]

    .
    .
    .

Fourth in the same smali in .method private applyIconTint()V add the following (I added it just under he battery meter view section - but i have tried adding it other places and it works.

Code:
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mBatteryMeterView:Lcom/android/systemui/BatteryMeterView;

    iget v3, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mDarkIntensity:F

    invoke-virtual {v2, v3}, Lcom/android/systemui/BatteryMeterView;->setDarkIntensity(F)V
    #####
    [COLOR="Blue"]iget-object v2, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mNetworkTraffic:Lcom/android/wubydax/NetworkTraffic;

    iget v3, p0, Lcom/android/systemui/statusbar/phone/StatusBarIconController;->mDarkIntensity:F

    invoke-virtual {v2, v3}, Lcom/android/wubydax/NetworkTraffic;->setDarkIntensity(F)V[/COLOR]

Fifth The rest of he work will be in the NetworkTraffic smali that was added from @daxgirl mod:

Add the following fields:

.field private mLightModeIconColorSingleTone:I

.field private mDarkModeIconColorSingleTone:I

.field private mDownloadTint:I

.field private mUploadTint:I

.field private mNetworkTrafficTint:I

.field private mNetworkTrafficArrowTint:I


sixth Same smali in .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V add the following, I included additional code to show where added:

Code:
.   
. 
   const-string v3, "dimen"

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v2, v3, v4}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->txtSizeMulti:I
    
    .line 231
    
   [COLOR="Blue"] const v2, 0x7f0a00ad ##make sure this agrees to your id for "dark_mode_icon_color_single_tone"

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

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->mDarkModeIconColorSingleTone:I

    const v2, 0x7f0a00b1  ##make sure this agrees to your id for "light_mode_icon_color_single_tone"

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

    move-result v2

    iput v2, p0, Lcom/android/wubydax/NetworkTraffic;->mLightModeIconColorSingleTone:I[/COLOR]

seventh Add the following private method which is really a copy past from StatusbarIconController smali - make sure path is updated in appropriate spot to Lcom/android/wubydax/NetworkTraffic

Code:
[COLOR="blue"].method private getTintInternal(FI)I
    .locals 3

    invoke-static {}, Landroid/animation/ArgbEvaluator;->getInstance()Landroid/animation/ArgbEvaluator;

    move-result-object v0

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mDarkModeIconColorSingleTone:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v0, p1, v1, v2}, Landroid/animation/ArgbEvaluator;->evaluate(FLjava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    return v0
.end method[/COLOR]

eight in .method private updateSettings()V do the following, again I have included some code to show what I did. Since you are using the same NetworkTraffic smali it will be easy to find:

Code:
if-eqz v9, :cond_95

    .line 289
    [COLOR="Red"]#iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I #I have found that it works without this change[/COLOR]
    [COLOR="Blue"]iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I[/COLOR]

.
.
.local v8, "uploadColored":Landroid/text/SpannableString;
[COLOR="Red"]#    iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I[/COLOR]
   [COLOR="Blue"] iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I[/COLOR]

.
.
.local v2, "downloadColored":Landroid/text/SpannableString;
[COLOR="Red"]#    iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I[/COLOR]
   [COLOR="Blue"] iget v9, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I[/COLOR]

.
.

ninth in .method private updateTrafficDrawable()V do the following:

Code:
.
.
[COLOR="Red"]#    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I[/COLOR]
   [COLOR="Blue"] iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I[/COLOR]
.
.
.
.
[COLOR="Red"]#    iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowColor:I[/COLOR]
    [COLOR="Blue"]iget v2, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowTint:I[/COLOR]

tenth add the following method at the bottom of smali:

Code:
[COLOR="Blue"].method public setDarkIntensity(F)V
    .locals 2
    .param p1, "darkIntensity"    # F

    .prologue
    .line 371
    iget v1, p0, Lcom/android/wubydax/NetworkTraffic;->mLightModeIconColorSingleTone:I

    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FI)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficTint:I
   
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FI)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mNetworkTrafficArrowTint:I
    
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FI)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I
   
    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I

    invoke-direct {p0, p1, v0, v1}, Lcom/android/wubydax/NetworkTraffic;->getTintInternal(FI)I

    move-result v0

    iput v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I

    .line 373
    invoke-direct {p0}, Lcom/android/wubydax/NetworkTraffic;->updateSettings()V

    .line 374
    return-void
.end method[/COLOR]

Note there is a bug on updating colors which will either require a systemUI restart of go from regular statusbar to light statusbar then after the tint animation the color updates - I am not an expert so not sure about this yet. Maybe an expert can help - @daxgirl I certainly hope you don't mind me messing up you mod! thanks in advance - please help with kinks?? Thanks. This was a lot of trial and error - of course with some understanding (a little...hahaha) of what i was doing

oh - also i had to make these access changes it would not work properly until i did, they are called in NetworkTraffic$2 smali:

Code:
.method static synthetic access$1200(Lcom/android/wubydax/NetworkTraffic;)I
    .registers 2
    .param p0, "x0"    # Lcom/android/wubydax/NetworkTraffic;

    .prologue
    .line 42
[COLOR="Red"]#    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadColor:I[/COLOR]
    [COLOR="Blue"]iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mDownloadTint:I[/COLOR]

    return v0
.end method

Code:
.method static synthetic access$900(Lcom/android/wubydax/NetworkTraffic;)I
    .registers 2
    .param p0, "x0"    # Lcom/android/wubydax/NetworkTraffic;

    .prologue
    .line 42
[COLOR="Red"]#    iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadColor:I[/COLOR]
   [COLOR="Blue"] iget v0, p0, Lcom/android/wubydax/NetworkTraffic;->mUploadTint:I[/COLOR]

    return v0
.end method
Realy thanks... I go to moding ?? If You have some time, maybe You work on this mod to tint ?
http://forum.xda-developers.com/showthread.php?p=67077877
 

Ybholy

New member
Sep 15, 2016
2
0
0
Lagos
w3howto.com
Thanks a lot

I enjoyed this post. I also see it at tecno phantom 6 forum ealier today!
TOUCHWIZ UNIFIED MODS THREAD - GUIDES & LINKS

Samsung-Galaxy.png


Always a work in progress. Refer here for guides and links to various mods to help improve the Android experience.
Please feel free to contribute as well. :)

This thread requires basic knowledge of compiling and decompiling apk and jar files so they can be edited.
___________________________________________________

[Guide How-to] Remove Lockscreen Carrier
This removes the lockscreen carrier text.
Keyguard.apk smali edit:
smali/com/android/keyguard/CarrierText.smali:

Change if-nez to if-eqz in the indicated edit in BLUE:
Code:
.method private static concatenate(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
    .locals 5

    const/4 v2, 0x1

    const/4 v3, 0x0

    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    [COLOR="Blue"]if-eqz [/COLOR]v4, :cond_1

    move v0, v2
___________________________________________________

[Guide How-to] USB Plug/Unplugged Disable Wake + Android L
This modification will prevent the phone from waking for both (or either) USB/Power unplugged or plugged in states.
Services.jar edits:
smali/com/android/server/power/PowerManagerService.smali:
All edits are in .method private updateIsPoweredLocked(I)V

Expand registers from 12 to 14 (your code may be different dependant on decompiling method)
Code:
.method private updateIsPoweredLocked(I)V
    [COLOR="Blue"].locals 14
[/COLOR]
Delete the line in RED to disable wake when plugged in.
Code:
    const-string v4, "charger plug"

    invoke-virtual {v8, v0, v4}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;

    move-result-object v7

    invoke-virtual {v7, v3}, Landroid/os/PowerManager$WakeLock;->setReferenceCounted(Z)V

    const-wide/16 v4, 0x2710

    [COLOR="Red"]invoke-virtual {v7, v4, v5}, Landroid/os/PowerManager$WakeLock;->acquire(J)V
[/COLOR]
    :cond_1

Next two edits to disable wake when unplugged.
A few lines lower, add lines in BLUE.
Code:
    iput-boolean v0, p0, Lcom/android/server/power/PowerManagerService;->mPowerIsChanged:Z

    :cond_2
    invoke-direct {p0, v10, v9, v6}, Lcom/android/server/power/PowerManagerService;->shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z

    move-result v0

    [COLOR="Blue"]goto :goto_td
[/COLOR]    if-eqz v0, :cond_3
Code:
    iput-object v0, p0, Lcom/android/server/power/PowerManagerService;->mScreenOnReason:Ljava/lang/String;

    invoke-direct {p0, v1, v2}, Lcom/android/server/power/PowerManagerService;->wakeUpNoUpdateLocked(J)Z

    [COLOR="Blue"]:goto_td[/COLOR]
    :cond_3
    const/16 v5, 0x3e8
Android L Edits
Services.jar edits:
Add new code in BLUE
Note: This edit will disable BOTH plugged and unplugged.
They are not separate edits as previous builds.
smali/com/android/server/power/PowerManagerService.smali:
Code:
    .method private updateIsPoweredLocked(I)V
.
.
.

    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v2

    invoke-direct {p0, v9, v8, v0}, Lcom/android/server/power/PowerManagerService;->shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z

    move-result v1

    [COLOR="Blue"]const v1, 0x0
[/COLOR]
    if-eqz v1, :cond_1

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
__________________________________________________

[Guide How-to] Remove Safe Volume Warning
This removes the safe volume warning that pops up when you turn up the volume beyond a certain point.
This mod requires modifying framework.jar
Edit smali/android/media/AudioService.smali:
Changes are in .method private checkSafeMediaVolume(III)Z
, new lines are in BLUE:

Code:
    :cond_1
    iget-object v6, p0, Landroid/media/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;

    invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I

    move-result v6

    [COLOR="Blue"]goto :goto_td
[/COLOR]
    if-ne v6, v7, :cond_4

    iget-object v6, p0, Landroid/media/AudioService;->mStreamVolumeAlias:[I

Code:
    goto :goto_1

    [COLOR="Blue"]:goto_td[/COLOR]
    :cond_4
    monitor-exit v5
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    goto :goto_0
.end method
HIGH.VOL.png
____________________________________________________

[Guide How-to] Replace Recents with Menu & LongPress Home for Recents

This guide is for the Galaxy S5 and should work on all variants.
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from APP_SWITCH to MENU
key 254 MENU

system/usr/keylayout/gpio-keys.kl
Do the same to key 254
key 254 MENU

Now Recent Apps capacitive key is Menu (single-press) and Search (long-press).
However, we have now lost access to recent apps via a hardware key.

How-to map Recent Apps to Long-press Home

android.policy.jar edits
smali/com/android/internal/policy/impl/PhoneWindowManager.smali

Search for and delete the line in RED.
Code:
    iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

    if-eqz v2, :cond_0

    iput-boolean v5, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomeConsumed:Z

    const/4 v2, 0x0

    invoke-virtual {p0, v2, v4, v4}, Lcom/android/internal/policy/impl/PhoneWindowManager;->performHapticFeedbackLw(Landroid/view/WindowManagerPolicy$WindowState;IZ)Z

    iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I

   [COLOR="Red"] if-ne v2, v5, :cond_6
[/COLOR]
    invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V
__________________________________________________

[Guide How-To] Native Call Recording KK 4.4.2
This enables call recording natively.
Simple CSC edit.
system/csc/feature.xml edit
Add new section and must be inserted BEFORE
</FeatureSet>
</SamsungMobileFeature>
(** please note that feature.xml can be overwritten so this may not stick if using a third party software like Xposed)
Code:
<!-- Call -->
 <CscFeature_VoiceCall_ConfigRecording>RecordingAllowed</CscFeature_VoiceCall_ConfigRecording>

Installation and Other Notes:
- recordings are saved in internal SD/Sounds
____________________________________________________

[Guide/How-To] Remove Location Consent Popup
Remove that annoying Location Consent popup.
We are editing the file GmsCore.apk. The apk is very difficult to de/recompile so we are just editing classes.dex file separately. Included is the smali/baksmali compiling tool. Just extract the classes.dex from GmsCore.apk and place it in the same folder as the extracted files from the tool and select decompile.bat.
This will create an output folder called classout. Once the edits are complete, you will select compile.bat and (if there are no errors) a newly created file new-classes.dex will be created. Rename this to classes.dex and insert it back into GmsCore.apk.

Edit classout/com/google/android/location/network/NetworkLocationService.smali
.method static a(Landroid/content/Context;)V, change if-nez to if-eqz as indicated in BLUE:
Code:
    move-result-object v0

    .line 106
    [COLOR="Blue"]if-eqz [/COLOR]v0, :cond_2c

    .line 107
    const-string v0, "GmsNetworkLocationService"

    const-string v1, "applySettings(): provider not available"

Edit classout/com/google/android/location/network/ConfirmAlertActivity.smali

Make the change indicated in BLUE:
Code:
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 44
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 59
    [COLOR="Blue"]const/4 v0, 0x1
[/COLOR]
    iput-boolean v0, p0, Lcom/google/android/location/network/ConfirmAlertActivity;->c:Z

    .line 60
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/google/android/location/network/ConfirmAlertActivity;->d:Landroid/app/Dialog;

    .line 163
    return-void
.end method

Make the change indicated in BLUE:
Code:
.method public onClick(Landroid/content/DialogInterface;I)V
    .registers 6

    .prologue
   [COLOR="Blue"] const/4 v1, 0x1
[/COLOR]
    .line 140
    const/4 v0, -0x1

    if-ne p2, v0, :cond_2a

    const/4 v0, 0x1

    :goto_5
    iput-boolean v0, p0, Lcom/google/android/location/network/ConfirmAlertActivity;->c:Z
LOCATION.CONSENT.png

____________________________________________________

[Guide] [How-to] Disable Battery Cover & Charging Cover Toasts
This disables both the battery cover and the charging/usb cover toast messages.
Decompile system/app/PopupuiReceiver.apk.
Edit res/values/bools.xml.

Change true value to false in the line below:
Code:
    <bool name="display_battery_cover_popup">[COLOR="Blue"]false[/COLOR]</bool>

Notes:
This should also resolve the battery cover toast from appearing for a split second after a reboot and the screen is unlocked.
COVERS.1.png
. .
COVERS2.png
____________________________________________________

[Guide How-to] Bluetooth Scan Dialog Removal
This will remove the scan dialog popup when Bluetooth is enabled.
SecSettings.apk edit:
smali/com/android/settings/Bluetooth/BluetoothScanDialog.smali
.method private initialize()V
At the end of the method, delete the line in RED:
Code:
    invoke-virtual {v0, v4}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

    [COLOR="Red"]invoke-virtual {v0}, Landroid/app/Dialog;->show()V
[/COLOR]
    return-void
.end method
BLUETOOTH.POPUP.png
____________________________________________________

[Guide How-to] Maximum StatusBar Brightness 4.4.2
I noticed that Samsung always make the statusbar notification areas a bit dim.
EXTRA - Also look at the link HERE
This requires decompiling SystemUI.apk.
SystemUI/res/values/dimens.xml edit
Code:
Change these three lines
New values are in BLUE
    <item type="dimen" name="status_bar_icon_drawing_alpha">[COLOR="Blue"]100.0%[/COLOR]</item>
    <item type="dimen" name="system_icon_area_alpha">[COLOR="Blue"]1.0[/COLOR]</item>
    <item type="dimen" name="notification_icon_area_alpha">[COLOR="Blue"]1.0[/COLOR]</item>
SB.BRIGHT1.png
. .
SB.BRIGHT2.png
____________________________________________________

[Guide How-to] Remove Airplane Quicksetting Popup + ANDROID L
Remove the permission popup for Airplane mode when selected from Quicksettings.
SystemUI.apk smali edit:
com/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton.smali

Add the following code in BLUE.
(the values MUST match the surrounding code and may be different for your build)
.method private showConfirmPopup(Z)V

Code:
    invoke-virtual {v6, v7}, Landroid/view/Window;->setType(I)V

    :goto_4

[COLOR="Blue"]    new-instance v8, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$4;

    invoke-direct {v8, p0, v5}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$4;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;Z)V

    const v6, 0x0

    invoke-virtual {v8, v6, v5}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$4;->onClick(Landroid/content/DialogInterface;I)V

    return-void
[/COLOR]
    iget-object v6, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mAlertDialog:Landroid/app/AlertDialog;

    invoke-virtual {v6}, Landroid/app/Dialog;->show()V
Android L
Add new code in BLUE
smali\com\android\systemui\qs\tiles\AirplaneModeTile.smali
Code:
    const/16 v5, 0x7d9

    invoke-virtual {v4, v5}, Landroid/view/Window;->setType(I)V

    :goto_3

[COLOR="Blue"]
    new-instance v6, Lcom/android/systemui/qs/tiles/AirplaneModeTile$6;

    invoke-direct {v6, p0, p1}, Lcom/android/systemui/qs/tiles/AirplaneModeTile$6;-><init>(Lcom/android/systemui/qs/tiles/AirplaneModeTile;Z)V

    const v4, 0x0

    invoke-virtual {v6, v4, p1}, Lcom/android/systemui/qs/tiles/AirplaneModeTile$6;->onClick(Landroid/content/DialogInterface;I)V

    return-void[/COLOR]

    iget-object v4, p0, Lcom/android/systemui/qs/tiles/AirplaneModeTile;->mAlertDialog:Landroid/app/AlertDialog;

    invoke-virtual {v4}, Landroid/app/AlertDialog;->show()V

    return-void

Airplane.png
____________________________________________________

[Guide How-To] ENABLE CALL & MSG BLOCKING
This enables call and msg blocking natively.
Simple CSC edit.
system/csc/feature.xml edit
Must be inserted BEFORE
</FeatureSet>
</SamsungMobileFeature>
(** please note that feature.xml can be overwritten so this may not stick if using a third party software like Xposed)
Code:
<CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
CALL.BLOCK1.png
. .
CALL.BLOCK2.png
Credits to @majdinj for his thread HERE
____________________________________________________

[Guide How-To] ENABLE WiFi & USB Tethering (HOTSPOT)
This will enable WiFi Hotspot and USB tethering.
services.jar smali edit:
smali/com/android/server/connectivity/Tethering.smali
Search for the text highlighted in GREEN and make the edit in BLUE:
Code:
    const-string/jumbo v1, "tether_dun_required"

    [COLOR="Blue"]const/4 v2, 0x0[/COLOR]

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

    const-string v0, "Tethering"

    [COLOR="Green"]const-string v1, "Set dun requiered as 1"
[/COLOR]
__________________________________________________

[Guide How-To] ENABLE DEVELOPER OPTIONS
This will enable Developer Options settings item without having to do the build multiple tap.
SecSettings.apk edits:
We will be editing multiple xml files and adding an entry to ids.xml.
res/values/ids.xml
Code:
add this entry:
    <item type="id" name="dev_settings">false</item>
res/xml edits same edit to all 4 listed:
general_headers.xml
grid_settings_headers.xml
management_headers.xml
settings_headers.xml
Before:
Code:
    <header android:icon="@drawable/ic_settings_development" android:id="@id/development_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
After:
Code:
    <header android:icon="@drawable/ic_settings_development" android:id="@id/dev_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
Developer_options.png
Credits @rompnit for this one as well.
Android 5.1.1 guide is --> HERE
__________________________________________________

[Guide How-To] CHANGE DEFAULT ANIMATION SCALES
This smali edit will change the default animation scales for increased GUI speed.
services.jar edit:
.method private constructor <init>(Landroid/content/Context;Lcom/android/server/power/PowerManagerService;Lcom/android/server/display/DisplayManagerService;Lcom/android/server/input/InputManagerService;ZZZ)V
Search down for first occurrence of 0x3f80
Make the changes in BLUE
Code:
    iput-object v9, p0, Lcom/android/server/wm/WindowManagerService;->mFocusedApp:Lcom/android/server/wm/AppWindowToken;

    [COLOR="Blue"]const/high16 v9, 0x3f00[/COLOR]

    iput v9, p0, Lcom/android/server/wm/WindowManagerService;->mWindowAnimationScale:F

    [COLOR="Blue"]const/high16 v9, 0x3f00
[/COLOR]
    iput v9, p0, Lcom/android/server/wm/WindowManagerService;->mTransitionAnimationScale:F

    [COLOR="Blue"]const/high16 v9, 0x3f00[/COLOR]

    iput v9, p0, Lcom/android/server/wm/WindowManagerService;->mAnimatorDurationScale:F
ANIMATION_SCALE.png
Credits @bajasur for the original guide HERE
__________________________________________________

[Guide How-To] REMOVE IME KEYBOARD SWITCHER NOTIFICATION
This is a very simple edit but I couldn't find a guide anywhere to link to so here it is.
framework-res.apk edit:
res/values/bools.xml
Change the value indication in BLUE from true to false
Code:
    <bool name="show_ongoing_ime_switcher">[COLOR="Blue"]false[/COLOR]</bool>
__________________________________________________

[Guide How-To] DISABLE HOME KEY WAKE
This will prevent the Home Key from waking the phone.
android.policy.jar smali edit:
smali/com/android/interal/policy/impl/PhoneWindowManager.smali
.method private isWakeKeyWhenScreenOff(I)Z
Add the new lines in BLUE
Code:
    :sswitch_1
    move v0, v1

    goto :goto_0

    [COLOR="Blue"]:sswitch_4

    return v1

    nop
[/COLOR]
    :sswitch_data_0
    .sparse-switch
        [COLOR="Blue"]0x3 -> :sswitch_4
[/COLOR]        0x18 -> :sswitch_0
        0x19 -> :sswitch_0
Credits @rompnit for this one too.
__________________________________________________

[Guide How-To] REMOVE ROAMING NOTIFICATION
This will remove the ongoing Roaming notification.
SecTeleservice.apk smali edit:
smali/com/android/phone/PhoneGlobals$5.smali
Search for hideDataDisconnectedRoaming
(there is only one occurrence)
Delete the TWO lines in RED
Code:
    iget-object v0, v0, Lcom/android/phone/PhoneGlobals;->notificationMgr:Lcom/android/phone/NotificationMgr;

    move-object/from16 v30, v0

   [COLOR="Red"] invoke-virtual/range {v30 .. v30}, Lcom/android/phone/NotificationMgr;->showDataDisconnectedRoaming()V
[/COLOR]
    goto/16 :goto_0

    :sswitch_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/phone/PhoneGlobals$5;->this$0:Lcom/android/phone/PhoneGlobals;

    move-object/from16 v30, v0

    move-object/from16 v0, v30

    iget-object v0, v0, Lcom/android/phone/PhoneGlobals;->notificationMgr:Lcom/android/phone/NotificationMgr;

    move-object/from16 v30, v0

    [COLOR="Red"]invoke-virtual/range {v30 .. v30}, Lcom/android/phone/NotificationMgr;->hideDataDisconnectedRoaming()V
[/COLOR]
    goto/16 :goto_0
__________________________________________________

[Guide How-To] DISABLE SCROLLING CACHE
This guide will show you how to disable scrolling cache.
framework2.jar smali edit:
smali/android/widget/AbsListView.smali
Make the modification in BLUE
Code:
.method private createScrollingCache()V
    .locals 2

    .prologue
    [COLOR="Blue"]const/4 v1, 0x0[/COLOR]
Make the modification in BLUE
Code:
.method private initAbsListView()V
    .locals 11

    .prologue
    const-wide/16 v4, 0x0

    const/4 v0, 0x0

    const/4 v10, 0x1

    .line 1159
    invoke-virtual {p0, v10}, Landroid/view/View;->setClickable(Z)V

    .line 1160
    invoke-virtual {p0, v10}, Landroid/widget/AdapterView;->setFocusableInTouchMode(Z)V

    .line 1161
    invoke-virtual {p0, v0}, Landroid/view/View;->setWillNotDraw(Z)V

    .line 1162
    invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->setAlwaysDrawnWithCacheEnabled(Z)V

    .line 1163
    [COLOR="Blue"]invoke-virtual {p0, v0}, Landroid/widget/AbsListView;->setScrollingCacheEnabled(Z)V
[/COLOR]
Make the modification in BLUE
Important note:
You will not see the .parameter if using apktool with the -b commandline decompile option. So don't use it. ;)
Code:
.method public setScrollingCacheEnabled(Z)V
    .locals 1
    [COLOR="Blue"].parameter "disabled"[/COLOR]

    .prologue
    .line 1999
__________________________________________________

[Guide How-To] DISABLE MSL & ENABLE PRL WRITE IN ##DATA# MENU
This guide disables the need to input MSL and also enables flashing PRL's right from the ##DATA# menu.
system/csc/sales_code.dat edit:
Our stock rom has XAS in this file and it needs to changed to SPR for the new features to work.
hiddenmenu.apk smali edit:
smali /com/android/hiddenmenu/hdata.smali
Search for the string "MSM7630_SURF".
There are 3 occurrences but only two of them have a "SPR" right above them.
We are changing the "SPR" to "SPX" in both occurrences:
Code:
    if-nez v2, :cond_c

    const-string v2, [COLOR="Blue"]"SPX"
[/COLOR]
    sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_c

    const-string v2, "XAS"

    sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_c

    const-string v2, "MSM7630_SURF"
Code:
    :cond_c
    const-string v2, [COLOR="Blue"]"SPX"
[/COLOR]
    sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_d

    const-string v2, "MSM7630_SURF"
smali/com/android/hiddenmenu/hdata_options.smali
This edit is similar to the ones above but we are changing "VZW" string to "SPR".
Code:
    const-string v3, "username_preference"

    invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->setKey(Ljava/lang/String;)V

    const-string v3, "Edit"

    invoke-virtual {v2, v3}, Landroid/preference/PreferenceScreen;->setTitle(Ljava/lang/CharSequence;)V

    const-string v3, [COLOR="Blue"]"SPR"[/COLOR]

    sget-object v4, Lcom/android/hiddenmenu/hdata_options;->mSalesCode:Ljava/lang/String;
smali/com/android/hiddenmenu/HiddenmenuBroadcastReceiver.smali
Search for the FIRST occurrence of DebugMenu_Check
Delete lines in RED, change text in BLUE
Before:
Code:
    if-nez v0, :cond_2c

    const-class v0, Lcom/android/hiddenmenu/DebugMenu_Check;

    invoke-virtual {v3, p1, v0}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    [COLOR="Red"]move-result-object v0

    const-string v1, "keyString"

    invoke-virtual {v0, v1, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
[/COLOR]
    move v1, v2

    goto/16 :goto_5
After:
Code:
    if-nez v0, :cond_2c

    const-class v0, Lcom/android/hiddenmenu/[COLOR="Blue"]DEBUGMENU[/COLOR];

    invoke-virtual {v3, p1, v0}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    move v1, v2

    goto/16 :goto_5
Credit goes to @digiblur for this incredible mod.
(And permission to post a guide for it :))
__________________________________________________

[Guide How-To] CREATE AN XPOSED PROOF FEATURES.XML FOR CSC TWEAKS
Lets face it, xposed modules always seem to overwrite my favorite CSC tweaks.
This guide will show you how to use your own custom features.xml that won't be overwritten.
framework2.jar smali edit:
smali/com/sec/android/app/CscFeature.smali
Search for and rename feature.xml to whatever you want.
There are two locations:
Code:
.field private static final FEATURE_XML:Ljava/lang/String; = "/system/csc/[COLOR="Red"]feature.xml[/COLOR]"

    const-string v10, "/system/csc/[COLOR="Red"]feature.xml[/COLOR]"
Code:
.field private static final FEATURE_XML:Ljava/lang/String; = "/system/csc/[COLOR="Blue"]ultimate.xml[/COLOR]"

    const-string v10, "/system/csc/[COLOR="Blue"]ultimate.xml[/COLOR]"
Now just copy your custom feature.xml to the file (EXAMPLE) ultimate.xml and place it in system/csc and it will be safe from being overwritten by third party apps/tweakers.
__________________________________________________

[Guide How-To] ENABLE LOCKSCREEN ROTATION (with a toggle in mind)
I know there is a bools edit for this but this is the smali way so you can add a toggle.
Keyguard.apk smali edit:
smali/com/android/keyguard/KeyguardViewManager.smali
Change the text indicated in BLUE from 0x0 to 0x1
Code:
.method private shouldEnableScreenRotation()Z
    .locals 3

    const/4 v1, [COLOR="Blue"]0x1
[/COLOR]
    iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
__________________________________________________
[Guide How-To] Remove Knox info in About screen
Knox is removed, now remove the info from the about screen too.
SecSettings smali edit:
smali\com\android\settings\DeviceInfoSettings.smali
Find and delete the following line:
Code:
    invoke-direct/range {p0 .. p0}, Lcom/android/settings/DeviceInfoSettings;->showKnoxVersion()V
Knox_removed.png
Removing Knox for Android 6.0.x -->> http://forum.xda-developers.com/showpost.php?p=66741387&postcount=6078

Note:
Many many hours go into developing the mods and creating guides for them.
It is also considered good form to hit the :good:Thanks button rather than saying it in open forum. (it just creates unnecessary clutter)
 

Top Liked Posts

Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone