[Desire HD Android Development] gokussjx:
Hey firefds!

Thanks, but there's a problem.

I did exactly as you suggested, made a backup of classes.dex, & removed it from the apk. Then decompiled.

It didn't make a difference. I still get this error, just like before deleting it...

(I'm trying to decompile Phone.apk, for I9000, from Dark Knight I9000 ICS 4.0.4 ROM):

[*] "C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone.apk"
decompiling "C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone.apk"...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\Administrator\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=targetDrawables, value=0x7f060006
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=handleDrawable, value=0x7f020039
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=leftChevronDrawable, value=0x010802e3
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=rightChevronDrawable, value=0x010802e4
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=waveDrawable, value=0x010802fd
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=outerRadius, value=0x0105001c
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=hitRadius, value=0x0105001e
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=vibrationDuration, value=0x00000014
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=snapMargin, value=0x0105001d
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=feedbackCount, value=0x00000003
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=verticalOffset, value=0x00001401
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=horizontalOffset, value=0x00000001
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=targetDrawables, value=0x7f060006
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=handleDrawable, value=0x7f020039
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=leftChevronDrawable, value=0x010802e3
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=rightChevronDrawable, value=0x010802e4
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=waveDrawable, value=0x010802fd
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=outerRadius, value=0x0105001c
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=hitRadius, value=0x0105001e
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=vibrationDuration, value=0x00000014
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=snapMargin, value=0x0105001d
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=feedbackCount, value=0x00000003
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=verticalOffset, value=0x00000001
W: Could not decode attr value, using undecoded value instead: ns=prvandroid, name=horizontalOffset, value=0x00000001
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x010301ec
I: Decoding values*/* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010404a3
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.encodeAsResXmlValue(ResScalarValue.java:54)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlItemValue(ResScalarValue.java:47)
at brut.androlib.res.data.value.ResArrayValue.serializeToResValuesXml(ResArrayValue.java:55)
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)

Help is highly appreciated.

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

UPDATE: I solved the problem by using the ROM's framework apk! So, decompiled successfully. But now, while recompiling, I get this:

[*] "C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone"
recompiling "C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone"...
W: Could not find sources
I: Building resources...
C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res\values-de\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res\values-de\strings.xml:195: error: Unexpected end tag string
C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res\values-es\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res\values-es\strings.xml:195: error: Unexpected end tag string
C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res\values-es-rUS\strings.xml:197: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res\values-es-rUS\strings.xml:198: error: Unexpected end tag string
C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res\values-it\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res\values-it\strings.xml:195: error: Unexpected end tag string
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL8852652728042638445.tmp, -I, C:\Users\Administrator\apktool\framework\1.apk, -S, C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res, -M, C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\AndroidManifest.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:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL8852652728042638445.tmp, -I, C:\Users\Administrator\apktool\framework\1.apk, -S, C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\res, -M, C:\Program Files\Android\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\Phone\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more

What's up here?