Status
Not open for further replies.
Search This thread

dlbaker1179

Senior Member
Sep 17, 2010
472
80
WI
7. HOW-TO hide the clock

First of all, all credit goes to pardonmyfreedom for this method! He posted this MOD for the Droid Incredible, I tested it on the EVO. Thanks buddy!

This reference assumes that you already know how to recompile a framework file using smali/baksmali.

This method will not take up space on in your status bar (This means the other icons will shift to the right and not leave a blank spot).

This guide is a reference for the smali code changes that must be made inside of services.jar to hide the CLOCK.

You need to edit StatusBarPolicy.smali, which is located within services.jar under com/android/server/status.

Search and find the following code:
Code:
    .line 574
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

and replace it with:


Code:
.line 574
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V


_______________________________________________________________________

8. HOW-TO Hide the Battery


First of all, all credit goes to pardonmyfreedom for this method! He posted this MOD for the Droid Incredible, I tested it on the EVO. Thanks buddy!

This reference assumes that you already know how to recompile a framework file using smali/baksmali.

This method will not take up space on in your status bar (This means the other icons will shift to the right and not leave a blank spot).

This guide is a reference for the smali code changes that must be made inside of services.jar to hide the battery icon.

You need to edit StatusBarPolicy.smali, which is located within services.jar under com/android/server/status.

Search and find the following code:

Code:
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryIcon:Landroid/os/IBinder;

ADD the following below the above code:
Code:
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V

is there a flashable zip for the newest ota im a newbie to this stuff...lol
\thanks
 

thegregbradley

Senior Member
Aug 20, 2010
444
57
Probably an obvious question with an obvious answer (sorry, new at this), but do you have to have a deodexed rom for the GPS off reticle removed zip to be properly flashed? I just did a nandroid backup and then tried to flash the zip, but it did nothing. Did not clear cache or anything.
 

SteelH

Senior Member
Jun 12, 2010
3,120
2,965
Probably an obvious question with an obvious answer (sorry, new at this), but do you have to have a deodexed rom for the GPS off reticle removed zip to be properly flashed? I just did a nandroid backup and then tried to flash the zip, but it did nothing. Did not clear cache or anything.

First of all, ALWAYS CLEAR CACHE AND DALVIK when flashing anything that changes your framework. Secondly, yes, you need to be deodexed.
 

brock1909

Senior Member
Nov 22, 2007
629
44
.line 574
iget-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mClockData:Lcom/android/server/status/IconData;

invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->addIcon(Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationData;)Landroid/os/IBinder;

move-result-object v3

iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mClockIcon:Landroid/os/IBinder;



this is what i get in the new OTA services.jar when i try to remove the clock...
 

SteelH

Senior Member
Jun 12, 2010
3,120
2,965
.line 574
iget-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mClockData:Lcom/android/server/status/IconData;

invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->addIcon(Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationData;)Landroid/os/IBinder;

move-result-object v3

iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mClockIcon:Landroid/os/IBinder;



this is what i get in the new OTA services.jar when i try to remove the clock...

Search for :
Code:
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

It's there, I've already done it to my phone. The '.line #' may be a few different but the MOD is the same.
 

brock1909

Senior Member
Nov 22, 2007
629
44
Search for :
Code:
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

It's there, I've already done it to my phone. The '.line #' may be a few different but the MOD is the same.

invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V

found it, but it didnt work.
i attached my file, if u could take a quick look and tell me what i did, id appreciate it.

also isnt the transparent notification background in services.jar as well?
 

Attachments

  • services_signed.zip
    2.3 MB · Views: 3

SteelH

Senior Member
Jun 12, 2010
3,120
2,965
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V

found it, but it didnt work.
i attached my file, if u could take a quick look and tell me what i did, id appreciate it.

also isnt the transparent notification background in services.jar as well?

You did not save your changes!!

Code:
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V

This line DOES NOT exist in your StatusBarPolicy.smali

And yes, the transparent notification background requires a services.jar edit as well as a PNG chnage.
 

snovvman

Senior Member
Jun 6, 2008
1,700
672
I went through the process and removed the reticle. The process went smoothly. I made a backup of services.jar prior. After updating the services.jar and rebooting, the phone took a long time to start.

After that, I got a com.android.phone FC on startup. The reticle is gone, but the phone FC happens each time on boot.

I copied my backup services.jar over the modified one, rebooted, but the reticle is still gone and phone still FCs on startup.

I am using MikFroYo v4.2 and wonder if that had some contributing factor.

I'm sure I didn't make a mistake in the edit and restoring the original services.jar.

Stpuidly, I did not make a nandroid...

What is happening here? Help?

Thanks.
 

Spacen

Member
Aug 3, 2010
37
1
Jefferson City, MO
Sounds like a similar problem I had. Are you copying the new file with something like root explorer? You have to push it to the phone with adb. I was told to do it while in recovery but adb doesn't seem to work in recovery on my phone. Instead I went into root explorer, found the folder and mounted as r/w. You can do this step in adb but it was simpler for me this way since I don't do it often and didn't remember the command to mount as r/w. Then I went to my pc and pushed the file with adb. Then reboot. It will take a while to boot that first time but hopefully no more FCs.
 
  • Like
Reactions: snovvman

snovvman

Senior Member
Jun 6, 2008
1,700
672
Sounds like a similar problem I had. Are you copying the new file with something like root explorer? You have to push it to the phone with adb. I was told to do it while in recovery but adb doesn't seem to work in recovery on my phone. Instead I went into root explorer, found the folder and mounted as r/w. You can do this step in adb but it was simpler for me this way since I don't do it often and didn't remember the command to mount as r/w. Then I went to my pc and pushed the file with adb. Then reboot. It will take a while to boot that first time but hopefully no more FCs.

That's exactly what I did! I moved files with Root Explorer because it was more convenient. I will try with ADB and report back. Thanks a lot for helping!

Edit: That did it!! Boot is faster now. I used the HBoot driver, Clockwork, and ADB but it didn't work. Although ADB showed that the file was copied, it was not. I then installed the HTC driver, mounted as RW, pushed via ADB and voila! I would hit the "Thanks" button twice if I could. You saved me from having to rebuild my phone.
 
Last edited:

SteelH

Senior Member
Jun 12, 2010
3,120
2,965
That's exactly what I did! I moved files with Root Explorer because it was more convenient. I will try with ADB and report back. Thanks a lot for helping!

Edit: That did it!! Boot is faster now. I used the HBoot driver, Clockwork, and ADB but it didn't work. Although ADB showed that the file was copied, it was not. I then installed the HTC driver, mounted as RW, pushed via ADB and voila! I would hit the "Thanks" button twice if I could. You saved me from having to rebuild my phone.

Word of advice... NEVER, I mean NEVER, copy/move files around in /system/framework/ with rootexplorer. You will quickly enjoy an unending barrage of FCs if you do so. It's like trying to swap the engine of a car while it's running... Don't expect favorable results.

When you boot into recovery mode to perform the ADB push/pull commands to try new system/framework/ files, be sure to mount the system partition FIRST using the following command:

Code:
adb shell
mount /dev/block/mtdblock4 /system
exit

After doing that, I HIGHLY recommend you rename your original file (see example of how to do so below) before copying over a new one. This way if your screwed up the MOD, you can easily revert back by deleting the new file and renaming the old file back. It's much quicker than a full nandroid!
For example let's say you are going to use a new services.jar

Code:
adb shell
cd /system/framework
mv services.jar services.jar.original
exit

Now issue your adb push/pull commands.
 
Last edited:

marrellmontez

New member
Apr 5, 2009
3
0
help

I am currently rooted unrevoked .. not sure if it matters or not

I simply want to delete the icons off my status bar to give the status bar a cleaner look..

i have tried every ones instructions, but i cant seem to get it to work.
can some one please walk me threw it, i would highly appreciate it..

SOMEONE PLEASE HELP!! :confused:
 

Anseri

Senior Member
Nov 17, 2010
59
8
7. HOW-TO hide the clock

First of all, all credit goes to pardonmyfreedom for this method! He posted this MOD for the Droid Incredible, I tested it on the EVO. Thanks buddy!

This reference assumes that you already know how to recompile a framework file using smali/baksmali.

This method will not take up space on in your status bar (This means the other icons will shift to the right and not leave a blank spot).

This guide is a reference for the smali code changes that must be made inside of services.jar to hide the CLOCK.

You need to edit StatusBarPolicy.smali, which is located within services.jar under com/android/server/status.

Search and find the following code:
Code:
    .line 574
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

and replace it with:


Code:
.line 574
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V


UPDATE: In v3.70, its .line 575 instead of .line 574

___________________________________________________________________

Question, Under "replace it with", what should it look like once replaced?
Code:
.line 574
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V

invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
^^like this^^
Code:
.line 574
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
^^or this^^
 

CDobra58

Senior Member
Oct 25, 2008
123
47
Decatur
thank for this info I was pulling my hair out untii Came across this post now my phone is just the way want thanks to all
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Does anyone know where the notification smali file is located in Gingerbread?

    com/android/server/status no longer exists in the classes.dex. There are only folders for "am", "connectivity", and "location".

    I am running Droid X with the leaked gingerbread.

    Hide battery on 2.3.3
    File SystemUI/smali/com/android/systemui/statusbar/policy/StatusBarPolicy.smali
    After code(line 2720 - metod updateBattery)
    Code:
    	iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
    
    	const-string v7, "battery"
    
    	invoke-virtual {v6, v7, v2, v3}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V
    add code
    Code:
    	iget-object v6, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mService:Landroid/app/StatusBarManager;
    
    	const-string v7, "battery"
    
    	invoke-virtual {v6, v7, v9}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V

    -------------------------------------------------

    Hide clock on 2.3.3
    File SystemUI/smali/com/android/systemui/statusbar/Clock.smali
    After code(line 298 - metod onAttachedToWindow)
    Code:
        .line 106
        const v1, -0x414142
    
        invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/Clock;->setTextColor(I)V
    add code
    Code:
        const v1, 0x8
    
        invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/Clock;->setVisibility(I)V

    This files from Samsung GT-i9000 Galaxy S - JVB
    Screen from MIUI-1.4.15 Desire
    6
    5
    4
    3
    Remove AM/PM from 12 hour clock

    Okay guys, at the prodding of SteelH, who has taken me out of semi-retirement, I took a look at this VERY quickly, as this is not something I use, since I remove the clock all together.

    However, since this has already been done by someone else on Samsung phone, probably using a technique different than what I would have pursued (not that there is anything wrong with it), it prevents me from having to figure it out, and rather, just "apply" the principle to our Sense tweaked services.jar instead.

    So, if you want to manually modify your services.jar file to remove am/pm from your clock (note, this may break 24 hour display all together, not sure, I didn't bother testing), decompile and open /com/android/server/status/StatusBarPolicy.smali, and wholesale replace the updateClock() method in your existing file with the following tweaked version I've provided:

    Code:
    .method private final updateClock()V
        .locals 6
    
        .prologue
        .line 940
        iget-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mCalendar:Ljava/util/Calendar;
    
        invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
    
        move-result-wide v1
    
        invoke-virtual {v0, v1, v2}, Ljava/util/Calendar;->setTimeInMillis(J)V
    
        .line 941
        iget-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mClockData:Lcom/android/server/status/IconData;
        
        iget-object v1, p0, Lcom/android/server/status/StatusBarPolicy;->mContext:Landroid/content/Context;
    
        invoke-static {v1}, Landroid/text/format/DateFormat;->getTimeFormat(Landroid/content/Context;)Ljava/text/DateFormat;
    
        move-result-object v1
        
        iget-object v2, p0, Lcom/android/server/status/StatusBarPolicy;->mCalendar:Ljava/util/Calendar;
    
        invoke-virtual {v2}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
    
        move-result-object v2
    
        invoke-virtual {v1, v2}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
    
        move-result-object v1    
        
        const-string v4, " PM"
    
        const-string v5, ""
    
        invoke-virtual {v1, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
    
        move-result-object v1     
    
        const-string v4, " AM"
    
        const-string v5, ""
    
        invoke-virtual {v1, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
    
        move-result-object v1     
    
        iput-object v1, v0, Lcom/android/server/status/IconData;->text:Ljava/lang/CharSequence;
    
        .line 942
        iget-object v0, p0, Lcom/android/server/status/StatusBarPolicy;->mService:Lcom/android/server/status/StatusBarService;
    
        iget-object v1, p0, Lcom/android/server/status/StatusBarPolicy;->mClockIcon:Landroid/os/IBinder;
    
        iget-object v2, p0, Lcom/android/server/status/StatusBarPolicy;->mClockData:Lcom/android/server/status/IconData;
    
        const/4 v3, 0x0
    
        invoke-virtual {v0, v1, v2, v3}, Lcom/android/server/status/StatusBarService;->updateIcon(Landroid/os/IBinder;Lcom/android/server/status/IconData;Lcom/android/server/status/NotificationData;)V
    
        .line 943
        return-void
        
    .end method

    Reference:
    no_am_pm.png


    Credit to s0niqu3 for the original mod concpet. I opened it up and pulled what was needed to manually apply the same to our version, which was not a 1-to-1 copy / paste, unfortunately, but rather, took a little massaging due do framework differences.