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

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 7 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 684 created by mdubbyap on 2014-10-03T15:55:23.000Z:

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.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by mdubbyap on 2014-10-03T15:57:26.000Z:

Patch file fixing the issue

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by mdubbyap on 2014-10-03T15:57:26.000Z:

Patch file fixing the issue

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by mdubbyap on 2014-10-03T15:59:45.000Z:

apk that fails

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by mdubbyap on 2014-10-03T15:59:45.000Z:

apk that fails

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by connor.tumbleson on 2014-10-03T16:35:50.000Z:

Took a different approach with the patch, since I remember my comments: ce3c37c

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by connor.tumbleson on 2014-10-03T16:35:50.000Z:

Took a different approach with the patch, since I remember my comments: ce3c37c

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by mdubbyap on 2014-10-03T17:01:08.000Z:

Thanks! Great response time!

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by mdubbyap on 2014-10-03T17:01:08.000Z:

Thanks! Great response time!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by mdubbyap on 2014-10-03T17:08:24.000Z:

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?

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by mdubbyap on 2014-10-03T17:08:24.000Z:

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?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by connor.tumbleson on 2014-10-03T17:54:59.000Z:

This app won't fall into case 1 or 2.

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

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by connor.tumbleson on 2014-10-03T17:54:59.000Z:

This app won't fall into case 1 or 2.

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

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by mdubbyap on 2014-10-03T18:33:29.000Z:

Sorry, you're right. Thanks.

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by mdubbyap on 2014-10-03T18:33:29.000Z:

Sorry, you're right. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment