SK-Yang / android-apktool

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

FC on raw resources #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Decode an app with a raw resource (such as an MP3)
2. Build the app without changing a thing

What is the expected output? What do you see instead?
E/AndroidRuntime( 1584): FATAL EXCEPTION: main
E/AndroidRuntime( 1584): java.lang.RuntimeException: Unable to create 
application com.app.android.Application: 
android.content.res.Resources$NotFoundException: File res/raw/message.mp3 from 
drawable resource ID #0x7f060000
E/AndroidRuntime( 1584):    at 
android.app.ActivityThread.handleBindApplication(ActivityThread.java:3431)
E/AndroidRuntime( 1584):    at 
android.app.ActivityThread.access$2200(ActivityThread.java:123)
E/AndroidRuntime( 1584):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:977)
E/AndroidRuntime( 1584):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1584):    at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1584):    at 
android.app.ActivityThread.main(ActivityThread.java:3839)
E/AndroidRuntime( 1584):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime( 1584):    at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 1584):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
E/AndroidRuntime( 1584):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
E/AndroidRuntime( 1584):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1584): Caused by: 
android.content.res.Resources$NotFoundException: File res/raw/message.mp3 from 
drawable resource ID #0x7f060000
E/AndroidRuntime( 1584):    at 
android.content.res.Resources.openRawResourceFd(Resources.java:897)
E/AndroidRuntime( 1584):    at android.media.SoundPool.load(SoundPool.java:204)
E/AndroidRuntime( 1584):    at 
com..android.util.SoundManager.initializeSounds(SoundManager.java:49)
E/AndroidRuntime( 1584):    at 
com..android.util.SoundManager.<init>(SoundManager.java:39)
E/AndroidRuntime( 1584):    at 
com..android.util.SoundManager.initialize(SoundManager.java:132)
E/AndroidRuntime( 1584):    at 
com.app.android.Application.onCreate(Application.java:48)
E/AndroidRuntime( 1584):    at 
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
E/AndroidRuntime( 1584):    at 
android.app.ActivityThread.handleBindApplication(ActivityThread.java:3428)
E/AndroidRuntime( 1584):    ... 10 more
E/AndroidRuntime( 1584): Caused by: java.io.FileNotFoundException: This file 
can not be opened as a file descriptor; it is probably compressed
E/AndroidRuntime( 1584):    at 
android.content.res.AssetManager.openNonAssetFdNative(Native Method)
E/AndroidRuntime( 1584):    at 
android.content.res.AssetManager.openNonAssetFd(AssetManager.java:449)
E/AndroidRuntime( 1584):    at 
android.content.res.Resources.openRawResourceFd(Resources.java:894)
E/AndroidRuntime( 1584):    ... 17 more

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

Please provide any additional information below.

The res/raw mp3 is included in R$raw.smali and in the actual APK and manifest

Original issue reported on code.google.com by WesGar...@gmail.com on 24 Apr 2011 at 1:37

GoogleCodeExporter commented 9 years ago
FYI --keep-broken-res does not change anything

Original comment by WesGar...@gmail.com on 24 Apr 2011 at 1:38

GoogleCodeExporter commented 9 years ago
FYI -r flag does not change anything either

Original comment by WesGar...@gmail.com on 24 Apr 2011 at 1:42

GoogleCodeExporter commented 9 years ago
"Caused by: java.io.FileNotFoundException: This file can not be opened as a 
file descriptor; it is probably compressed"

Try to unzip resulting apk file and zip it back without a compression. 
Sometimes there are problems with resources.arsc file, if it's compressed and 
bigger than ~1MB.

Original comment by Brut.alll on 2 May 2011 at 8:56

GoogleCodeExporter commented 9 years ago
I think this is the same as Issue 67.

Original comment by Brut.alll on 3 May 2011 at 2:11

GoogleCodeExporter commented 9 years ago

Original comment by connor.tumbleson on 17 Nov 2012 at 6:46