Problems with native libraries in special circumstances (sd-card)

27 views
Skip to first unread message

Florian Over

unread,
Jul 3, 2015, 9:58:27 AM7/3/15
to android-...@googlegroups.com
We have the following situation:

We provide a app with a native lib. (libadobe.so in this case)
In the old version we shipped an old version of the lib.
In the new version we ship a new version.

The customers do the following:
  • Install old app
  • move app to sd-card
  • remove sd-card
  • install new app
In this case somehow the old lib is still loaded in a load of cases, which will lead to crashes.
I am not sure how to solve this.
Re-installing does not help.

Any ideas?
Is there any documentation how android platform handles this cases?

The crash will look look like this:
java.lang.UnsatisfiedLinkError: Native method not found: de.telekom.epub.dom.rmsdk.RMSDKWrapper.setLogLevel:(I)V
at com.company.dom.rmsdk.RMSDKWrapper.setLogLevel(Native Method)
at com.company.dom.rmsdk.RMSDKWrapper.<init>(RMSDKWrapper.java:79)
at com.company.dom.rmsdk.RMSDKWrapper.getInstance(RMSDKWrapper.java:56)
at com.company.RmsdkApplication.onCreate(RmsdkApplication.java:56)
at com.company.sausage.app.SausageApplication.onCreate(SausageApplication.java:225)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4151)
at android.app.ActivityThread.access$1300(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)

Matthias Schaff

unread,
Jul 9, 2015, 11:21:27 AM7/9/15
to android-...@googlegroups.com

By default, Android searches for lib in /data/data...../libs, /vendor/lib, /system/lib. So ensure that there is no other libadobe.so in the system & the apk contains your lib.
You can debug easily by stepping though the System.loadLibrary Call. 
Reply all
Reply to author
Forward
0 new messages