[Sony Xperia S, Acro S, Ion] ZN6:
[Guide/Tutorial] Customize Your Own Statusbar!

[Guide/Tutorial] Customize Your Own Statusbar!

Hi, again.

Some user keep PM'ing me how to change that, that and etc.

So I decide to do a simple guide to customize your own statusbar.

Make sure you have a basic knowledge to compile/decompile apk.

Change Statusbar Background Color

Decompile systemui.apk and navigate to SystemUI/res/values/drawables.xml and edit this line:

<item type="drawable" name="status_bar_background">#[COLOR="Red"]ff1a1a1a[/COLOR]</item>

Change red content to what ever you line. For more hex color reference, go here

For black color, change it to ff000000.

Save and compile back.

(This method only applicable for Style_Z and later version)

For style 1-4, change status_bar_background.png in drawable-hdpi folder.

Look for transparent statusbar? Go here.

Change Navigation Button Background Color

Decompile systemui.apk and navigate to SystemUI/res/layout/navigation_bar.xml and edit this line.

<com.android.systemui.statusbar.phone.NavigationBarView android:id="@id/nav_background" [COLOR="Red"]android:background="#ff000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none"

Change red content to what ever you line. For more hex color reference, go here

The original Xperia Z nav backgroud color is ff1a1a1a.

Save and compile back

Change Clock Colour on Statusbar

Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

And change it to this

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#[COLOR="Red"]ff09afed[/COLOR]" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

Change the red content to what ever colour you like. For more hex color reference, go here

Remember! You can also change carrier label color, date, and etc. Just look respective line and xml.

Add Seconds To Statusbar Clock

Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:

[COLOR="Blue"]<com.android.systemui.statusbar.policy.Clock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

And replace blue line above with following red line:

<[COLOR="Red"]DigitalClock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

Save change you have made and recompile back.

It easy, right?:)

Hide Clock,Battery Percentage and etc.

Hide clock.

Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

and change to this:

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" [COLOR="Red"]android:visibility="gone"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

Hide battery percentage

Find this line:

<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />

change to this:

<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" [COLOR="Red"]android:visibility="gone"[/COLOR] />

Remember! Just added red word at the end of line you want to hide if you want to hide content on statusbar.

Add Battery Percentage On Statusbar.

Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:

<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>

And add red line below:

<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
[COLOR="Red"]<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />[/COLOR]
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>

Save change you have made. After that, look for this smali file:

PhoneStatusBar.smali

.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;

const v9, 0x7f0e0028

invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

move-result-object v9

check-cast v9, Landroid/widget/ImageView;

invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V

and add red lines below:

.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;

const v9, 0x7f0e0028

invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

move-result-object v9

check-cast v9, Landroid/widget/ImageView;

invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V

[COLOR="Red"].line 13
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;

const v9, 0x7f0e0061

invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

move-result-object v9

check-cast v9, Landroid/widget/TextView;

invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addLabelView(Landroid/widget/TextView;)V[/COLOR]

also change the const v9, 0x7f0e0061 to your own value, look for it inside public.xml

Recompile back and flash.

Temporary Hide Statusbar When We Pull SystemUI/Fullscreen

(For Advanced User Only)

Find this smali file:

PhoneStatusBar.smali:

Here when the expanded view is about to become visible, we hide the main status bar view (red):

[B].method private makeExpandedVisible()V[/B]

.line 1194
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;

const/4 v1, 0x2

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->requestFocus(I)Z

.line 1195
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;

const/4 v1, 0x0

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V

[COLOR="red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const/4 v1, 0x4

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]

goto :goto_0
.end method

Here when the expanded view is gone, we show the main status bar view again (red):

[B].method performCollapse()V[/B]

.line 1278
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedDialog:Landroid/app/Dialog;

invoke-virtual {v0}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;

move-result-object v0

iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedParams:Landroid/view/WindowManager$LayoutParams;

invoke-virtual {v0, v1}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V

.line 1279
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTrackingView:Lcom/android/systemui/statusbar/phone/TrackingView;

const/16 v1, 0x8

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/TrackingView;->setVisibility(I)V

[COLOR="Red"].line 1900
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const/4 v1, 0x0

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setVisibility(I)V[/COLOR]

.line 1281
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I

const/high16 v1, 0x2

and-int/2addr v0, v1

if-nez v0, :cond_2

.line 1282
const/4 v0, 0x1

const/high16 v1, 0x10a

invoke-virtual {p0, v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setNotificationIconVisibility(ZI)V

.line 1285
:cond_2
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z

if-eqz v0, :cond_0

.line 1288
iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z

.line 1289
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;

if-eqz v0, :cond_0

.line 1290
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;

invoke-interface {v0}, Ljava/lang/Runnable;->run()V

.line 1291
const/4 v0, 0x0

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPostCollapseCleanup:Ljava/lang/Runnable;

goto :goto_0
.end method

Now look for:

Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I

You´ll get 6 matches/lines with something like:

invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I

move-result v2

Insert red line (respect line spaces) only within following methods:

.method doAnimation()V

.method doRevealAnimation()V

.method getExpandedHeight(I)I

.method prepareTracking(IZ)V

.method updateExpandedViewPos(I)V

DON´T INSERT INSIDE THIS METHOD:

.method interceptTouchEvent(Landroid/view/MotionEvent;)Z

invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getHeight()I

move-result v2

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

(remember to change v2 to the same as "move-result v?")

Save and Compile. If you still got an error or force close on statusbar, just compare with style 3.

Change Color According to ThemeAccent Color

(For Expert User Only)

Download the ThemeUtils.zip in attachment and extract it to smali/com/blah.../blah... You can put ThemeUtils.smali in any directory in smali folder. But when we want to run this file, we need to specific the directory where we put the file. For example,

I put in smali/com/sonymobile/systemui/statusbar/tools/

You will know what I mean:)

Something have to run this file and provide context object. For example, the main file which contain context object in systemui.apk is SystemUIService.smali. So look for this line:

.line 91
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;

aget-object v6, v6, v4

iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

And added following red line:

.line 91
iget-object v6, p0, Lcom/android/systemui/SystemUIService;->mServices:[Lcom/android/systemui/SystemUI;

aget-object v6, v6, v4

iput-object p0, v6, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

[COLOR="Red"]invoke-static {p0}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->init(Landroid/content/Context;)V[/COLOR]

And save it.

If you want to change the clock color in expanded statusbar for example, find this line in com/android/systemui/statusbar/phone/PhoneStatusBar.smali

.field mExpanded:Z

.field mExpandedContents:Landroid/view/View;

.field mExpandedDialog:Landroid/app/Dialog;

And add red line:

.field mExpanded:Z

[COLOR="Red"].field mExpandedClock:Landroid/widget/TextView;[/COLOR]

.field mExpandedContents:Landroid/view/View;

.field mExpandedDialog:Landroid/app/Dialog;

Find this line:

.line 1227
const/16 v0, -0x2710

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V

And add red line below:

.line 1227
const/16 v0, -0x2710

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V

[COLOR="Red"]iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;

invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColor()I

move-result v1

invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
[/COLOR]

Find this line:

.line 343
const v9, 0x7f0e003e

invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

move-result-object v9

check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;

iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;

And add red line below:

.line 343
const v9, 0x7f0e003e

invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

move-result-object v9

check-cast v9, Lcom/android/systemui/statusbar/policy/DateView;

iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDateView:Lcom/android/systemui/statusbar/policy/DateView;

[COLOR="Red"]const v9, 0x7f0e0095

invoke-virtual {v1, v9}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

move-result-object v9

check-cast v9, Landroid/widget/TextView;

iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedClock:Landroid/widget/TextView;[/COLOR]

Now look for this line:

.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v1, 0x7f0e002b

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

And add red line below:

.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v1, 0x7f0e002b

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

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

.line 1084
if-eqz v1, :cond_0

.line 1085
if-eqz p1, :cond_1

const/4 v0, 0x0

:goto_0
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V

.line 1087
:cond_0
invoke-virtual {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockExp(Z)V

return-void

.line 1085
:cond_1
const/16 v0, 0x8

goto :goto_0
.end method

.method public showClockExp(Z)V
.locals 2
.parameter

.prologue
.line 1083
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;

const v1, 0x7f0e0095

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;[/COLOR]

And save change.

If you want to change the color for button toggle according to theme (colorizing button), look for ToolsButton.smali (com/sonymobile/systemui/statusbar/tools).

Fine this line:

.method private updateIcon()V
.locals 5

.prologue
.line 239
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;

iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I

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

move-result-object v4

invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

move-result-object v2

check-cast v2, Ljava/lang/Integer;

And change to this:

.method private updateIcon()V
.locals [COLOR="Red"]6[/COLOR]

.prologue
[COLOR="Red"].line 239
const/4 v5, 0x0

.local v5, applyFilter:Z[/COLOR]
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mStateIcons:Ljava/util/HashMap;

iget v4, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mState:I

[COLOR="Red"]const/4 v1, 0x1

if-eq v4, v1, :cond_0

const/4 v5, 0x1

:cond_0[/COLOR]
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

move-result-object v4

invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

move-result-object v2

check-cast v2, Ljava/lang/Integer;

Now look for this line:

.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :cond_0

And change the value to this

.line 241
.local v1, icon:Landroid/graphics/Bitmap;
if-eqz v2, :[COLOR="Red"]cond_1[/COLOR]

Look for following line:

.line 249
:cond_0
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;

invoke-virtual {v3, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V

And change to following red content:

.line 249
:[COLOR="Red"]cond_1[/COLOR]
:goto_0
iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;

[COLOR="Red"]invoke-virtual {v3, v1, v5}[/COLOR], Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;[COLOR="Red"]Z[/COLOR])V

Look for following line and delete red line:

.line 250
[COLOR="Red"]iget-object v3, p0, Lcom/sonymobile/systemui/statusbar/tools/ToolsButton;->mIcon:Lcom/sonymobile/systemui/uicomponents/Image;[/COLOR]

invoke-virtual {v3}, Lcom/sonymobile/systemui/uicomponents/Image;->invalidate()V

Find this line:

.line 251
return-void

And add red line below:

.line 251
[COLOR="Red"].end local v5 #applyFilter:Z[/COLOR]
return-void

Look for following line:

.line 244
:catch_0
move-exception v0

And like usual, add following line:

.line 244
[COLOR="Red"].restart local v5 #applyFilter:Z[/COLOR]
:catch_0
move-exception v0

And save change you have made.

Now the last part is change the image.smali (com/sonymobile/systemui/uicomponents/)

Look for following line and add red line:

# instance fields
[COLOR="Red"].field protected mApplyFilter:Z[/COLOR]

.field protected mBitmap:Landroid/graphics/Bitmap;

.field protected final mMatrix:Landroid/graphics/Matrix;

.field protected mScalingX:F

.field protected mScalingY:F

Look for following line:

.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
.locals 1
.parameter "id"
.parameter "image"

.prologue
const/high16 v0, 0x3f80

And change to this:

.method public constructor <init>(Ljava/lang/String;Landroid/graphics/Bitmap;)V
[COLOR="Red"].locals 2[/COLOR]
.parameter "id"
.parameter "image"

.prologue
const/high16 v0, 0x3f80

[COLOR="Red"]const/4 v1, 0x0[/COLOR]

Look for this line:

.line 54
invoke-virtual {p0, p2}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;)V

Change the entire line to this:

.line 54
[COLOR="red"]invoke-virtual {p0, p2, v1}, Lcom/sonymobile/systemui/uicomponents/Image;->setBitmap(Landroid/graphics/Bitmap;Z)V[/COLOR]

Find this line:

.method public onDraw(Landroid/graphics/Canvas;FF)V
.locals 3
.parameter "canvas"
.parameter "x"
.parameter "y"

.prologue
const/high16 v1, 0x3f80

And change to this:

.method public onDraw(Landroid/graphics/Canvas;FF)V
[COLOR="red"].locals 5[/COLOR]
.parameter "canvas"
.parameter "x"
.parameter "y"

.prologue
const/high16 v1, 0x3f80

Look for this line:

.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;

if-eqz v0, :cond_1

...

.line 181
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;

if-eqz v0, [COLOR="red"]:cond_2[/COLOR]

Look for this code:

.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F

cmpl-float v0, v0, v1

if-nez v0, :cond_0

iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F

cmpl-float v0, v0, v1

if-eqz v0, :cond_2

Change to this:

.line 182
iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingX:F

cmpl-float v0, v0, v1

if-nez v0, :cond_0

iget v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mScalingY:F

cmpl-float v0, v0, v1

if-eqz v0, [COLOR="Red"]:cond_3[/COLOR]

Look this line:

.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;

iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;

iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;

Add red line below:

.line 185
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;

iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mMatrix:Landroid/graphics/Matrix;

iget-object v2, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;

[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z

const/4 v3, 0x0

if-eqz v4, :cond_1

invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;

move-result-object v3

:cond_1
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]

invoke-virtual {p1, v0, v1, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V

Now look for this line:

.line 190
:cond_1
:goto_0
return-void

And change to this value:

.line 190
[COLOR="Red"]:cond_2[/COLOR]
:goto_0
return-void

Look for following line:

.line 187
:cond_2
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;

iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;

invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

And change to this value/add red line:

.line 187
[COLOR="red"]:cond_3[/COLOR]
iget-object v0, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;

iget-object v1, p0, Lcom/sonymobile/systemui/uicomponents/Component;->mPaint:Landroid/graphics/Paint;

[COLOR="red"]iget-boolean v4, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z

const/4 v3, 0x0

if-eqz v4, :cond_4

invoke-static {}, Lcom/sonymobile/systemui/statusbar/tools/ThemeUtils;->getAccentColorFilter()Landroid/graphics/ColorFilter;

move-result-object v3

:cond_4
invoke-virtual {v1, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;[/COLOR]

invoke-virtual {p1, v0, p2, p3, v1}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

Look this line:

.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"

.prologue
const/4 v1, 0x0

And ...

.method public setBitmap(Landroid/graphics/Bitmap;Z)V
.locals 2
.parameter "bitmap"
[COLOR="red"].parameter "filter"[/COLOR]

.prologue
const/4 v1, 0x0

And LAST one:D

.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;

And... you know what I mean, right?

.line 73
:cond_0
:goto_0
iput-object p1, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mBitmap:Landroid/graphics/Bitmap;

[COLOR="red"]iput-boolean p2, p0, Lcom/sonymobile/systemui/uicomponents/Image;->mApplyFilter:Z[/COLOR]

Remember!

The png you want to colorize must be in white color.

This may take more than two hour. So, patient is require for this.

Good luck;)

End for now. Will post again if I find something useful.