Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while apktool tring to decode resource xml files #881

Closed
iBotPeaches opened this issue Mar 18, 2015 · 4 comments
Closed

Error while apktool tring to decode resource xml files #881

iBotPeaches opened this issue Mar 18, 2015 · 4 comments

Comments

@iBotPeaches
Copy link
Owner

Original issue 772 created by sscetboy on 2015-03-01T09:20:48.000Z:

What steps will reproduce the problem?

  1. Kept latest apktool.jar apktool.bat and aapt.exe in single folder and after moving to that folder in command prompt wrote the command:
    apktool d apkfilename.apk
  2. (Issue occures in decompiling some apk like it is occuring while decompiling attached apk file with above steps)
    3.

What is the expected output? What do you see instead?
The xml files(resource files are not decompiled or if decompiled it is showing special symboles in many xml files)

Error I get when i write apktool d attachedfilename.apk:
I: Baksmaling...
testI: Loading resource table...
W: Config flags size > 32. Exceeding bytes: 34030000.
W: Invalid config flags detected. Dropping resources: dimen-v13-ERR0
I: Loaded.
I: Loading resource table from file: C:\Users\user\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_toEndOf, value=0x7f070016
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignStart, value=0x7f070016
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
fontFamily, value=0x00000015
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSeria
lizer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:
673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSer
ializerDelegate.java:106)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:46)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
00)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:8
6)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

What version of the product are you using? On what operating system?
apktool-install-windows-r04-brut1.tar.bz2
apktool1.4.1.tar.bz2
And My systems operating system is windows 8

Please provide any additional information below.
I have also tried decompiling the apk after deleting 1.apk from C:\Users\user\apktool\framework i.e. from internal framework of apktool but I get the same error mentioned above

@iBotPeaches
Copy link
Owner Author

Comment #1 originally posted by sscetboy on 2015-03-01T09:24:18.000Z:

Apk file did not got attached as it was more than 10 MB

@iBotPeaches
Copy link
Owner Author

Comment #2 originally posted by sscetboy on 2015-03-01T09:38:26.000Z:

I did used latest apktool which has been uploaded on 12 feb 2015 and followed steps as mentioned but still getting same error. Below are the logs:

Microsoft Windows Version 6.2.9200 2012 Microsoft Corporation. All rights reserved.

C:\Users\user>java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

C:\Users\user>cd C:\Users\user\Desktop\apk to source code\apk tool

C:\Users\user\Desktop\apk to source code\apk tool>apktool d myapkfilename.apk
I: Using Apktool 2.0.0-RC4 on myapkfilename.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\user\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignEnd, value=0x7f070076
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentEnd, value=0x00000000
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout_alignParentStart, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, name=
fontFamily, value=0x00000015
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSeria
lizer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:
673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSer
ializerDelegate.java:106)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamD
ecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
14)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9
9)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:339
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:133)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:104)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)

C:\Users\user\Desktop\apk to source code\apk tool>

@iBotPeaches
Copy link
Owner Author

Comment #3 originally posted by sscetboy on 2015-03-01T09:47:19.000Z:

I tried again with latest apktool which has been uploaded on 12 feb 2015 Apktool 2.0.0-RC4 but after deleting 1.apk from internal framework of apk tool and it worked for me. My issue got solved. Please close the issue. Thanks.

@iBotPeaches
Copy link
Owner Author

Comment #4 originally posted by connor.tumbleson on 2015-03-01T16:42:38.000Z:

<empty>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant