[Q] Change statusbar clock color (CyanogenMod 9 - V02)

HaxorBR

Member
May 11, 2010
34
3
0
Belo Horizonte
Hi,

I'm trying to change the statusbar clock color of Paul-xxx's rom CyanogenMod 9 - V02. Well I got sucess to edit the PNG files of SystemUI.apk, but when I try to decompile the SystemUI to edit the res\values\styles.xml (according to my search I think this is where I find the value to edit the clock color), i get the following error:

Code:
C:\ics framework>apktool d -f SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Documents and Settings\SV\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x01040405
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010302ee
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010302fc
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010302fc
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010302fc
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010302fc
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=opacity, value=0xfffffffd
W: Could not decode attr value, using undecoded value instead: ns=android, name=interpolator, value=0x010c0008
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x010804b2
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x010804b6
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108051f
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x0101030e
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x0101030e
W: Could not decode attr value, using undecoded value instead: ns=android, name=exitFadeDuration, value=0x010e0001
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x0101030e
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x0101030e
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x010301ea
W: Could not decode attr value, using undecoded value instead: ns=android, name=exitFadeDuration, value=0x010e0001
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x010102f0
W: Could not decode attr value, using undecoded value instead: ns=android, name=alpha, value=0x3ecccccd
W: Could not decode attr value, using undecoded value instead: ns=android, name=src, value=0x010803f6
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x010803f7
W: Could not decode attr value, using undecoded value instead: ns=android, name=animateLayoutChanges, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=animateLayoutChanges, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=opacity, value=0xfffffffd
W: Could not decode attr value, using undecoded value instead: ns=android, name=state_activated, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=baseline, value=0x00001201
W: Could not decode attr value, using undecoded value instead: ns=android, name=baseline, value=0x00001201
W: Could not decode attr value, using undecoded value instead: ns=android, name=baseline, value=0x00001501
W: Could not decode attr value, using undecoded value instead: ns=android, name=baseline, value=0x00001501
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x010804b6
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x010804b6
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x010804b6
I: Decoding values*/* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010301e9
        at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
        at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
        at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
        at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)
        at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
        at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)
        at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:48)
        at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
        at brut.apktool.Main.cmdDecode(Main.java:128)
        at brut.apktool.Main.main(Main.java:65)
I just installed the Apktool, so I dont know if this is the apk error or Apktool installation problem, but I followed all the steps of the installation manual (wich is very simple, I really dont think that I miss something).

Someone know how to solve that?

Thanks!

Offtopic:

I just want to share my homescreen :D :



------
EDIT:

Well, I think I found the problem, there was a file in the Documents and Settings folder, wich was problably created by some patcher (ZDune's or AChep's). I deleted it and I was able to decompile.

But now I need your help to figure what is wrong when I try to compile the file:

Code:
C:\ics framework>apktool b -f "C:\ics framework\SystemUI" SystemUI.apk
I: Smaling...
I: Building resources...
invalid resource directory name: C:\ics framework\SystemUI\res/drawable-sw600dp-mdpi
invalid resource directory name: C:\ics framework\SystemUI\res/layout-sw600dp
invalid resource directory name: C:\ics framework\SystemUI\res/values-sw600dp
invalid resource directory name: C:\ics framework\SystemUI\res/values-sw600dp-port
invalid resource directory name: C:\ics framework\SystemUI\res/values-sw720dp
invalid resource directory name: C:\ics framework\SystemUI\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\SV\CONFIG~1\Temp\A
PKTOOL630712022148537687.tmp, -I, C:\Documents and Settings\SV\apktool\framework\1.apk, -S, C:\ics framework\SystemUI\res, -M, C:\ics framework\SystemUI\An
droidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
        at brut.androlib.Androlib.buildResources(Androlib.java:248)
        at brut.androlib.Androlib.build(Androlib.java:171)
        at brut.androlib.Androlib.build(Androlib.java:154)
        at brut.apktool.Main.cmdBuild(Main.java:182)
        at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\SV\CONFIG~1\Temp\APKTOOL630712022148537687.tmp, -I, C:\Documents an
d Settings\SV\apktool\framework\1.apk, -S, C:\ics framework\SystemUI\res, -M, C:\ics framework\SystemUI\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
        ... 6 more
Thanks!!!
 
Last edited:

HaxorBR

Member
May 11, 2010
34
3
0
Belo Horizonte
Well, I get able to edit the apk. If someone get the same problem, this is what I did.

I installed the apktool v1.4.1, and adb, aapt from latest platform-tools from Android sdk. Then I get able to decompile and recompile the apk, but I cannot sign, so I copied the META-INF folder and AndroidManifest.xml from the original apk and pasted in the new one using winrar. Then pushed it back to the phone with adb.

Thanks and sorry for the bad english.

Offtopic:

My new homescreen, i'm very happy whit it:


 
Last edited: