New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build com.parrot.mediaplayer.apk with no changes #700

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

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 590 created by richard.security.consultant on 2014-01-13T20:38:12.000Z:

What steps will reproduce the problem?

  1. apktool d com.parrot.mediaplayer.apk
  2. make no changes
  3. apktool b com.parrot.mediaplayer

What is the expected output? What do you see instead?
The expected output is a newly built apk. Instead aapt crashes.

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

Please provide any additional information below.
$ apktool b com.parrot.mediaplayer
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, /var/folders/gd/qy2sgx4s48j4z_p0rmmbtf8w0000gn/T/APKTOOL853435192998045663.tmp, -0, arsc, -I, /Users/richard/Library/apktool/framework/1.apk, -S, /private/tmp/mp/com.parrot.mediaplayer/res, -M, /private/tmp/mp/com.parrot.mediaplayer/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, /var/folders/gd/qy2sgx4s48j4z_p0rmmbtf8w0000gn/T/APKTOOL853435192998045663.tmp, -0, arsc, -I, /Users/richard/Library/apktool/framework/1.apk, -S, /private/tmp/mp/com.parrot.mediaplayer/res, -M, /private/tmp/mp/com.parrot.mediaplayer/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, /var/folders/gd/qy2sgx4s48j4z_p0rmmbtf8w0000gn/T/APKTOOL853435192998045663.tmp, -0, arsc, -I, /Users/richard/Library/apktool/framework/1.apk, -S, /private/tmp/mp/com.parrot.mediaplayer/res, -M, /private/tmp/mp/com.parrot.mediaplayer/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more

On OS X 10.9:
$ aapt p --min-sdk-version 10 --target-sdk-version 10 -F /var/folders/gd/qy2sgx4s48j4z_p0rmmbtf8w0000gn/T/APKTOOL853435192998045663.tmp -0 arsc -I /Users/richard/Library/apktool/framework/1.apk -S /tmp/mp/com.parrot.mediaplayer/res -M /tmp/mp/com.parrot.mediaplayer/AndroidManifest.xml
Bus error: 10

On Linux:
$ ./aapt p --min-sdk-version 10 --target-sdk-version 10 -F /tmp/APKTOOL610652308137494516.tmp -0 arsc -I /share/homes/richard/apktool/framework/1.apk -S /tmp/mp/com.parrot.mediaplayer/res -M /tmp/mp/com.parrot.mediaplayer/AndroidManifest.xml
Segmentation fault

You can download the apk here:
https://www.dropbox.com/s/9zkauihjds4b2z7/com.parrot.mediaplayer.apk

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by connor.tumbleson on 2014-01-13T23:30:29.000Z:

Damn. You are segfaulting aapt. I haven't seen that in 2 years.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by connor.tumbleson on 2014-01-13T23:30:29.000Z:

Damn. You are segfaulting aapt. I haven't seen that in 2 years.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by richard.security.consultant on 2014-01-14T14:50:33.000Z:

I'm glad to hear this is rare. However, I really want to modify this apk. Is there anything I can do to get this fixed? Would a gdb trace be useful?

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by richard.security.consultant on 2014-01-14T14:50:33.000Z:

I'm glad to hear this is rare. However, I really want to modify this apk. Is there anything I can do to get this fixed? Would a gdb trace be useful?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by shahnishant19 on 2014-01-22T11:23:25.000Z:

I am facing same issue. This is application specific. I have successfully rebuilt several apks using apktool. But for one specific apk it fails.

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by shahnishant19 on 2014-01-22T11:23:25.000Z:

I am facing same issue. This is application specific. I have successfully rebuilt several apks using apktool. But for one specific apk it fails.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by connor.tumbleson on 2014-01-22T13:12:37.000Z:

Same issues as in segfaulting apk?
Or you've confirmed the fact that this apk segfaults aapt?

The latter is already confirmed, as I duplicated the problem. If you've confirmed it as well. You may use the "star" feature on this issue to receive notifications about changes to its status. The former doesn't really help because there is no apk / stacktrace / log output.

Just because an apk fails to rebuild doesn't mean its this issue. I doubt there are two apks in a short period of time that segfault aapt, unless we've discovered some new obfuscation technique.

Either way. I'm making a new aapt from source that has some debug things enabled. I'll run this apk through again and see what we are dealing with.

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by connor.tumbleson on 2014-01-22T13:12:37.000Z:

Same issues as in segfaulting apk?
Or you've confirmed the fact that this apk segfaults aapt?

The latter is already confirmed, as I duplicated the problem. If you've confirmed it as well. You may use the "star" feature on this issue to receive notifications about changes to its status. The former doesn't really help because there is no apk / stacktrace / log output.

Just because an apk fails to rebuild doesn't mean its this issue. I doubt there are two apks in a short period of time that segfault aapt, unless we've discovered some new obfuscation technique.

Either way. I'm making a new aapt from source that has some debug things enabled. I'll run this apk through again and see what we are dealing with.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by shahnishant19 on 2014-01-22T13:51:38.000Z:

Thanks for the quick reply. I didn't really used attached media player apk. I faced same issue today with a different apk. It threw same exception on same lines. Unfortunately, I won't be able to share apk here.

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by shahnishant19 on 2014-01-22T13:51:38.000Z:

Thanks for the quick reply. I didn't really used attached media player apk. I faced same issue today with a different apk. It threw same exception on same lines. Unfortunately, I won't be able to share apk here.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by adamboulton on 2014-04-08T10:56:42.000Z:

I am also seeing the for another APK. Can disassemble and build others fine, but just came across an APK this morning where it is failing on the same error as you are getting.

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by adamboulton on 2014-04-08T10:56:42.000Z:

I am also seeing the for another APK. Can disassemble and build others fine, but just came across an APK this morning where it is failing on the same error as you are getting.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by connor.tumbleson on 2014-12-27T12:39:03.000Z:

fb67c0c

I can't duplicate this segfaulting aapt anymore with this updated aapt (shown in the above commit)

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by connor.tumbleson on 2014-12-27T12:39:03.000Z:

fb67c0c

I can't duplicate this segfaulting aapt anymore with this updated aapt (shown in the above commit)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by richard.security.consultant on 2015-01-01T14:28:45.000Z:

I cannot reproduce the segfault with com.parrot.mediaplayer.apk either. Thanks a lot for this fix!

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by richard.security.consultant on 2015-01-01T14:28:45.000Z:

I cannot reproduce the segfault with com.parrot.mediaplayer.apk either. Thanks a lot for this fix!

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