kuter007 / android-apktool

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

Apktool not able to decompile android studio build apk successfully; crashing. #700

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. apktool d an apk build by android studio

What is the expected output? What do you see instead?
Expected output is a decompiled for of corresponding apk.
But actual output is :

$ sudo java -jar ~/Workspace/GiT/awas-android/Tools/apktool.jar d 
Workspace/apk/app-debug.apk 
I: Using Apktool 2.0.0-RC2 on app-debug.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /var/root/Library/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=touchscreenBlocksFocus, value=0xffffffff
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 
0x0101048f
    at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
    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:107)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:91)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:322)
    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)

What version of the product are you using? On what operating system?
version apktool_2.0.0rc2.jar

Please provide any additional information below.

Original issue reported on code.google.com by raghv.si...@gmail.com on 7 Nov 2014 at 7:06

GoogleCodeExporter commented 9 years ago
See FrameworkFiles

ibotpeaches@raganok:~/apktool/framework$ clean-aapt d resources 1.apk | grep 
'touchscreenBlocksFocus'
      spec resource 0x0101048f android:attr/touchscreenBlocksFocus: flags=0x40000000
        resource 0x0101048f android:attr/touchscreenBlocksFocus: <bag> (PUBLIC)

That attribute is present in the internal framework in Apktool.

Original comment by connor.tumbleson on 9 Nov 2014 at 2:18

GoogleCodeExporter commented 9 years ago
So... what to do?

Original comment by celiovasconcelos@gmail.com on 19 Dec 2014 at 4:17

GoogleCodeExporter commented 9 years ago
As per FrameworkFiles.

> If you experience errors with undefined attributes. Try and remove the file 
at $HOME/apktool/framework/1.apk and re-run your command. Apktool's new 
internal framework will take its place and might resolve the error.

Original comment by connor.tumbleson on 19 Dec 2014 at 4:32