Loading webrtc-client module with fingerprint sensor, make fingerprint sensors system (.so) file not finding

112 views Asked by At

I am working on adding OTG fingerprint sensor implementation with webrtc-client project. Fingerprint sensor library has .so file which I need to add into jniLibs folder. And I have converted webrtc-client android project to library and trying to include that in the project where fingerprint sensor is already implemented, but as soon as I add this module in the project, app starts giving error for fingerprint sensor system.so file, here is the error details:

    Process: com.fingerprint.rcapp, PID: 7793
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.fingerprint.rcapp--XpzGpbTo00QmDUMlC48fQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.fingerprint.rcapp--XpzGpbTo00QmDUMlC48fQ==/lib/arm64, /data/app/com.fingerprint.rcapp--XpzGpbTo00QmDUMlC48fQ==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]] couldn't find "libast2600.so"
        at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
        at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
        at java.lang.System.loadLibrary(System.java:1667)
        at com.fingerprint.rcapp.astdev.natives.PfsBioFpJNI.<clinit>(PfsBioFpJNI.java:95)
        at com.fingerprint.rcapp.astdev.natives.PfsBioFpJNI.createInstance(PfsBioFpJNI.java:110)
        at com.fingerprint.rcapp.astdev.natives.Ast2600.<init>(Ast2600.java:41)
        at com.fingerprint.rcapp.LoginActivity.onCreate(LoginActivity.java:98)
        at android.app.Activity.performCreate(Activity.java:7955)
        at android.app.Activity.performCreate(Activity.java:7944)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3423)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:7814)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)

I tried searching for similar solutions but nothing worked in my favour, it would be really helpful if someone can help me on this. Thank you.

EDIT

One thing I found out is the socket.io-client library and io.pristine libraries are creating this issue. When I comment out these two libraries, it works just fine but then webrtc-client does not work.

        implementation 'com.github.nkzawa:socket.io-client:0.4.2'
        api 'io.pristine:libjingle:9127@aar'

EDIT 2

I have figured out the root cause of this issue, the OTG FingerPrint sensor library use 32-bit .so file but io.pristine:libjingle:9127@aar library use 64-bit .so file, so when I am adding this library, it is looking for the fingerprint sensor library in 64-bit libs only. To fix this issues, I am trying to an implementation to either support both 64-bit and 32-bit libraries or ask for 64-bit library from Fingerprint sensor provider.

1

There are 1 answers

0
user1875926 On

Fixed this issue by adding an implementation to support both 32-bit and 64-bit libraries.