GithubHelp home page GithubHelp logo

Comments (11)

msikyna avatar msikyna commented on July 17, 2024 2

Hello @fanjavaid , @rpavliuk ,

we are looking at the issue. Thank you for details.

Kind regards,
Talsec team

from free-rasp-android.

xprikryl2 avatar xprikryl2 commented on July 17, 2024 1

Hello @fanjavaid,

We've managed to provide a partial solution. The native library libpolarssl.so is no longer required in the freeRASP workflow, so the bug mentioned above shouldn't occur anymore.

Nevertheless, there are still other native libraries that are crucial for freeRASP (libsecurity.so and libclib.so) that can also be problematic. I found a lot of open issues regarding this problem (eg. Xiaomi native library load, App bundle UnsatisfiedLinkError, App Bundle native crash, and many others). It looks like there are still some issues during native library loading.

I also stumbled upon two proposed solutions, but I haven't had the possibility to test them out yet.

  1. Disabling bundle ABI split in the build.gradle as described here. This will slightly increase the size of a bundle.
bundle {
    abi {
        // This property is set to true by default.
        enableSplit = false
    }
}
  1. In the stack trace of this issue above, the application is trying to load a native library from the app directory in the filesystem. That usually means that the native libraries are compressed and extracted to the filesystem during the installation. You can try to modify your extractNativeLibs and If youโ€™re using App Bundle, also set android.bundle.enableUncompressedNativeLibs=true along with the extractNativeLibs configuration option.
  2. There is also a GH project ReLinker that tries to solve issues with native libraries linking.

If you manage to try one of the proposed solutions above or if you find a new one, please share your findings with us.

Best regards,
Talsec Team

from free-rasp-android.

msikyna avatar msikyna commented on July 17, 2024 1

Hello @rpavliuk , @fanjavaid ,
thank you for reporting the issue! We are looking into it.

Kind regards,
Talsec team

from free-rasp-android.

msikyna avatar msikyna commented on July 17, 2024

Hello @fanjavaid,

The library should support both x86 and x64. The library (aar) contains libpolarssl.so for all ABIs (x86, x86_64, armeabi-v7a, arm64-v8a). Can you check on which devices the crash occurs? Is it a general problem for all x64 devices, or it only occurs on some devices? You can also inspect your bundle file (.aab) if the base/lib directory contains libpolarssl.so for all ABIs. We will try to look into this issue but Iโ€™m not sure if we will be able to reproduce this issue.

Best regards,
Talsec Team

from free-rasp-android.

fanjavaid avatar fanjavaid commented on July 17, 2024

Hello @msikyna

Here is the details about the devices:

Screenshot 2023-06-22 at 10 52 55 Screenshot 2023-06-22 at 10 52 47

Well, the Bundle file contains for all ABIS : x86_64, x86, arm64-v8a, armeabi-v7a.

๐Ÿ”ดย  Oh, in my exception above (my question) it is trying to lookup in the arm directory & yes it is not available in my Bundle file.

Or do you have any suggestion how to handle it? I believe App crashes when invoke Talsec.start(), but I can't catch the Exception. Crash still exists.

Thank you

from free-rasp-android.

rpavliuk avatar rpavliuk commented on July 17, 2024

We have, I guess, a similar issue:

Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.signnow.android-9yrhDsO0RpoyrWxEyG4MXA==/base.apk"],nativeLibraryDirectories=[/data/app/com.signnow.android-9yrhDsO0RpoyrWxEyG4MXA==/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libpolarssl.so" at java.lang.Runtime.loadLibrary0(Runtime.java:1011) at java.lang.System.loadLibrary(System.java:1657) at com.aheaditec.talsec.security.b2.<clinit>(SourceFile:1) at com.aheaditec.talsec.security.a2.<init>(SourceFile:6) at com.aheaditec.talsec.security.a2.a(SourceFile:4) at com.aheaditec.talsec_security.security.api.Talsec.start(SourceFile:1) at com.signnow.app.app.SignNowApp.setTalsecLibrary(SignNowApp.kt:128) at com.signnow.app.app.SignNowApp.onCreate(SignNowApp.kt:64) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740) at android.app.ActivityThread.-wrap1() at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

It is our first release with your library. At this time it occurred only on Nexus 5X devices. I have researched SO a bit and found a similar issue. I don't want to try the solution on my current users. Can you provide some information about this error?
Or maybe I can safely use this solution?

Also, I need to mention that I have this block in my build.gradle file. Because I have some native libraries:

ndk {
            abiFilters.addAll(
                listOf(
                    "arm64-v8a", "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
                )
            )
        }

from free-rasp-android.

rpavliuk avatar rpavliuk commented on July 17, 2024

@msikyna Can we help you with framing this bug?

from free-rasp-android.

rpavliuk avatar rpavliuk commented on July 17, 2024

Thank you so much, we will try to update your library and discuss the suggested solutions.
I will update you after the release of our app

from free-rasp-android.

rpavliuk avatar rpavliuk commented on July 17, 2024

We have tried to update the library to the latest version, but this exception still occurs:

Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.signnow.android-tvn2uhQIOfml5bFibF2NLQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.signnow.android-tvn2uhQIOfml5bFibF2NLQ==/lib/arm64, /system/lib64, /system/product/lib64]]] couldn't find "libsecurity.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.aheaditec.talsec.security.a2.<clinit>(SourceFile:1) at com.aheaditec.talsec.security.z1.<init>(SourceFile:6) at com.aheaditec.talsec.security.z1.a(SourceFile:4) at com.aheaditec.talsec_security.security.api.Talsec.start(SourceFile:4) at com.signnow.app.app.SignNowApp.setTalsecLibrary(SignNowApp.kt:129) at com.signnow.app.app.SignNowApp.onCreate(SignNowApp.kt:64) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460) at android.app.ActivityThread.access$1300(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

But I want to notice that this crash occurs on the device Mainline brand Google. So, this can be an emulator, in this case, it's not an issue for us.
Also, we will check the recommensations from the message above, maybe we can use it in our project.
We will monitor this crash and update you if we will find something interesting.

Thanks!

from free-rasp-android.

rpavliuk avatar rpavliuk commented on July 17, 2024

@msikyna After monitoring this crash for some time we can conclude that it happens more on Emulators or already Rooted devices. So, it is not affecting us, because we plan to block these devices anyway.
But after the update we have encountered a new crash. I have created a separate issue for it.

from free-rasp-android.

fanjavaid avatar fanjavaid commented on July 17, 2024

Hello, after releasing the updated version with workarounds above, the issue about UnsatisfiedLinkError was not happening. But, like @rpavliuk there is a new issue: Fatal Exception: java.lang.RuntimeException: Package manager has died in the latest Talsec version.

from free-rasp-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.