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

Decompile facebook error with --no-src --keep-broken-res #922

Closed
chunrong opened this issue Apr 21, 2015 · 5 comments
Closed

Decompile facebook error with --no-src --keep-broken-res #922

chunrong opened this issue Apr 21, 2015 · 5 comments

Comments

@chunrong
Copy link

I use the same options on yelp and it also failed. Of course, use --no-res can work, but other modules of the projects need the output of the "--keep-broken-res " option.

Version of facebook is "com.facebook.katana-v32.0.0.0.8-8742515-Android-4.0.apk" .
Thanks for your help.

java -Djava.awt.headless=true -jar ./tools/apktool.jar d -f --no-src --keep-broken-res -o tmp_dir_kd0bi70b com.facebook.katana.apk
I: Using Apktool 2.0.0-RC2 on com.facebook.katana.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/test/apktool/framework/1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=versionCode, value=0x008ae8b4
I: Loading resource table from file: /home/test/apktool/framework/1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=versionName, value=0x00000032
I: Loading resource table from file: /home/test/apktool/framework/1.apk
Cleaning up unclosed ZipFile for archive /home/test/apktool/framework/1.apk
Cleaning up unclosed ZipFile for archive /home/test/apktool/framework/1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=versionCode, value=0x008ae8b4
I: Loading resource table from file: /home/test/apktool/framework/1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=versionName, value=0x00000032
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Writer.java:157)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSerializerDelegate.java:106)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:131)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:295)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:123)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
at brut.apktool.Main.cmdDecode(Main.java:170)
at brut.apktool.Main.main(Main.java:86)

@iBotPeaches
Copy link
Owner

2.0.0 was released today. Based on your stacktrace you are using 2.0.0 RC2 which is nearly 8 months old. Can you try with this new version? - https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.0.0.jar

@chunrong
Copy link
Author

Thanks for your help. I just downloaded the new version, deleted framework/1.apk and still not worked. A new exception was raised.

Thanks a lot.

I: Using Apktool 2.0.0 on com.facebook.katana-v32.0.0.0.8-8742515-Android-4.0.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/chunrong/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=internal, name=layout_maxHeight, value=0x00004001
W: Could not decode attr value, using undecoded value instead: ns=internal, name=layout_minHeight, value=0x00004001
I: Decoding values / XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0101055c
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:65)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:61)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:247)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:134)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:104)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)

@iBotPeaches
Copy link
Owner

Thanks, I will check it out then.

@aemdy
Copy link

aemdy commented Apr 27, 2015

I am also interested in this issue. Facebook is not the only application which fails to be decompiled. com.FakeCall2 fails too. How is it going?

@iBotPeaches iBotPeaches added duplicate and removed Bug labels Apr 27, 2015
@iBotPeaches
Copy link
Owner

Same error as a few other apks. Closing for the original issue of #913

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

3 participants