[Android Themes] prithvee:
Hello everyone ,

this is my first tutorial on MODS like these.. so plz correct me if anything is wrong :good:

for now, this is tested on gingerbread only .. check out the demo video here (pre-release version but works similarly) : HERE

Ok then, lets get started..

Step 1. Decompile your SystemUI.apk.

For Gingerbread :

Step 2. Goto SystemUI\smali\com\android\systemui\statusbar and open StatusBarView.smali in an editor.

Step 3. find this line:

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

for me it was something like this :

# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
[COLOR="Red"].locals 0
.parameter "context"
.parameter "attrs"

.prologue
.line 77
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

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

Step 4. Replace the whole code(shown in red above) inside the method with the code below :

NOTE : WHILE WRITING THE CODE IN YOUR .smali , REMOVE THE COMMENTS HIGHLIGHTED IN RED COLOR

.locals 3
.parameter "context"
.parameter "attrs"

.prologue
.line 15
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

.line 16
const-string v2, "#FF000000" [COLOR="Red"]// THIS IS THE DEFAULT COLOR FOR THE STATUS BAR WHEN THE COLOR CHANGER IS NOT ACTIVATED. YOU CAN CHANGE IT AS YOU WISH [/COLOR]

invoke-static {v2}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v2

invoke-virtual {p0, v2}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

.line 17
new-instance v1, Landroid/content/IntentFilter;

const-string v2, "com.prithvee.Bc"

invoke-direct {v1, v2}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

.line 18
.local v1, fiter:Landroid/content/IntentFilter;
new-instance v0, Lcom/android/systemui/statusbar/StatusBarView$1;

invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/StatusBarView$1;-><init>(Lcom/android/systemui/statusbar/StatusBarView;)V

.line 26
.local v0, Brc:Landroid/content/BroadcastReceiver;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/StatusBarView;->getContext()Landroid/content/Context;

move-result-object v2

invoke-virtual {v2, v0, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

.line 28
return-void

Step 5. Find this :

[COLOR="Red"]# virtual methods[/COLOR]

Step 6. Paste this below :

[COLOR="Red"]# virtual methods[/COLOR]
.method updatecolor(Ljava/lang/String;)V
.locals 1
.parameter "apn"

.prologue
.line 34
:try_start_0
const-string v0, "com.android.contacts"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_0

.line 35
const-string v0, "#ff185984"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

.line 91
:goto_0
return-void

.line 38
:cond_0
const-string v0, "com.android.settings"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_1

.line 40
const-string v0, "#FF000000"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto :goto_0

.line 88
:catch_0
move-exception v0

goto :goto_0

.line 42
:cond_1
const-string v0, "com.android.mms"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_2

.line 44
const-string v0, "#ff394963"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto :goto_0

.line 46
:cond_2
const-string v0, "com.opera.mini.android.Browser"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_3

.line 48
const-string v0, "#ff9d372c"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto :goto_0

.line 50
:cond_3
const-string v0, "com.tencent.mm"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_4

.line 52
const-string v0, "#ff3c3c3c"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto :goto_0

.line 54
:cond_4
const-string v0, "com.google.android.finsky"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_5

.line 56
const-string v0, "#ff666666"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto :goto_0

.line 58
:cond_5
const-string v0, "com.estrongs.android.pop"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-nez v0, :cond_6

const-string v0, "com.estrongs.android"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_7

.line 60
:cond_6
const-string v0, "#ff66cae5"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto :goto_0

.line 62
:cond_7
const-string v0, "com.google.android.gms"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_8

.line 64
const-string v0, "#ff96aa39"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto/16 :goto_0

.line 66
:cond_8
const-string v0, "com.facebook.katana"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_9

.line 68
const-string v0, "#ff5978b0"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto/16 :goto_0

.line 70
:cond_9
const-string v0, "com.whatsapp"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_a

.line 72
const-string v0, "#ff2f4444"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto/16 :goto_0

.line 74
:cond_a
const-string v0, "com.mgeek.android.DolphinBrowser.Browser"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_b

.line 76
const-string v0, "#ff389d00"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto/16 :goto_0

.line 79
:cond_b
const-string v0, "com.uc.browser.en"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_c

.line 81
const-string v0, "#ff31639c"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V

goto/16 :goto_0

.line 85
:cond_c
const-string v0, "#FF000000"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/StatusBarView;->setBackgroundColor(I)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

goto/16 :goto_0
.end method

Step 7. Save and close this file.

Step 8. Download StatusBarView$1.rar extract it from attachments and place StatusBarView$1.smali in SystemUI\smali\com\android\systemui\statusbar

For Jelly Bean (not tested):

Step 2. Goto SystemUI\smali\com\android\systemui\statusbar\phone and open PhoneStatusBarView.smali in an editor.

Step 3. find this line:

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

for me it was something like this :

# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 2
.parameter "context"
.parameter "attrs"

.prologue
const/4 v0, 0x0

.line 56
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

.line 48
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNightMode:Z

.line 49
iput v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mStartAlpha:I

iput v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mEndAlpha:I

.line 50
const-wide/16 v0, 0x0

iput-wide v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mEndTime:J

.line 52
new-instance v0, Landroid/graphics/Rect;

invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mButtonBounds:Landroid/graphics/Rect;

.line 53
const/4 v0, 0x1

iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mCapturingEvents:Z

.line 57
return-void
.end method

Step 4. Add the whole code(shown in green below) inside the method properly :

NOTE : WHILE WRITING THE CODE IN YOUR .smali , REMOVE THE COMMENTS HIGHLIGHTED IN RED COLOR

# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals [COLOR="SeaGreen"]5[/COLOR] [COLOR="Red"]//ADD 3 TO THE EXISTING NUMBER ACCORDING TO YOUR CODE [/COLOR]
.parameter "context"
.parameter "attrs"

.prologue
[COLOR="SeaGreen"].line 15
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

.line 16
const-string v2, "#FF000000" [COLOR="Red"]// THIS IS THE DEFAULT COLOR FOR THE STATUS BAR WHEN THE COLOR CHANGER IS NOT ACTIVATED. YOU CAN CHANGE IT AS YOU WISH [/COLOR]

invoke-static {v2}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v2

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

.line 17
new-instance v1, Landroid/content/IntentFilter;

const-string v2, "com.prithvee.Bc"

invoke-direct {v1, v2}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

.line 18
.local v1, fiter:Landroid/content/IntentFilter;
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;

invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V

.line 26
.local v0, Brc:Landroid/content/BroadcastReceiver;
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getContext()Landroid/content/Context;

move-result-object v2

invoke-virtual {v2, v0, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;[/COLOR]

const/4 v0, 0x0

.line 56
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

.line 48
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNightMode:Z

.line 49
iput v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mStartAlpha:I

iput v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mEndAlpha:I

.line 50
const-wide/16 v0, 0x0

iput-wide v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mEndTime:J

.line 52
new-instance v0, Landroid/graphics/Rect;

invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mButtonBounds:Landroid/graphics/Rect;

.line 53
const/4 v0, 0x1

iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mCapturingEvents:Z

.line 57
return-void
.end method

Step 5. Find this :

[COLOR="Red"]# virtual methods[/COLOR]

Step 6. Paste this below :

[COLOR="Red"]# virtual methods[/COLOR]
.method updatecolor(Ljava/lang/String;)V
.locals 1
.parameter "apn"

.prologue
.line 34
:try_start_0
const-string v0, "com.android.contacts"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_0

.line 35
const-string v0, "#ff185984"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

.line 91
:goto_0
return-void

.line 38
:cond_0
const-string v0, "com.android.settings"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_1

.line 40
const-string v0, "#FF000000"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto :goto_0

.line 88
:catch_0
move-exception v0

goto :goto_0

.line 42
:cond_1
const-string v0, "com.android.mms"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_2

.line 44
const-string v0, "#ff394963"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto :goto_0

.line 46
:cond_2
const-string v0, "com.opera.mini.android.Browser"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_3

.line 48
const-string v0, "#ff9d372c"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto :goto_0

.line 50
:cond_3
const-string v0, "com.tencent.mm"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_4

.line 52
const-string v0, "#ff3c3c3c"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto :goto_0

.line 54
:cond_4
const-string v0, "com.google.android.finsky"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_5

.line 56
const-string v0, "#ff666666"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto :goto_0

.line 58
:cond_5
const-string v0, "com.estrongs.android.pop"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-nez v0, :cond_6

const-string v0, "com.estrongs.android"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_7

.line 60
:cond_6
const-string v0, "#ff66cae5"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto :goto_0

.line 62
:cond_7
const-string v0, "com.google.android.gms"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_8

.line 64
const-string v0, "#ff96aa39"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto/16 :goto_0

.line 66
:cond_8
const-string v0, "com.facebook.katana"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_9

.line 68
const-string v0, "#ff5978b0"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto/16 :goto_0

.line 70
:cond_9
const-string v0, "com.whatsapp"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_a

.line 72
const-string v0, "#ff2f4444"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto/16 :goto_0

.line 74
:cond_a
const-string v0, "com.mgeek.android.DolphinBrowser.Browser"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_b

.line 76
const-string v0, "#ff389d00"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto/16 :goto_0

.line 79
:cond_b
const-string v0, "com.uc.browser.en"

invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v0

if-eqz v0, :cond_c

.line 81
const-string v0, "#ff31639c"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

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

goto/16 :goto_0

.line 85
:cond_c
const-string v0, "#FF000000"

invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

move-result v0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->setBackgroundColor(I)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

goto/16 :goto_0
.end method

Step 7. Save and close this file.

Step 8. Download PhoneStatusBarView$1.rar extract it from attachments and place PhoneStatusBarView$1.smali in SystemUI\smali\com\android\systemui\statusbar\phone\

Step 9. Thats it!!! Now re-compile the apk and install / push it into your device .

Step 10. Download the StatusBarColors.apk from the attachments and install it. Open it and tap on Start button to start the magic ;)

if u have done till this step successfully then these apps can make change in status bar color :

whatsapp

fb

wechat

es file explorer

message

contacts

uc browser

Dolphin Browser

in the next post i'll tell how to add more apps and colors

NOTE:

:good: When you use the StatusBarColors.apk in your ROM or theme plz do not change the creator name.. it hurts when the only mark denoting all of the hard work is just removed by just a single name change

:good: If u liked this tutorial hit the thanks button.

:good: Feel free to integrate this in ur ROM and give proper credits :cool: