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

redexer against facebook.apk #13

Closed
chunrong opened this issue Apr 16, 2015 · 1 comment
Closed

redexer against facebook.apk #13

chunrong opened this issue Apr 16, 2015 · 1 comment

Comments

@chunrong
Copy link

Hi, I tried to exact info of facebook apk by redexer. But it raised an exception,"scripts/cmd.rb:126:in `

': unpacking apk failed (RuntimeError)".

Then I checked cmd.rb and found that it was caused by APKTool.

"java -Djava.awt.headless=true -jar apktool_2.0.0rc4.jar d -f --no-src --keep-broken-res -o tmp_dir_kd0bi70b com.facebook.katana.apk" would cause the following log.

Then I tried adding an option "--no-res", and apktool would pass. But the AndoridManifest.xml would be a binary file, which caused new problems.

Thanks,

Without option --no-src
I: Using Apktool 2.0.0-RC4 on com.facebook.katana.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:57)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
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: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)

@jsjeon
Copy link
Member

jsjeon commented May 1, 2015

Like you already mentioned, the error logs you reported are caused by apktool; this should be reported to apktool, not here. Also, you didn't specify what was a new error after adding the option '--no-res'? (Btw, is it okay to pass both '--keep-broken-res' and '--no-res' together or you added '--no-res' only?)

@jsjeon jsjeon closed this as completed May 1, 2015
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

2 participants