[Desire Android Development] qaysedcftgb:
here are some news, maybe there is the root cause for my problem visible?

---

I just want to edit an XML, PNGs are not of interest, they will be exchanged later

compression set to 0

Options set to ON:

23 resources.arsc: ON

24 classes.dex: ON

25 _custom_res: ON

26 copy resources to APK: ON

27 zipalign: ON (not really necessary, the whole ROM is not zipaligned)

28 delete compile dir: ON

29 delete recompile dir: ON

30 optimize ALL PNG: OFF

31 optimize 9.png: OFF

apk tool version 1.3.2

Took stock framework-res.apk and DialerTabActivity.apk from XXJPM firmware, already deodexed earlier.

Put both files in directory

\AutoAPKTool2.0.3\_INPUT_APK

Installed framework with "1" and framework is copied a 1.apk to

C:\Dokumente und Einstellungen\abgadmin\apktool\framework\1.apk

^^german language, but correct directory

What me wonders... why is the 1.apk file only 2.691KB instead of 5.617KB?

lets go on

Selected Option 6, drag and dropped \AutoAPKTool2.0.3\_INPUT_APK\framework-res.apk

Worked fine.

\AutoAPKTool2.0.3\_INPUT_APK\framework-res

directory is created.

Also \AutoAPKTool2.0.3\_INPUT_APK\framework-res\apktool.yml is created

Looks good so far.

Decompiled DialerTabActivity.apk separately with option 6 (single APK file)

[*] E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity.apk
decompiling E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity.apk...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Dokumente und Einstellungen\abgadmin\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0205009a
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0205009a
W: Could not decode attr value, using undecoded value instead: ns=android, name=color, value=0x02050097
I: Decoding values*/* XMLs...
I: Done.

and in the background I see a message that says to install the proper framwork files, framewrok resources for package ID: 2 is not found

Checked the website

Used google and found this site:

http://code.google.com/p/android-apktool/wiki/FrameworkFiles

Hm...

OK, copied the framework-res.apk manually to

C:\Dokumente und Einstellungen\abgadmin\apktool\framework\2.apk

and tried again option 6 for the DialerTabActivity.apk

[*] E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity.apk
decompiling E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity.apk...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Dokumente und Einstellungen\abgadmin\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Dokumente und Einstellungen\abgadmin\apktool\framework\2.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0205009a
I: Loading resource table from file: C:\Dokumente und Einstellungen\abgadmin\apktool\framework\2.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0205009a
I: Loading resource table from file: C:\Dokumente und Einstellungen\abgadmin\apktool\framework\2.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=color, value=0x02050097
I: Decoding values*/* XMLs...
I: Done.
Exception in thread "main" brut.androlib.AndrolibException: Expected pkg of id: 2, got: 1
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(Unknown Source)
at brut.androlib.res.data.ResTable.getPackage(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.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)

Hm...

renamed the small 1.apk to 3.apk and 2.apk to 1.apk (all done in C:\Dokumente und Einstellungen\abgadmin\apktool\framework\)

and the errors are shorter:

[*] E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity.apk
decompiling E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity.apk...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Dokumente und Einstellungen\abgadmin\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0205009a
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0205009a
W: Could not decode attr value, using undecoded value instead: ns=android, name=color, value=0x02050097
I: Decoding values*/* XMLs...
I: Done.

Looks better so far, but still error message about ID2 and installing proper framework, check the website...

Lets try to recompile...

used option 7, gave teh directory of the decompiled DialertabActivity

and...

[*] E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity
recompiling E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity...
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Unknown Source)
... 5 more

no apktool.yml file found...

Copied the file from the decompiled framework-res.apk and changed the content of it:

---

version: 1.3.2

apkFileName: DialerTabActivity.apk

---

Now the decompilation starts... and fails like usual:

[*] E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity
recompiling E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity...
I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOKUME~1\abgadmin\LOKALE~1\Temp\APKTOOL1256937636401736669.tmp, -x, -S, E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res, -M, E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOKUME~1\abgadmin\LOKALE~1\Temp\APKTOOL1256937636401736669.tmp, -x, -S, E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res, -M, E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:5: error: Error: No resource found that matches the given name: attr 'android:windowContentOverlay'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:4: error: Error: No resource found that matches the given name: attr 'android:windowNoTitle'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.NoTitleBar'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:8: error: Error: No resource found that matches the given name: attr 'android:windowContentOverlay'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:15: error: Error: No resource found that matches the given name: attr 'android:windowAnimationStyle'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:11: error: Error: No resource found that matches the given name: attr 'android:windowBackground'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:14: error: Error: No resource found that matches the given name: attr 'android:windowContentOverlay'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:13: error: Error: No resource found that matches the given name: attr 'android:windowIsFloating'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:16: error: Error: No resource found that matches the given name: attr 'android:windowNoDisplay'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:12: error: Error: No resource found that matches the given name: attr 'android:windowNoTitle'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Translucent.NoTitleBar'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:19: error: Error: No resource found that matches the given name: attr 'android:windowContentOverlay'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:22: error: Error: No resource found that matches the given name: attr 'android:windowAnimationStyle'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:25: error: Error: No resource found that matches the given name: attr 'android:windowBackground'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:28: error: Error: No resource found that matches the given name: attr 'android:windowContentOverlay'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:26: error: Error: No resource found that matches the given name: attr 'android:windowFrame'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:27: error: Error: No resource found that matches the given name: attr 'android:windowIsFloating'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:31: error: Error: No resource found that matches the given name: attr 'android:windowEnterAnimation'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:32: error: Error: No resource found that matches the given name: attr 'android:windowExitAnimation'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:35: error: Error: No resource found that matches the given name: attr 'android:windowEnterAnimation'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:36: error: Error: No resource found that matches the given name: attr 'android:windowExitAnimation'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:39: error: Error: No resource found that matches the given name: attr 'android:windowExitAnimation'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:43: error: Error: No resource found that matches the given name: attr 'android:textColor'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:42: error: Error: No resource found that matches the given name: attr 'android:textSize'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:47: error: Error: No resource found that matches the given name: attr 'android:textColor'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:46: error: Error: No resource found that matches the given name: attr 'android:textSize'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:51: error: Error: No resource found that matches the given name: attr 'android:textColor'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:50: error: Error: No resource found that matches the given name: attr 'android:textSize'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:55: error: Error: No resource found that matches the given name: attr 'android:textColor'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:54: error: Error: No resource found that matches the given name: attr 'android:textSize'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:59: error: Error: No resource found that matches the given name: attr 'android:textColor'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:58: error: Error: No resource found that matches the given name: attr 'android:textSize'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:63: error: Error: No resource found that matches the given name: attr 'android:textColor'.
E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\styles.xml:62: error: Error: No resource found that matches the given name: attr 'android:textSize'.
The system cant find the drive specified

And again, only the directory

E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\build\apk

with the file

classes.dex

is created.

No content seen in

E:\AutoAPKTool2.0.3\_CUSTOM_RES

Copied manually the

E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\colors.xml

to

E:\AutoAPKTool2.0.3\_CUSTOM_RES\DialerTabActivity\res\values\colors.xml

^^ the directory wasnt available

Using the option 8 on the DialerTabActivity directory, the apk is build...

but decompiling the new apk, shows that the old values from the original apk are taken

My changes are not seen in colors.xml :(

adb is set to the path, also java (1.6.0.31)

nothing is seen :(

I read the first 15 pages of this thread but didnt find a hint to my pitty situation.

Which essential entry failure am I doing?

Had the thought that the tool doesnt work on XXJPU so I tried this time stock XXJPM files, but also failed.

Cheers

qaysed