如何在flutter中执行二进制文件?我已将二进制文件放入资产中并添加到我的代码函数中以“解压缩”它(如何在 flutter 中获取资产的文件路径?)。
该文件位于应用程序数据文件夹中:
generic_x86:/data/data/com.example.hidden/app_flutter # ls
binaryfile flutter_assets
generic_x86:/data/data/com.example.hidden/app_flutter #
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试使用Process.run它执行它时,它说Permission denied. 当我chmod +x或chmod 777它使用 root shell 时,它说No such file or directory. 但是我更喜欢一些无根方法来做到这一点。
如何在 Flutter 中正确执行预构建的二进制文件?谢谢