yashsingh1/xdaforums huggingface dataset:
[EVO 4G Themes and Apps] 6uPMAH:
It should be something similar to 2.2. I have looked at the StatusBarPolicy.smali file. It does not have the string described in the original post, but it DOES have this:

.line 720

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

const-string v4, "gps"

const v5, 0x7f0200a9

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

.line 721

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

const-string v4, "gps"

invoke-virtual {v3, v4, v7}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V

Either one or both of these need to be altered... Give 'em a try.

EDIT: Maybe changing "invoke-virtual" v4 to v6 in both places will do the trick, similar to OP...
[EVO 4G Themes and Apps] 6uPMAH:
This is confirmed working on the new 2.3.3 update. The only catch is the StatusBarPolicy.smali is now located in SystemUI.apk\com\android\systemui\statusbar\policy NOT in services.jar
[EVO 4G Themes and Apps] lithid-cm:
This doesn't work, Also tried changing some files in policy folder as well no go.
[EVO 4G Themes and Apps] nfiniti9:
I believe Aamikam knows how as his rom doesn't have a location icon. I spent hours playing with the files to no luck. I believe its no longer a simple change, it seems they changed the way the icon is used.
[EVO 4G Themes and Apps] Mustang02:
What's the ROM name?
[EVO 4G Themes and Apps] datajosh:
Well, it looks like it's probably in that Smali but the line definitely changed. I thought it might be

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

Since it appears twice and is one of only two places that setIconVisibility appears in the file but either that's not it or I screwed up when I tried to put it on my phone because my entire status bar disappeared after that edit. Definitely would like to find this edit as well as the one for removing AM/PM on 2.3 though.
[EVO 4G Themes and Apps] Mustang02:
I've looked in StatusBarPolicy.smali without any success as well.
[EVO 4G Themes and Apps] SteelH:
I just had to LOL @ that! I did the same thing. Tried everything and always made it completely vanish!
[EVO 4G Themes and Apps] AdhvanIt:
Yeah... Logcat shows statusbar force closing when that happens.
[EVO 4G Themes and Apps] SteelH:
I tried editing that 'v4' to 0,1,2,3,5,6,7,8,9 and every time status bar disappears completely. They must have changed something significantly with GB update.

Shame JsChiSurf retired from modding. He could figure this out in about 2 seconds I'm sure.
[EVO 4G Themes and Apps] twin121:
any help on hiding the clock with the newest virus roms with android 2.3.3 and sense 2.1?
[EVO 4G Themes and Apps] SteelH:
Read the OP. #7
[EVO 4G Themes and Apps] twin121:
Then read the post it leads to.... For aosp ROM miui
[EVO 4G Themes and Apps] nitrate:
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.
[EVO 4G Themes and Apps] SteelH:
I would recommend asking about this in the HD2 forum rather than the EVO 4G forum.
[EVO 4G Themes and Apps] morfinx:
This doesn't seem to to work for me. After I flashed the zip, the phone gets stuck at the first white "HTC EVO 4G" boot screen and doesn't progress any further. Any ideas?

I'm using Fresh 4.2.0.0.
[EVO 4G Themes and Apps] SteelH:
You've already answered your own question, you are using Fresh 4.2. Fresh 4.2 is clearly a GB 2.3.3 based ROM. You are trying to flash a framework mod made for Froyo onto GB. Nothing good ever comes of such things.
[EVO 4G Themes and Apps] morfinx:
Ah thanks, that makes sense. Is there another way to do it then?
[EVO 4G Themes and Apps] SteelH:
Use my ROM?
[EVO 4G Themes and Apps] EindhovenOne:
I used the GingerScript tool to pull and decompile everything but when I open the Clock.smali to try to hide the clock, I find that line nowhere and I do not know why. I am running Synergy RC2 ROM. Any help would be appreciated.
[EVO 4G Themes and Apps] schmittx:
I'm trying to remove USB debugging icon but I can't find the code in "NotificationManagerService.smali"...anyone else have this problem or am I just stupid?...

nevermind, I found it in the deodexed rom...I was trying to do this via an odexed assuming that decompiling services.odex produced the same result as decompiling classes.dex within services.jar...but it doesn't
[EVO 4G Themes and Apps] wes342:
Check systemui.apk a bunch of stuff got moved around in gingerbread.
[EVO 4G Themes and Apps] SteelH:
Thread closed.
[EVO 4G Themes and Apps] bigwill3:
this worked great to remove the blasted gps icon. thank you!
[EVO 4G Themes and Apps] SteelH:
Glad you like it.
[EVO 4G Themes and Apps] webby_s:
Interesting, I gave up, dang, now I will have to try it again since you say that... I figured it was too long so I pulled the battery, booted into recovery and flashed my nandroid backup. I wasn't nervous since I had just backed up but now I know I may have to just be a little more patient.

Does it always then boot up SLOW?
[EVO 4G Themes and Apps] ydnandy:
I also had a nandroid backup... maybe nervous wasnt the best word, but you know what i mean... I was sitting there watching mario run across my screen for a few minutes.

No, it was just that first boot after i made the changes. I rebooted a second time once it started up and the startup time was back to normal.
[EVO 4G Themes and Apps] webby_s:
k I've been waiting on the "htc EVO 4G" white screen now for about 20 minutes. I think that's too long, right :rolleyes: ? Looks like I'll have to nandroid and check my files.
[EVO 4G Themes and Apps] ydnandy:
yeah, thats too long... And mine took a long time on my boot animation, not the htc evo splash screen.

____________
[EVO 4G Themes and Apps] webby_s:
K I am now trying it with the combination of your instructions and I now am on my boot animation. So here's hoping I succeed!

Success!!! Thanks all!!!
[EVO 4G Themes and Apps] martijua:
SteelH,

thanks for the information that you posted here.

Can you add information on how to remove the battery icon from the status bar?
[EVO 4G Themes and Apps] SteelH:
That has already been done HERE.

But I'll add directions to op as well so you can do your own.
[EVO 4G Themes and Apps] martijua:
Cool....Thanks for sharing. -DannyM
[EVO 4G Themes and Apps] joey3002:
how do I remove the AM/PM on the clock? I think I am mature enough to know when its AM or PM :)

thanks in advance
[EVO 4G Themes and Apps] xak944:
This sounds like you want to change the format of the clock's display, not like removing items from the taskbar as this thread describes.

How about using the 24-hour format? That'll save the space used by the AM/PM, plus you'll still know what time of day it really is. ;)
[EVO 4G Themes and Apps] joey3002:
lol, thats thinking outside the box.. thanks its what I just did :)
[EVO 4G Themes and Apps] URABUS0924:
Does this remove both the on and off icons for the GPS? I would like to keep the on icon but remove the off one, is that possible? Thanks.
[EVO 4G Themes and Apps] mattykinsx:
Everything was going good til

6. Recompile the .dex file: java -Xmx512M -jar smali.jar outputdir/ -o classes.dex

I keep getting Unexpected Top-level exception:

outputdir not a file

etc

etc

Everything is right..so I don't see what the issue is..
[EVO 4G Themes and Apps] joey3002:
Had to be a typo or something when u saved the file.. I followed that last night and am now without the stupid gps icon.. And am happy

Not sure why anyone would want the clock or battery gone.

I would not mind dropping the reception bar..
[EVO 4G Themes and Apps] SteelH:
Well, you need to mod two lines of code for the GPS MOD. So, MOD only one, test it out and see which icon (on or off) disappears. It's one or the other, so yes you can accomplish what you want.

I do because I use battery droid pro widget.
[EVO 4G Themes and Apps] mattykinsx:
If someone can explain what I'm doing wrong, I'd appreciate it... I have the most updated smali ... I've triple checked the changes in the HtcCdmaStatusBar.smali file...

Everything is correct as far as I can see.

Thanks.
[EVO 4G Themes and Apps] joey3002:
outputdir should be where you are outputting the file..
[EVO 4G Themes and Apps] SteelH:
LOL. Good point.
[EVO 4G Themes and Apps] mattykinsx:
http://xdaforums.com/showpost.php?p=8124681&postcount=11

I'm just following instructions?

...

Upon adjustment of the command line to:

java -Xmx512M -jar smali.jar classes.dex -o outputdir/

It worked.

My only faults were following directions to the letter, and coming on here and assuming I could get assistance without attitude/insult.
[EVO 4G Themes and Apps] SteelH:
No one is giving you attitude.

But for the record, the OP clearly states "This reference assumes that you already know how to recompile a framework file using smali/baksmali."
[EVO 4G Themes and Apps] mattykinsx:
Following that I would never learn anything I just don't know how appropriate it is to insult someone for reading directions and failing because they are written incorrectly.

Sorry, I was in a pissy mood that day.

Thanks for posting this and the hint towards how to fix the problem.
[EVO 4G Themes and Apps] brandontowey:
can I copy the. jar to my sdcard with root explorer then to my computer, edit and reverse to get it back on my phone? i've never used adb and don't want to get into an ocd cram session at the moment. either way, thanks for the instructions.

Sent from my Evo, and it said you got a purty mouth.
[EVO 4G Themes and Apps] SteelH:
You can use root explorer to move it to your sdcrad then pc, or just use root explorer to email it to your pc. However, you can swap out services.jar while the phone is loaded in the Android OS. You need to be in recovery mode, and thus use ADB.
[EVO 4G Themes and Apps] brandontowey:
:Sigh:, looks like I'm not getting to sleep before 4. Thanks for the heads up.
[EVO 4G Themes and Apps] xak944:
Glad you got it working. Did you not see my instructions on page #2? Or were they not detailed or windoze-ie enough?
[EVO 4G Themes and Apps] brandontowey:
I did, and it definitely helped but I had no prior ADB experience so I did a guide from start to finish, including all the info I needed to find to get it done. Definitely referred to yours, too, just didn't mention it. Sorry.
[EVO 4G Themes and Apps] brandontowey:
Edit - got it working. Had to adb remount with phone in Android, push, then reboot.
[EVO 4G Themes and Apps] kylegeisler:
Great work!! glad to hear of so much success

this may come off as a bit of a newb question, If so, I am guilty! :) Ive read this and all linked threads in their entirety and this seems pretty straight forward.

This process also seems pretty generic, is it? Or is this specific to the Evo and its rom variants? ie Can i try this on my galaxyS captivate? ...rephrase... should it work on my galaxyS captivate? :) I'm running cognition 2.2beta6 rom.

thanks in advance.

.kg.
[EVO 4G Themes and Apps] SteelH:
This mod was originally done on a different device than the EVO, I tested it out on the EVO then shared my results here. So......In theory it should work on the galaxy. My best advice to you is, #1 make a nandroid backup, #2 try it out and let the XDA forums know your results.
[EVO 4G Themes and Apps] kylegeisler:
Thanks.

I'll try this tonight when I get back home.

Not to get off topic butt.... Nandroid vs. titanium. Nandroid backs up the whole rom where titanium just does apps and data?

If I knows I can recover my rom I'm guessing it doesn't matter that much?
[EVO 4G Themes and Apps] teshxx:
does any one know how to remove the GPS icon ONLY when you are not connected to it rather removing all GPS notifications ?
[EVO 4G Themes and Apps] SteelH:
Only change one of the lines, not both. On is for off, one is for on. Not sure which is which so you'll have to experiment.
[EVO 4G Themes and Apps] teshxx:
i figured. i was being lazy n hoping someone already knew which one was which lol..will report in few mins
[EVO 4G Themes and Apps] teshxx:
ok there are two instances where "invoke-virtual {v0, v1, v4}" takes place.

line 131 and line 142. when i change "v4" to "v6" on line 131 i lost gps icon for both on n off. then i changed it back to v4 and change line 142 "v4" to "v6" and nothing happened. i test gps functions if it worked and if it locked on to a satellite on both instances. and it did work.

to make it short i dont think u need to change line 142 unless i am missing something.

unfortunately, you cant retain gps on icon and hide gps off icon, which was what i was looking for. if i am wrong and there is some way i can attain that please correct me.

thank you
[EVO 4G Themes and Apps] brandontowey:
Trying To Remove Headset Icon

I'd like to remove the headset icon from the notification bar and I have no idea how to edit the entries concerning the icon. Someone pointed me to these 4 entries. I'd appreciate any help, I don't understand code at all.

.line 342
:pswitch_4
iget-object v0, p0, Lcom/android/server/status/HtcCdmaStatusBar;->mMtGpsIconData:Lcom/android/server/status/IconData;

const v1, 0x20205e2

iput v1, v0, Lcom/android/server/status/IconData;->iconId:I

goto :goto_3

.line 348
:pswitch_c
iget-object v0, p0, Lcom/android/server/status/HtcCdmaStatusBar;->mMtGpsIconData:Lcom/android/server/status/IconData;

const v1, 0x20205dc

iput v1, v0, Lcom/android/server/status/IconData;->iconId:I

goto :goto_3

.line 355
:pswitch_14
iget-object v0, p0, Lcom/android/server/status/HtcCdmaStatusBar;->mMtGpsIconData:Lcom/android/server/status/IconData;

const v1, 0x20205de

iput v1, v0, Lcom/android/server/status/IconData;->iconId:I

goto :goto_3

.line 362
:pswitch_1c
iget-object v0, p0, Lcom/android/server/status/HtcCdmaStatusBar;->mMtGpsIconData:Lcom/android/server/status/IconData;

const v1, 0x20205e0

iput v1, v0, Lcom/android/server/status/IconData;->iconId:I
[EVO 4G Themes and Apps] JsChiSurf:
This is something I have looked at on and off for a while, even after I did the complete removal for the Hero last year. I just had a chance to look at this again today and believe I have a solution for disabling the ''reticle" from displaying all together, when GPS is OFF, but do display when GPS in on, so, essentially, conditionally displaying the reticle, so that it is NOT there, taking up space, when GPS is off, since you obviously don't have a gps lock if you have the feature disabled (seems stupid they did this in the first place).

I have a completely hacked up services.jar file, so if someone who is interested in testing this for me, to verify it is working as intended, please post up your own services.jar file, I will edit and post for you to flash, and once confirmed, we'll take it from there for further instructions.
[EVO 4G Themes and Apps] brandontowey:
Here's My Service.jar, Would love to Have GPS On Icon

This is my services.jar with transparent notification background enabled and both instances of the GPS edited to v6. It's from VaelPak's 2.2 Froyo ROM. Thanks for this, hope it works.
[EVO 4G Themes and Apps] JsChiSurf:
I'll post up a flashable zip shortly. This is the key, since, if the previous mod was done for removing the reticle wholesale, it first has to be undone.
[EVO 4G Themes and Apps] JsChiSurf:
Actually, you only had the first instance of the applicable GPS set location set to v6 :-)

Nonetheless, attached is a flashable zip which "should" NOT display the "no lock reticle" when GPS is turned off, but display the "gps lock reticle" when GPS is turned on.

So, to test, verify by disabling GPS, whereby you should not see either the GPS animation icon or the reticle, then, enable GPS, where you should temporarily see the animation, followed by the reticle showing GPS lock obtained.
[EVO 4G Themes and Apps] joey3002:
What about the usb debugging icon and the "charge only" icon... anyone know how to remove those?

thanks
[EVO 4G Themes and Apps] JsChiSurf:
I'm pretty sure I've seen those posted somewhere (at least debugging, not sure what you mean by charge only). If not, can't imagine it would be too hard to pull off.
[EVO 4G Themes and Apps] JsChiSurf:
Looks like Brandon disappeared on me. Anyone else running the same rom referenced above who can test?
[EVO 4G Themes and Apps] brandontowey:
EDIT - Sorry, didn't get the email about any new posts and wanted to flash and make sure it was good before I posted.

I uploaded a zip of Caulkin's Disable Debugging Notification Mod below. You have to flash it in recovery. Do a Nand backup, I take no credit for this or responsibility if something happens.

Works a charm. I just flashed it so no idea if anything else was affected, but it booted fine, all other icons are present, etc. Thanks, really appreciate it.
[EVO 4G Themes and Apps] joey3002:
thanks brandon.. testing now.. after backup..
[EVO 4G Themes and Apps] joey3002:
I might as well ask... i did the services mod for the gps off.. but does anyone have a flashable mod to turn the gps off (setting v6 for both entries)?

thanks again
[EVO 4G Themes and Apps] brandontowey:
Seems the edited services.jar I flashed is causing my contacts to force close after entering new contact name and hitting save. Nandroid restored, checked to see if I could create a new contact which worked, flashed the services.jar you uploaded then got the force close again when trying to add a contact.

Sent from my Evo, who mentioned that you got a purty mouth, uh-huh.
[EVO 4G Themes and Apps] nukedukem:
I would like to disable the USB debugging notifications, but I can't flash caulkin's zip without destroying all the other edits I've made. I can't find a how-to anywhere on doing this. I tried comparing the decompiled classes.dex of caulkin's fix vs stock OTA and there are a ton of differences that I'm pretty sure have nothing do with the USB so I can't just look at what was changed and do it to my services.jar. Does anyone know how to do this?
[EVO 4G Themes and Apps] JsChiSurf:
I think you have other factors at play. I just tested creating a new contact as well as editing an existing both on the phone and stored in gmail, and both worked fine. If you want, post up a logcat snippet when the error occurs and I can take s closer look to see what the problem may be. But, as mentioned, I don't think this simple mod is impacting that in any way.

Sent from my HTC Evo
[EVO 4G Themes and Apps] JsChiSurf:
Remove USB Debugging Icon

Took a look at this, since, most probably don't want to end up undoing any other services.jar modification they may have applied via this thread or others.

After some digging, and code analyzing, a quick and simple way to remove the usb debugging notifications is to comment out a single line.

So, after decompiling services.jar, navigate to:

com\android\server\NotificationManagerService.smali

Find the following line:

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

And simply comment it out:

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

That's it. Recompile, push/flash to your phone, etc, and you should be good to go.
[EVO 4G Themes and Apps] nukedukem:
Wow. Works perfect, thank you!!
[EVO 4G Themes and Apps] JsChiSurf:
Sure thing. I find the debugging icon annoying as well, so I was happy to search it out for removal.
[EVO 4G Themes and Apps] brandontowey:
Will do. Post back in 30 or so.
[EVO 4G Themes and Apps] brandontowey:
CatLog

Here's my log. I gotta be honest, not sure if I captured it right. Used the widget to start recording, opened contacts, tried to add contact, got force close, then hit the widget again to stop recording. Hope it got what you asked for.
[EVO 4G Themes and Apps] JsChiSurf:
Caught the error just fine. The good news is, though, I don't see anything in the logcat that would indicate a bad method, etc, from the services.jar file.

I see an initial exception that appears to reference android.policy.jar:

D/PhoneWindow( 1824): couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView@47b2dda8 has no id.

Followed by the actual force close here:

E/AndroidRuntime( 1824): FATAL EXCEPTION: main
E/AndroidRuntime( 1824): java.lang.RuntimeException: Unable to resume activity {com.android.htccontacts/com.android.htccontacts.ui.EditContactActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=983045, result=-1, data=Intent { (has extras) }} to activity {com.android.htccontacts/com.android.htccontacts.ui.EditContactActivity}: java.lang.NullPointerException
E/AndroidRuntime( 1824):	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3347)

And these appear to be self-contained within the contact apps directly.

I'd go back a few nandroids, if you have them, to verify when this was introduced, just to try and isolate.
[EVO 4G Themes and Apps] brandontowey:
I restored my nandroid from before the edited services.jar, confirmed I could create a new contact, then flashed the zip you uploaded and got the force close. Is the services.jar in the zip? Can I extract and adb push it to see if that works?
[EVO 4G Themes and Apps] JsChiSurf:
I'm perplexed. Curious what happens when you flash a stock services.jar file attached below. It will undo all services.jar edits, just want to see what happens...
[EVO 4G Themes and Apps] brandontowey:
Still force closes. Could it be flashing it that screws with a security setting or someing?
[EVO 4G Themes and Apps] JsChiSurf:
Interesting. That helps though, in terms of excluding the reticle mod as the culprit.

Curious if you clear your various caches via recovery before flashing, if that clears it up. You could try, for the hell of it, to rip the .jar out of the zip and push during a reboot just to see if it makes a difference.

What recovery are you using?

Not sure what is going on though, to be honest.
[EVO 4G Themes and Apps] brandontowey:
EDIT...AGAIN*

Ok, so I figured I'd do my part and narrow it down further. I flashed the reticle-off.zip and everything's still good. Must have been wiping cache/dalvik that fixed whatever was going awry.

EDIT*

Ok, I think the wipe worked and/or just pushing the services.jar did. I don't get the force close anymore, can save new contacts and the reticle's only there when GPS is on. I first went back to my earlier nandroid, which was only an hour and a half older(not sure what I changed between the two), and it worked fine. So to double check, I restored the youngest nandroid(which was the one that I restored initially and was getting the force close on), and it worked, too. The only things done different this time was pushing the .jar instead of flashing and wiping cache/dalvik before restoring nandroid. So, to recap, everything's working fine. Thanks for taking the time to help me with this. Cool as **** and I appreciate it.
[EVO 4G Themes and Apps] JsChiSurf:
Awesome. Glad you were able to resolve. Moral of the story, when in doubt, be sure to wipe cache/dalvik if issues arise.

My pleasure. Debugging is fun :D. At least it is when the person on the other side is willing to help, test, and come up with a solution, rather than simply complain...
[EVO 4G Themes and Apps] SteelH:
JsChiSurf:

A user asked me about removing the headphones icon and/or . Do you have any knowledge of which line in services.jar that might be?
[EVO 4G Themes and Apps] JsChiSurf:
I haven't looked for these, but I'm sure it can be found rather quickly. I'm headed out for breakfast with the family and once I return early afternoon, I'll crack it open and take a look.

For testing purposes, I know I can get the one icon by plugging in headphones, but what about the one with the mic? Is that for a bluetooth headset or something? Just want to know how to test to verify it is removed...