370829592 / android-apktool

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

Samsung apk throws error brut.androlib.AndrolibException: Arsc files with zero or multiple packages #684

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Use apktool to process attached samsung app. 

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

I expect it to parse correctly and not throw the below exception:

Caused by: brut.androlib.AndrolibException: Arsc files with zero or multiple 
packages
        at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:95)
        at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
        at brut.androlib.Androlib.getResTable(Androlib.java:54)
        at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:221)
        at brut.androlib.ApkDecoder.setAnalysisMode(ApkDecoder.java:178)
        at com.mobileiron.android.apk.APKFileImpl.allocate(APKFileImpl.java:293)

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

Linux, 2.0.0.b8 and b9 (exception is from b8)

Please provide any additional information below.

At some point a step towards fixing this was taken, and a lovely todo comment 
was added in the place where i'm getting the exception.  I've extended that fix 
in the attached patch.

Original issue reported on code.google.com by mdubb...@gmail.com on 3 Oct 2014 at 3:55

GoogleCodeExporter commented 9 years ago
Patch file fixing the issue

Original comment by mdubb...@gmail.com on 3 Oct 2014 at 3:57

Attachments:

GoogleCodeExporter commented 9 years ago
apk that fails

Original comment by mdubb...@gmail.com on 3 Oct 2014 at 3:59

Attachments:

GoogleCodeExporter commented 9 years ago
Took a different approach with the patch, since I remember my comments: 
https://github.com/iBotPeaches/Apktool/commit/ce3c37c6abbcaa960ddced48c55c6cd437
f56d3d

Original comment by connor.tumbleson on 3 Oct 2014 at 4:35

GoogleCodeExporter commented 9 years ago
Thanks!  Great response time!

Original comment by mdubb...@gmail.com on 3 Oct 2014 at 5:01

GoogleCodeExporter commented 9 years ago
Looking at master the fix appears to be different from the above commit.  I 
still see the case statement with 1 and 2. This will break with the package i 
have uploaded to this bug.  Is the above commit just not there yet?

Original comment by mdubb...@gmail.com on 3 Oct 2014 at 5:08

GoogleCodeExporter commented 9 years ago
This app won't fall into case 1 or 2.

Case 1 checks for "android". This app uses "sec_container_1.android"

Original comment by connor.tumbleson on 3 Oct 2014 at 5:54

GoogleCodeExporter commented 9 years ago
Sorry, you're right. Thanks.

Original comment by mdubb...@gmail.com on 3 Oct 2014 at 6:33