Alexandr
Alexandr

Reputation: 97

Application does not start after installing the "freerasp" package

After I installed the "freerasp" package in pubspec.yaml, I added this function to the initState main file:

Future<void> initSecurityState() async {
TalsecConfig config = TalsecConfig(
  androidConfig: AndroidConfig(
    expectedPackageName: 'com.my.package',
    expectedSigningCertificateHashes: [
      'JsiruehgNueuejBevbeuUuw4tkiJU='
    ],
  ),
  watcherMail: '[email protected]',
);

TalsecCallback callback = TalsecCallback(
    androidCallback: AndroidCallback(
  onRootDetected: () => print('root'),
  onEmulatorDetected: () => print('emulator'),
  onHookDetected: () => print('hook'),
  onTamperDetected: () => print('tamper'),
  onDeviceBindingDetected: () => print('device binding'),
  onUntrustedInstallationDetected: () => print('untrusted install'),
));

TalsecApp app = TalsecApp(
  config: config,
  callback: callback,
);

app.start();
}

And restarted the app. But it started giving this error and shutting down:

W/AudioCapabilities(11051): Unsupported mime audio/dts W/AudioCapabilities(11051): Unsupported mime audio/mpeg-L2 W/AudioCapabilities(11051): Unsupported mime audio/vnd.rn-realaudio W/AudioCapabilities(11051): Unsupported mime audio/x-ms-wma W/VideoCapabilities(11051): Unsupported mime video/divx W/VideoCapabilities(11051): Unsupported mime video/x-flv W/VideoCapabilities(11051): Unsupported mime video/vnd.rn-realvideo W/VideoCapabilities(11051): Unsupported mime video/vc1 W/VideoCapabilities(11051): Unsupported mime video/ffmpeg W/VideoCapabilities(11051): Unsupported mime video/x-ms-wmv E/AndroidRuntime(11051): FATAL EXCEPTION: main E/AndroidRuntime(11051): Process: com.revens.mini.casino, PID: 11051 E/AndroidRuntime(11051): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.revens.mini.casino-2/base.apk"],nativeLibraryDirectories=[/data/app/com.revens.mini.casino-2/lib/x86, /data/app/com.revens.mini.casino-2/base.apk!/lib/x86, /system/lib, /vendor/lib, /data/downloads, /data/priv-downloads]]] couldn't find "libpolarssl.so" E/AndroidRuntime(11051): at java.lang.Runtime.loadLibrary0(Runtime.java:994) E/AndroidRuntime(11051): at java.lang.System.loadLibrary(System.java:1562) E/AndroidRuntime(11051): at com.aheaditec.talsec.security.z1.(SourceFile:1) E/AndroidRuntime(11051): at com.aheaditec.talsec.security.y1.(SourceFile:5) E/AndroidRuntime(11051): at com.aheaditec.talsec.security.y1.a(SourceFile:4) E/AndroidRuntime(11051): at com.aheaditec.talsec_security.security.api.Talsec.start(SourceFile:1) E/AndroidRuntime(11051): at com.aheaditec.freerasp.TalsecApp.init(TalsecApp.kt:27) E/AndroidRuntime(11051): at com.aheaditec.freerasp.MethodCallHandlerImpl.init(MethodCallHandlerImpl.kt:54) E/AndroidRuntime(11051): at com.aheaditec.freerasp.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.kt:21) E/AndroidRuntime(11051): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258) E/AndroidRuntime(11051): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/AndroidRuntime(11051): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322) E/AndroidRuntime(11051): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass) E/AndroidRuntime(11051): at android.os.Handler.handleCallback(Handler.java:751) E/AndroidRuntime(11051): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime(11051): at android.os.Looper.loop(Looper.java:154) E/AndroidRuntime(11051): at android.app.ActivityThread.main(ActivityThread.java:6138) E/AndroidRuntime(11051): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(11051): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) E/AndroidRuntime(11051): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) I/Process (11051): Sending signal. PID: 11051 SIG: 9 Lost connection to device. Exited (sigterm)

Upvotes: 1

Views: 549

Answers (1)

Tom&#225;š Soukal
Tom&#225;š Soukal

Reputation: 11

The app is crashing because there is a missing x86 native module.

Flutter officially supports only some ABIs in the release mode, and platform x86 is not included (more information here - https://docs.flutter.dev/deployment/android#what-are-the-supported-target-architectures). Because of that, freerasp library is distributed also without the x86 support.

This issue should only affect the development process (as the release mode does not support the x86 platform anyway). If you are running the application on Emulator, it's recommended downloading an Android image with supported ABI.

If you have any questions, please use the official discussion or open issue on the GitHub.

Upvotes: 3

Related Questions