[Q] Removing the clock from the status bar


Status
Not open for further replies.

Bloodflame

Members
Mar 18, 2011
91
16
Just like the title says. How can I do this? I would think it could be possible because there are other ROM's that have this option (CM, for example)

Edit: Since posting this and awaiting for approval, I searched Google. I found results pertaining to ROM's which use the HTC framework, and something called xUltimate, but I don't think that's quite what I need. I'm comfortable editing system files, but I just need assistance as to what I need to look for. Thanks :)
 
Removing Clock From Status Bar

Hi
You first need to decompile "System/App/SystemUI.apk"
Then you need to edit the following file :-

smali\com\android\systemui\statusbar\Clock.smali

In the Method enableAlternative look for the line :-

.line 211
invoke-virtual {p0}, Lcom/android/systemui/statusbar/Clock;->updateClock()V

Add the following code BEFORE the line above

const v1, 0x8

invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/Clock;->setVisibility(I)V

Save.
Recompile.
Push back to your phone.
Reboot.

CLOCK GONE!!!!!

Hope this helps?

Good Luck.
 
By any chance do you know how to remove battery icon via smali edits?

As with the clock you first need to decompile "System/App/SystemUI.apk"
Then you need to edit the following file :-

smali\com\android\systemui\statusbar\StatusBarPolicy.smali

In the Method updatebattery look for the line :-

invoke-virtual {v4, v5, v0, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V

Add the following code AFTER the line above

iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;

const/4 v1, 0x0

invoke-virtual {v0, v5, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V


Save.
Recompile.
Push back to your phone.
Reboot.

Please note this will only work for the Graphical and Percentage Battery Styles. If you have the Top-Bar style selected you'll still be able to see that.

Hope this works for you..
 
you rock! Cant wait to get rid of the battery 2nite. Thanks again Bix
As with the clock you first need to decompile "System/App/SystemUI.apk"
Then you need to edit the following file :-

smali\com\android\systemui\statusbar\StatusBarPolicy.smali

In the Method updatebattery look for the line :-

invoke-virtual {v4, v5, v0, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V

Add the following code AFTER the line above

iget-object v0, p0, Lcom/android/systemui/statusbar/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;

const/4 v1, 0x0

invoke-virtual {v0, v5, v1}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V


Save.
Recompile.
Push back to your phone.
Reboot.

Please note this will only work for the Graphical and Percentage Battery Styles. If you have the Top-Bar style selected you'll still be able to see that.

Hope this works for you..
 
Hi
You first need to decompile "System/App/SystemUI.apk"
Then you need to edit the following file :-

smali\com\android\systemui\statusbar\Clock.smali

In the Method enableAlternative look for the line :-

.line 211
invoke-virtual {p0}, Lcom/android/systemui/statusbar/Clock;->updateClock()V

Add the following code BEFORE the line above

const v1, 0x8

invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/Clock;->setVisibility(I)V

Save.
Recompile.
Push back to your phone.
Reboot.

CLOCK GONE!!!!!

Hope this helps?

Good Luck.

You have no idea how long I've waited for this, thank you so much!!!

Would you happen to know how to hide the USB debugging icon as well?
 
There is a way easier way to remove the clock! :)

Decompile SystemUI.apk and go to your 'Strings' file.. Somewere over there you see a line that says clock format, something like "HH:mm" remove this and it's gone :)

You can have it even better, you can remove the clock from the main statusbar, but when you open the notification pulldown thing you can still see it (even with the date) ;)

To remove the battery, go to the 'raw' map in SystemUI.apk and just make the .png with the battery icons transparant.

And for the USB debugging icon, it's located in framework-res.apk and can be easily removed with a custom theme file! :)

This is what i mean:

20110526_104033.jpg

20110526_104043.jpg
(click it ^^)
 
You have no idea how long I've waited for this, thank you so much!!!

Would you happen to know how to hide the USB debugging icon as well?


Jeez!!! You guys will have nothing left on the Notification Bar!!!

Hiding the USD Debugging Icon is more difficult than it used to be in Froyo.
It used to be a matter of finding the following line in NotificationManagerService.smali

iput v7, v6, Landroid/app/Notification;->icon:I

Just commenting out that line was enough to make the icon vanish. In Gingerbread however, if the above line is commented out it just defaults an alternative icon.

The best I can offer you is the following, which will replace the USB Debugging icon with a transparent image:-

You first need to decompile "system/framework/services.jar"
Then you need to edit the following file :-

\com\android\server\NotificationManagerService.smali

In the Method updateAdbNotification look for the line :-

const v7, 0x108054f

Replace with

const v7, 0x1080535

Save.
Recompile.
Push back to your phone.
Reboot.

Hope this helps
 
As i already said.. You can easily remove all the icons with a theme file :p

Why do it the difficult way? :p

I could send you a theme file but it will exceed the forums limit of 100kb :)

Good Luck! (Y)
 
could somebody make a flashable.zip to remove the clock? when i try to decompile the systemui.apk, apk manager always gives me an error. I was able to mod the eri.xml and get rid of the verizon text, but im having trouble with this.

If anybody can help, it would be greatly appreciated.
 
Hi
You first need to decompile "System/App/SystemUI.apk"
Then you need to edit the following file :-

smali\com\android\systemui\statusbar\Clock.smali

In the Method enableAlternative look for the line :-

.line 211
invoke-virtual {p0}, Lcom/android/systemui/statusbar/Clock;->updateClock()V

Add the following code BEFORE the line above

const v1, 0x8

invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/Clock;->setVisibility(I)V

Save.
Recompile.
Push back to your phone.
Reboot.

CLOCK GONE!!!!!

Hope this helps?

Good Luck.

Thanks! :D
 
Hi,
I'm trying to change the color of the Top-Bar battery, I can't find the png or xml file to do that. I think it should be in SystemUI.
I Google it I couldn't find anythings. I know this thread is more on hiding than modding but it seams to be in this apk.
Tks
 
Hi,
I'm trying to change the color of the Top-Bar battery, I can't find the png or xml file to do that. I think it should be in SystemUI.
I Google it I couldn't find anythings. I know this thread is more on hiding than modding but it seams to be in this apk.
Tks

Not sure about the top-bar battery, however the other battery images are located in /com.android.systemui/res/raw/

I don't think the top bar battery is an image, rather an XML value. I checked the theme_values.xml from /com.android.systemui/ folder and I found this:

Code:
<color name="status_bar_textColor_alternative">#66ffffff</color>
<color name="status_bar_battery_level_color">@color/status_bar_textColor_alternative</color>

looks promising, however those values don't reflect what I see in the theme.

Edit: Now that I think about it, I think that may be the text colour of the percentage if an image isn't present. I could be wrong, but that seems to make more sense. Sorry I can't help..
 
Not sure about the top-bar battery, however the other battery images are located in /com.android.systemui/res/raw/

I don't think the top bar battery is an image, rather an XML value. I checked the theme_values.xml from /com.android.systemui/ folder and I found this:

Code:
<color name="status_bar_textColor_alternative">#66ffffff</color>
<color name="status_bar_battery_level_color">@color/status_bar_textColor_alternative</color>

looks promising, however those values don't reflect what I see in the theme.

Edit: Now that I think about it, I think that may be the text colour of the percentage if an image isn't present. I could be wrong, but that seems to make more sense. Sorry I can't help..

Thanks I'll try we'll see how it goes. Considering the number of post without solution on this, I just need to learn chinese and programming to become an official MIUI dev. to know how they did it...
 
Just like the title says. How can I do this? I would think it could be possible because there are other ROM's that have this option (CM, for example)

Edit: Since posting this and awaiting for approval, I searched Google. I found results pertaining to ROM's which use the HTC framework, and something called xUltimate, but I don't think that's quite what I need. I'm comfortable editing system files, but I just need assistance as to what I need to look for. Thanks :)

You Rock. Point.
 
There is a way easier way to remove the clock! :)

Decompile SystemUI.apk and go to your 'Strings' file.. Somewere over there you see a line that says clock format, something like "HH:mm" remove this and it's gone :)

You can have it even better, you can remove the clock from the main statusbar, but when you open the notification pulldown thing you can still see it (even with the date) ;)

To remove the battery, go to the 'raw' map in SystemUI.apk and just make the .png with the battery icons transparant.

And for the USB debugging icon, it's located in framework-res.apk and can be easily removed with a custom theme file! :)

How do you hide the clock in the main notification bar but keep it in the alternate (when pulled down) notification bar?

I've edited the strings file as you stated and removed the h:mm from the "status_bar_time_format_12" line and it effectively hides the clock in the notification bar while in 12 hour time mode; but the clock is also hidden in the alternate (again, when pulled down) notification bar.
 
Doh!!! I figured it out... Just have to include the time code in the "status_bar_date_format" line. Too bad they changed the position of the date in the alternate notification bar. Is there any way to move the date back to the far right instead of the far left as it is in 1.6.10?
 
Doh!!! I figured it out... Just have to include the time code in the "status_bar_date_format" line. Too bad they changed the position of the date in the alternate notification bar. Is there any way to move the date back to the far right instead of the far left as it is in 1.6.10?

To move the Date on the Alternate Notification Bar, Decompile SytemUI.apk . Open "res/layout/Status_Bar.xml". Move the Dateview line (below) to be just before the line that references the Clock.

<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:id="@id/date" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
 
Thanks a lot Andy.

It works just as intended with only one undesirable side effect; it also moves the lock screen date position. I'll just place it to the left of the signal icons to make it look somewhat centered on the lock screen notification bar and the alternate notification bar.

It was seriously bothering me having the date and clock on the far left of the notification bar after I previously modded systemui.apk to get rid of the clock on the regular notification bar but keep it on the alternate notification bar. And now that we have notification icons individually display on the lock screen, it was an eye sore having the date to the left of the notification icons anyways.

Again, thank you; you seriously rock!
 
Hi
You first need to decompile "System/App/SystemUI.apk"
Then you need to edit the following file :-

smali\com\android\systemui\statusbar\Clock.smali

In the Method enableAlternative look for the line :-

.line 211
invoke-virtual {p0}, Lcom/android/systemui/statusbar/Clock;->updateClock()V

Add the following code BEFORE the line above

const v1, 0x8

invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/Clock;->setVisibility(I)V

Save.
Recompile.
Push back to your phone.
Reboot.

CLOCK GONE!!!!!

Hope this helps?

Good Luck.

hi im new to this. can you help me how to decompile apk and how to edit it? thanks!
 
hi im new to this. can you help me how to decompile apk and how to edit it? thanks!

Search Google for APKMANGER. It's a bit tricky to set up but once it's up and running it makes decompiling/compiling APK's really easy. Plus there's great support for it over on the XDA forum..

Good luck!! If it seems too difficult I've just released a MOD that will add hiding and unhiding options to the settings menu. You might want to give that ago instead.. :eek:)
 
Search Google for APKMANGER. It's a bit tricky to set up but once it's up and running it makes decompiling/compiling APK's really easy. Plus there's great support for it over on the XDA forum..

Good luck!! If it seems too difficult I've just released a MOD that will add hiding and unhiding options to the settings menu. You might want to give that ago instead.. :eek:)

what is that MOD you got bro? can you share it? and is it possible to also hide the date from the status bar? because i don't like having two dates, from the lockscreen and from the status bar.. thank you once again! :)
 
what is that MOD you got bro? can you share it? and is it possible to also hide the date from the status bar? because i don't like having two dates, from the lockscreen and from the status bar.. thank you once again! :)

The MOD is with the Moderator waiting for approval. Hopefully it'll be approved soon.
It will let you hide the Clock, Battery and Debugging icon but not the date I'm afraid. It might be easier to remove the date from the Lockscreen, the new ones seem to be very easy to change..
 
The MOD is with the Moderator waiting for approval. Hopefully it'll be approved soon.
It will let you hide the Clock, Battery and Debugging icon but not the date I'm afraid. It might be easier to remove the date from the Lockscreen, the new ones seem to be very easy to change..

oh ok thanks Andy! can you pm me if your MOD had already been approved?. From the lockscreen that you're talking about how do you remove the date? sorry man.. I'm still new to these kinds..
 
oh ok thanks Andy! can you pm me if your MOD had already been approved?. From the lockscreen that you're talking about how do you remove the date? sorry man.. I'm still new to these kinds..

Still waiting for approval, but I'll let you know.
As for editing the lockscreen. Each lockscreen .mtz file contains a manifest.xml file. You just open that with a text editor and remove the stuff you don't need. Check out the Lockscreen Theming forum there's some great Lockscreens in there.
Give it a go. If you get stuck let me know, I'll help if I can..
 
Status
Not open for further replies.