[REF] Hide Status Bar Icons

RMarkwald

Senior Member
Aug 4, 2010
1,572
304
0
Middleton
I know it's early in the GingerSense ROM game, but has anyone figured out how to hide these icons? The layout in classes.dex is different, but I found that the SystemUI.apk may be what needs to be edited to hide these...? I know it's jumping the gun before things are stable and bugs worked out, and if I can figure it out somehow, I'll say something.
 

AdhvanIt

Senior Member
Aug 8, 2009
3,316
2,126
0
Grand Rapids, Mi.
I know it's early in the GingerSense ROM game, but has anyone figured out how to hide these icons? The layout in classes.dex is different, but I found that the SystemUI.apk may be what needs to be edited to hide these...? I know it's jumping the gun before things are stable and bugs worked out, and if I can figure it out somehow, I'll say something.
I've tried...
Statusbar FC's

You're looking in the right place though. SystemUI.apk is where all of the status bar .smali code is.

StatusBarPolicy.smali for battery, location, etc.

Clock.smali for clock.

If you can figure out how to hide them, that would be awesome.
 

RMarkwald

Senior Member
Aug 4, 2010
1,572
304
0
Middleton
I've tried...
Statusbar FC's

You're looking in the right place though. SystemUI.apk is where all of the status bar .smali code is.

StatusBarPolicy.smali for battery, location, etc.

Clock.smali for clock.

If you can figure out how to hide them, that would be awesome.
Yeah, FC's for me too. I tried a few different places in those .smali files, but no dice here either. I know it'll get sorted out, it's one of those things that'd be nice to have, but isn't a need.
 

RMarkwald

Senior Member
Aug 4, 2010
1,572
304
0
Middleton
Found the spot in SystemUI.apk to hide the clock from the status bar with no FC's! I am in NO means a developer, just a persistent Googler to find How To's and any information from other people. I found this at the MIUI-US forums for the EVO 4G, located here. All credit for this goes to BixBix78 and Andy Thompson.

I have tried it, and confirmed that there is no clock in NilsP's GingerSense 1.4.

It is in the SystemUI.apk, decompile classes.dex, com/android/systemui/statusbar/Clock.smali file. I used Notepad++, and used the above site as a guide to edit this. I found it at .line 97, but I searched for invoke-virtual {p0}, Lcom/android/systemui/statusbar/Clock;->updateClock()V.

Here is the edit, and what it looks like when I added the lines per the above mentioned link:

.line 97

const v1, 0x8

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


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

The lines in red are the added lines to hide the clock from the status bar.

Testing it now, just to make sure no ill side effects come of it, but so far no FC's and as you can see, no clock!

At this time, I am not going to create a flashable zip or anything for NilsP's ROM, as I know he wants to get things stable. I think for now, until Sense 2.1/3.0 ROMs become more stable, these edits probably should be considered "experimental" until then. I don't want to create issues from a bad/corrupt flash, and have things get crazy. I just wanted to share that it works, and for those who are adventurous, hope this helps!

Now to try to find out how to hide the annoying GPS icon with the slash!

:cool:
 

Attachments

Last edited:

AdhvanIt

Senior Member
Aug 8, 2009
3,316
2,126
0
Grand Rapids, Mi.
Found the spot in SystemUI.apk to hide the clock from the status bar with no FC's! I am in NO means a developer, just a persistent Googler to find How To's and any information from other people. I found this at the MIUI-US forums for the EVO 4G, located here. All credit for this goes to BixBix78 and Andy Thompson.

I have tried it, and confirmed that there is no clock in NilsP's GingerSense 1.4.

It is in the SystemUI.apk, decompile classes.dex, com/android/systemui/statusbar/Clock.smali file. I used Notepad++, and used the above site as a guide to edit this. I found it at .line 97, but I searched for invoke-virtual {p0}, Lcom/android/systemui/statusbar/Clock;->updateClock()V.

Here is the edit, and what it looks like when I added the lines per the above mentioned link:

.line 97

const v1, 0x8

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


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

The lines in red are the added lines to hide the clock from the status bar.

Testing it now, just to make sure no ill side effects come of it, but so far no FC's and as you can see, no clock!

At this time, I am not going to create a flashable zip or anything for NilsP's ROM, as I know he wants to get things stable. I think for now, until Sense 2.1/3.0 ROMs become more stable, these edits probably should be considered "experimental" until then. I don't want to create issues from a bad/corrupt flash, and have things get crazy. I just wanted to share that it works, and for those who are adventurous, hope this helps!

Now to try to find out how to hide the annoying GPS icon with the slash!

:cool:
Thanks a ton, man.
 

RMarkwald

Senior Member
Aug 4, 2010
1,572
304
0
Middleton
Thanks a ton, man.
No problem, now to try and find the hide Location icon mod...a bit tougher! I can confirm that the clock mod is safe for NilsP's 2.0 and Newtoroot's 1.4.1 GingerSense ROMs. I can't code, and appreciate everything everyone who can does for this community. Googling this is my very small part.
 

nitrate

Senior Member
Dec 24, 2008
179
21
0
Goerlitz
Hello there,

since i'm using a Custom-ROM on my HTC HD2 and use the phone in order with no SIM-card, there is always this "NO-SIM-CARD" icon in the status-/notification bar.

I almost tried modifying the services.jar file to make the "NO-SIM-CARD" icon disappear. I managed to disable the showing of the clock, battery and the phone-signal so far. But i can't get the "NO-SIM-CARD" icon to disappear.

Does anybody know how to do it? Any help would be appreciated.

Thanks in advance.
 

RMarkwald

Senior Member
Aug 4, 2010
1,572
304
0
Middleton
How to hide Location icon in status bar - 2.3 ROMs

Hey all,

In being completely annoying with the annoying Location icon in the status bar, I've Googled 'til my eyes hurt, and couldn't find anything that stated how to do it. I looked at the code, and looked, and after many attempts I was able to hide the icon.

I messaged Jermaine151 and NilsP just to run this by them, and they both confirmed it for me. I know that some of the developers out there know about this, but I don't develop ROMs at all, so I wanted to share the method I used after lots of trial/error.

Thanks to Jermaine151 and NilsP for confirming that my change was the correct one, since they've both incorporated it into their ROMs.

I've tested this on Jermaine151's In-Sensitive Minimalist v1.1, and I know that v1.2 will have it (not based on what I've done, as he was aware of it, and updated his post twenty minutes before I messaged him about my experiment, talk about timing!).



Here's one method of how it can be accomplished:

Use baksmali to decompile classes.dex that is in SystemUI.apk. In the output, browse to com/android/systemui/statusbar/policy to the HtcCdmaStatusBar.smali file. Open in Notepad++.

Search for “.method private updateMtGpsIcon()V”, you should get one hit shown below. It is at line 1002 (the is the line numbering in Notepad++ on left side):

.method private updateMtGpsIcon()V
.registers 8

.prologue
const/4 v5, 0x3

const/4 v4, 0x1

const/4 v3, 0x0

const-string v6, "gpsone"



Should read:

.method private updateMtGpsIcon()V
.registers 8

.prologue
const/4 v5, 0x3

const/4 v4, 0x0

const/4 v3, 0x0

const-string v6, "gpsone"


Recompile with smali to create a new classes.dex, and replace the classes.dex file in SystemUI.apk with the new one, ADB push to /system/app, reboot!
 

jermaine151

Senior Member
Jun 19, 2010
4,237
3,690
0
Columbus, Ohio
Hey all,

In being completely annoying with the annoying Location icon in the status bar, I've Googled 'til my eyes hurt, and couldn't find anything that stated how to do it. I looked at the code, and looked, and after many attempts I was able to hide the icon.

I messaged Jermaine151 and NilsP just to run this by them, and they both confirmed it for me. I know that some of the developers out there know about this, but I don't develop ROMs at all, so I wanted to share the method I used after lots of trial/error.

Thanks to Jermaine151 and NilsP for confirming that my change was the correct one, since they've both incorporated it into their ROMs.

I've tested this on Jermaine151's In-Sensitive Minimalist v1.1, and I know that v1.2 will have it (not based on what I've done, as he was aware of it, and updated his post twenty minutes before I messaged him about my experiment, talk about timing!).



Here's one method of how it can be accomplished:

Use baksmali to decompile classes.dex that is in SystemUI.apk. In the output, browse to com/android/systemui/statusbar/policy to the HtcCdmaStatusBar.smali file. Open in Notepad++.

Search for “.method private updateMtGpsIcon()V”, you should get one hit shown below. It is at line 1002 (the is the line numbering in Notepad++ on left side):

.method private updateMtGpsIcon()V
.registers 8

.prologue
const/4 v5, 0x3

const/4 v4, 0x1

const/4 v3, 0x0

const-string v6, "gpsone"



Should read:

.method private updateMtGpsIcon()V
.registers 8

.prologue
const/4 v5, 0x3

const/4 v4, 0x0

const/4 v3, 0x0

const-string v6, "gpsone"


Recompile with smali to create a new classes.dex, and replace the classes.dex file in SystemUI.apk with the new one, ADB push to /system/app, reboot!
Hey RMark! Good find and good timing. :D I'm attaching a patched SystemUI.apk (stock from the OTA leak) so that you can see how I accomplished the same outcome. Others may use at will...
 

Attachments

RMarkwald

Senior Member
Aug 4, 2010
1,572
304
0
Middleton
Hey RMark! Good find and good timing. :D I'm attaching a patched SystemUI.apk (stock from the OTA leak) so that you can see how I accomplished the same outcome. Others may use at will...
Sweet, the timing was pretty good,I must say! I created another thread for the 2.3 edit, so it wouldn't get lost in this one. I will give this a look! Thanks Jermaine!

Sent from my ADR6300 using XDA Premium App
 

pain-xda

New member
Mar 29, 2011
1
0
0
Jermaine,

I am new at this portion of the game. I am on a rooted Dinc updated to 2.3.4 and I want to update your version of the SystemUI.apk on my phone. I don't like the location icon always showing in the status bar and only want it on if my GPS is on. I tried just loading it as a normal app/apk file but it would not work. I am assuming it needs to be compiled into a zip file but this is where I am having troubles getting APK Manager to work on my system. Could you possibly provide a flashable .zip file. I am using the current version of ROM Manager and CWM 5.0.2.0. Any help would be appreciated. The only other thing I want to find for my stock ginger is the way to make the battery show the % amount of charge remaining. I updated that previously for Froyo but haven't figured it out for Gingerbread. Thanks for anything in advance.
 

RMarkwald

Senior Member
Aug 4, 2010
1,572
304
0
Middleton
Okay, I'll attach this so you can adb push it to test, but here's what I changed. It worked on the Desire HD ROM Jermaine had out, since the original method didn't work on that ROM.

In the same file from my prior post, search:

.line 279
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/HtcCdmaStatusBar;->mService:Landroid/app/StatusBarManager;

const-string v1, "gpsone"

const/4 v2, 0x1

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


Change const/4 v2, 0x1 so it looks like this:

const/4 v2, 0x0​

Let me know if it works. Like I said, attached the modified SystemUI.apk from the 4.08 leak, I modified both areas to hide the GPS icon, since the original "mod" doesn't affect anything when it's changed.
 

Attachments

  • Like
Reactions: chuckd840