• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.
Sign in to follow this  
Followers 0

Remove Clock from Status Bar

4 posts in this topic

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.