Jump to content

Remove Clock from Status Bar


Guest Gary Crutcher

Recommended Posts

Guest Gary Crutcher

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)

post-557795-0-30154900-1314270469_thumb.

Edited by Gary Crutcher
Link to comment
Share on other sites

Guest stevenz

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?

Link to comment
Share on other sites

Guest stevenz

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!

Link to comment
Share on other sites

Guest Gary Crutcher

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.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.