arshidkv12 / android-apktool

Automatically exported from code.google.com/p/android-apktool
0 stars 1 forks source link

Error while apktool tring to decode resource xml files #772

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by sscetboy on 1 Mar 2015 at 9:20

GoogleCodeExporter commented 9 years ago
Apk file did not got attached as it was more than 10 MB

Original comment by sscetboy on 1 Mar 2015 at 9:24

GoogleCodeExporter commented 9 years ago
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]
(c) 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>

Original comment by sscetboy on 1 Mar 2015 at 9:38

GoogleCodeExporter commented 9 years ago
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.

Original comment by sscetboy on 1 Mar 2015 at 9:47

GoogleCodeExporter commented 9 years ago

Original comment by connor.tumbleson on 1 Mar 2015 at 4:42