Jump to content


Photo

Remove Clock from Status Bar

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Gary Crutcher

Gary Crutcher

    Developer/Integrator

  • Members
  • PipPipPipPipPipPip
  • 1,342 posts
  • Gender:Male
  • Location:Bangkok, Thailand
  • Devices:Omnia II / Galaxy S III
I spent a long time trying to find out how to remove the clock from the statusbar as I do not need it since I have a clock on my home screen and a clock on my lock screen.

Finally, I found out how to do it. Many thanks to BixBix78 on the MIUI Forum for this.

FIRST - MAKE A BACKUP JUST IN CASE SOMETHING GOES TERRIBLY WRONG
NOTE: YOU DO THIS AT YOUR OWN RISK. ASSUMES YOU ARE ROOTED.

You will need to de-compile your SystemUI.apk file to make the change. You can use APK Manager to do this.
I am using APK Manager v4.9 although v5.0 is available.

1. In order to decompile the SystemUI.apk successfully, you will select option 22 (Set current project which should be SystemUI.apk)
2. Select option 22 Decompile apk (with dependencies)
3. When prompted, drag the twframework-res.apk into the APK Manager window.
Note: not doing this, and selecting option 9 Decompile, will get you errors.
4. Once the SystemUI.apk file is decompiled, navigate to
APK Manager\projects\SystemUI.apk\smali\com\android\systemui\statusbar
5. Using notepad, open Clock.smali
6. Search for "invoke-virtual {p0}, Lcom/android/systemui/statusbar/Clock;->updateClock()V"
without the quotes (should have .line 107 right before it)
7. Add the following BEFORE (above) this line:

const v1, 0x8

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

you should then have the following:



const v1, 0x8


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


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

8. Save file, recompile SystemUI.apk (option 11 in Apk Manager)
9. Open original SystemUI.apk and the new SystemUI.apk using winzip or winrar.
10 Drag the classes.dex from the new SystemUI.apk to the original SystemUI.apk
(We are just replacing the classes.dex with the new one we made)
11. Close both winzip/winrar windows
12. using adb, push the SystemUI.apk to /sdcard/ on your phone
13. all that's left is to copy the /sdcard/SystemUI.apk to /system/app/ and reboot your phone

Voila` Your clock is gone. (Note: I am using XXKH3 ROM)

Attached File  SC20110823-070547.png   358.83KB   19 downloads



Edited by Gary Crutcher, 26 August 2011 - 04:28 AM.

  • 0

Omnia I900 (Khuanchai custom ROM 21928/23016)
Omnia II (My Own JH2/23689 Lite Custom Rom)
Galaxy S III 16 GB (ZSEMI1 ROM, Siyah-s3-v1.9 kernel)

Note 3 (N900, Rooted, Unlocked, KitKat)
Galaxy Note 10.1 (2014) (Rooted, my own custom KitKat ROM)
-----------------------------------------------------------
If you like my work, Donations Happily Accepted.
>>>Donation Link<<<


#2
stevenz

stevenz

    Diehard

  • MoDaCo Silver
  • PipPipPipPip
  • 473 posts
  • Gender:Male
  • Location:Wellington, New Zealand
  • Interests:Motorcycling
    Tinkering
  • Devices:OG Tab, Note, Touchpad, N7
  • Twitter:@KnightNZ
I've checked that I've got the current Java SDK installed, but I'm still getting errors when it's trying to process the touchwiz framework apk:

--------------------------------------------------------------------------
|Fri 26/08/2011 -- 12:11:12.25|
--------------------------------------------------------------------------
java version "1.7.0"
Java™ SE Runtime Environment (build 1.7.0-b147)
Java HotSpot™ Client VM (build 21.0-b17, mixed mode, sharing)
I: Framework installed to: C:\Users\stewells\apktool\framework\2.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\stewells\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a6
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a6
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a6
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a6
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a6
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a6
at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown Source)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.decode(Unknown Source)
at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)


Any ideas?

  • 0
Motorcycling watchmaker.

#3
stevenz

stevenz

    Diehard

  • MoDaCo Silver
  • PipPipPipPip
  • 473 posts
  • Gender:Male
  • Location:Wellington, New Zealand
  • Interests:Motorcycling
    Tinkering
  • Devices:OG Tab, Note, Touchpad, N7
  • Twitter:@KnightNZ
Right, you need to install the main framework-res.apk as well apparently. Did that and it decompiled\compiled just fine.

Yay, more room in the status bar!

Any chance of this as a kitchen option Paul? My status-bar space is at a premium!

  • 0
Motorcycling watchmaker.

#4
Gary Crutcher

Gary Crutcher

    Developer/Integrator

  • Members
  • PipPipPipPipPipPip
  • 1,342 posts
  • Gender:Male
  • Location:Bangkok, Thailand
  • Devices:Omnia II / Galaxy S III

Right, you need to install the main framework-res.apk as well apparently. Did that and it decompiled\compiled just fine.

Yay, more room in the status bar!

Any chance of this as a kitchen option Paul? My status-bar space is at a premium!


I thought it was understood that the project was SystemUI.apk - Step #1.
I guess I was wrong. I have changed Step #1 to specify the apk you are trying to decompile.

Thanks for the feedback.

  • 0

Omnia I900 (Khuanchai custom ROM 21928/23016)
Omnia II (My Own JH2/23689 Lite Custom Rom)
Galaxy S III 16 GB (ZSEMI1 ROM, Siyah-s3-v1.9 kernel)

Note 3 (N900, Rooted, Unlocked, KitKat)
Galaxy Note 10.1 (2014) (Rooted, my own custom KitKat ROM)
-----------------------------------------------------------
If you like my work, Donations Happily Accepted.
>>>Donation Link<<<





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users