flutter 安装“freerasp”软件包后应用程序无法启动

col17t5w  于 2023-05-19  发布在  Flutter
关注(0)|答案(1)|浏览(183)

在pubspec.yaml中安装了“freerasp”包之后,我将这个函数添加到initState主文件中:

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

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();
}

并重新启动了应用程序。但它开始给出这个错误并关闭:
带音频功能(11051):不支持的mime audio/dts W/audioCapabilities(11051):不支持的mime audio/mpeg-L2 W/AudioCapabilities(11051):不支持的mime audio/vnd.rn-realaudio W/AudioCapabilities(11051):不支持的mime audio/x-ms-wma W/VideoCapabilities(11051):不支持的mime video/divx W/VideoCapabilities(11051):不支持的mime video/x-flv W/VideoCapabilities(11051):不支持的mime video/vnd.rn-realvideo W/VideoCapabilities(11051):不支持的mime video/vc 1 W/VideoCapabilities(11051):不支持的mime video/ffmpeg W/VideoCapabilities(11051):不支持的mime video/x-ms-wmv E/AndroidRuntime(11051):致命异常:main E/AndroidRuntime(11051):进程: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]]]找不到“libpolarssl.so“E/AndroidRuntime(11051):at java.lang.Runtime.loadLibrary0(Runtime.java:994)E/AndroidRuntime(11051):在java.lang.System.loadLibrary(System.java:1562)E/AndroidRuntime(11051):(SourceFile:1)E/AndroidRuntime(11051):(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):在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):在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):发送信号PID:11051 SIG:9失去与设备的连接。退出(sigterm)

l7wslrjt

l7wslrjt1#

应用程序崩溃,因为缺少x86本机模块。
Flutter官方只支持一些发布模式下的ABI,而平台x86不包括在内(更多信息请参见https://docs.flutter.dev/deployment/android#what-are-the-supported-target-architectures)。因此,freerasp库也是在没有x86支持的情况下发布的。
此问题只会影响开发过程(因为发布模式根本不支持x86平台)。如果在Emulator上运行应用程序,建议下载支持ABI的Android镜像。
如果您有任何问题,请使用GitHub上的官方讨论或公开问题。

***相同问题:**https:github.com/talsec/Free-RASP-Flutter/issues/6#issuecomment-1547358702
*讨论:https://github.com/talsec/Free-RASP-Flutter/discussions

相关问题