ResStringValue cast to data.value.resAttr #587

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 7 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 477 created by volleybolistCSKA on 2013-06-22T23:36:21.000Z:

Hi. I am trying to decompile apk by apktool 1.5.2 (Win7, x64), but get anytime this error:

I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\╚уюЁ№\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.v
alue.ResStringValue cannot be cast to brut.androlib.res.data.value.ResAttr
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:35
)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRes
ourceParser.java:313)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue
(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTa
g(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Static
XmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDe
coder.java:80)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDec
oder.java:130)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDe
coderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:10
7)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:91
)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:238)

    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
    at brut.apktool.Main.cmdDecode(Main.java:146)
    at brut.apktool.Main.main(Main.java:77)
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by connor.tumbleson on 2013-06-24T13:33:01.000Z:

Confirmed. Accepted.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by connor.tumbleson on 2013-06-24T13:33:01.000Z:

Confirmed. Accepted.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by cpukids2 on 2013-08-01T18:12:09.000Z:

I am having similar issue when trying to decompile an apk (file attached 'com.ml.mobile.edge-1.apk').

O/S - Windows 7, 64 bit
apktool version - 1.5.2
Java version - 1.6.0_20-b02

I only need to decomfile the 'AndroidManifest.xml' file and won't care about the resource files. Tried to specify the "-r" flag to avoid decompiling resouce files but it produced the 'AndroidManifest.xml' file in binary format (not decompiled into a readable format). Is it possible to specify which file (or file types) to decompile?

Any recommendation on how to fix this issue or any known workaround will be greately appreciated.

See below the actual expection:

D:\Android-development\bin\apktool>D:\Android-development\bin\apktool\apktool.bat d D:\Android-development\Apps\edge-1
com.ml.mobile.edge-1.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\admin\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values / XMLs...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResColorValue cannot be cast to br
ut.androlib.res.data.value.ResAttr
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:57)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:440)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:243)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by cpukids2 on 2013-08-01T18:12:09.000Z:

I am having similar issue when trying to decompile an apk (file attached 'com.ml.mobile.edge-1.apk').

O/S - Windows 7, 64 bit
apktool version - 1.5.2
Java version - 1.6.0_20-b02

I only need to decomfile the 'AndroidManifest.xml' file and won't care about the resource files. Tried to specify the "-r" flag to avoid decompiling resouce files but it produced the 'AndroidManifest.xml' file in binary format (not decompiled into a readable format). Is it possible to specify which file (or file types) to decompile?

Any recommendation on how to fix this issue or any known workaround will be greately appreciated.

See below the actual expection:

D:\Android-development\bin\apktool>D:\Android-development\bin\apktool\apktool.bat d D:\Android-development\Apps\edge-1
com.ml.mobile.edge-1.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\admin\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values / XMLs...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResColorValue cannot be cast to br
ut.androlib.res.data.value.ResAttr
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:57)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:440)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:243)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by pbedford83 on 2013-08-19T10:04:20.000Z:

I have the same issue. Anyone have any ideas about this?

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by pbedford83 on 2013-08-19T10:04:20.000Z:

I have the same issue. Anyone have any ideas about this?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by connor.tumbleson on 2013-10-14T02:11:31.000Z:

<empty>

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by connor.tumbleson on 2013-10-14T02:11:31.000Z:

<empty>

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by huang.adama on 2013-10-21T06:58:09.000Z:

I have the same issue too.

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by huang.adama on 2013-10-21T06:58:09.000Z:

I have the same issue too.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by connor.tumbleson on 2014-10-02T19:18:02.000Z:

<empty>

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by connor.tumbleson on 2014-10-02T19:18:02.000Z:

<empty>

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by connor.tumbleson on 2014-10-20T11:52:23.000Z:

49afdd2

Fixed

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by connor.tumbleson on 2014-10-20T11:52:23.000Z:

49afdd2

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment