kuter007 / android-apktool

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

apktool does not decode apps built by Android Studio #731

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using Android Studio, create and build a simple "hello world" app.
2. Use apktool to decode it.

What is the expected output? What do you see instead?

The expected output is that the app is decoded.  The actual output is this 
error:

I: Using Apktool 2.0.0-RC3 on app-release.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: 
/Users/jasonk/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: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:323)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)

What version of the product are you using? On what operating system?

2.0.0 RC3 on Mac OS X 10.10.1.

Please provide any additional information below.

This might be related to issues 635 and 722.

Original issue reported on code.google.com by jason44...@gmail.com on 18 Dec 2014 at 8:35

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I got a related error with android studio apks... Waiting the fix... :)

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

GoogleCodeExporter commented 9 years ago
ibotpeaches@raganok:~/Downloads/Apktool/Bug731$ apktool d app-release.apk 
I: Using Apktool 2.0.0-b81aac-SNAPSHOT on app-release.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
ibotpeaches@raganok:~/Downloads/Apktool/Bug731$ 

Not a bug. Give 717 or 720 a read. You need to read FrameworkFiles. It seems 
you need to delete $HOME/apktool/framework/1.apk , since RC3 introduced new 
internal frameworks.

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

GoogleCodeExporter commented 9 years ago
Yeah, deleting $HOME/Library/apktool/1.apk fixed it.  Thank you.

Original comment by jason44...@gmail.com on 19 Dec 2014 at 5:15

GoogleCodeExporter commented 9 years ago
That works! :)

Original comment by celiovasconcelos@gmail.com on 19 Dec 2014 at 5:23