sky201503 / android-apktool-1

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

Can't decompile Notif Pro 0.31 #359

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Anrik\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
Exception in thread "main" java.lang.NullPointerException
        at brut.androlib.res.decoder.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:37)
        at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
        at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:102)
        at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:68)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:169)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:119)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)
        at brut.apktool.Main.cmdDecode(Main.java:135)
        at brut.apktool.Main.main(Main.java:70)

What version of the product are you using? On what operating system?
apktool 1.5.1-PR1
Windows 7 Ultimate x64

Please provide any additional information below.
The apk file is attached

Original issue reported on code.google.com by liyuanmi...@gmail.com on 27 Nov 2012 at 3:41

Attachments:

GoogleCodeExporter commented 9 years ago
bah, that Res9Patch decoder still needs work. Can't promise anything 
immediately as we have bigger bugs, but I'll try and look into it after I get 
4.2 support working.

Original comment by connor.tumbleson on 27 Nov 2012 at 4:42

GoogleCodeExporter commented 9 years ago
Fixed. Fix available at: 
http://code.google.com/r/fbarriga-android-apktool/source/detail?r=e7a49f0452994f
97272fa4c430d577701b2f9e24&name=fbarriga/master

Output from fixed version:

{{{
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/xxxx/apktool/framework/1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
S: Could not decode file, replacing by FALSE value: 
drawable-hdpi/card_background.9.png
S: Could not decode file, replacing by FALSE value: 
drawable-hdpi/search_bg_shadow.9.png
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
}}}

Original comment by fbarriga@ngmoco.com on 20 Feb 2013 at 3:43

GoogleCodeExporter commented 9 years ago
So just catching the NPE and treating it as false. 

So was this a problem of a bad image that we are just treating with a 
try-catch. Or actually a bad decompilation of the 9patch that we need to fix 
and not hack around.

Basically,

Was the image bad? Or is apktool at fault?

If the first, we can use the fix. If the latter, I'd prefer a real fix.

Original comment by connor.tumbleson on 20 Feb 2013 at 4:30

GoogleCodeExporter commented 9 years ago
Merged in wip2.0

Original comment by connor.tumbleson on 21 Mar 2013 at 10:50