由于共享库无法放入 /system,Android 应用程序崩溃
我有一个使用 Android NDK 构建的共享库,最终大小为 80MB(是的,巨大!)。我绝对不能缩小它的尺寸。问题是,当安装 Android 应用程序时,共享库无法放入我手机上的 /system,因为只有 300K 是免费的。因此,当应用程序尝试运行时,它会因 SIGBUS 错误而崩溃,因为并非所有库都在那里。在 /system 中释放更多空间而不破坏很多东西几乎是不可能的。
所以,我想知道是否有另一种方法可以链接到这个库,将其放在另一个分区上,例如 /data ,它有 150MB 的可用空间。有人对此有什么想法吗?
I have a shared library that I build with the Android NDK, which ends up being 80MB (yes, huge!). I absolutely cannot shrink it down in size. The problem is, when the Android application is being installed the shared library cannot fit in /system on my phone because only 300K is free. So when the application tries to run, it crashes with a SIGBUS error since not all of the library is there. Freeing any more space in /system would be near impossible without possibly breaking a lot of things.
So, I was wondering if there is another way to link to this library by putting it on another partition like /data which has 150MB free. Does anyone have any ideas on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您也可以将 .so 文件安装到
/data/data/YOURPACKAGE/lib/
不过,您必须研究如何执行此操作,因为我没有这方面的经验。
编辑:看看这篇文章: http://www.aton .com/android-native-libraries-for-java-applications/
You can install .so files also to
/data/data/YOURPACKAGE/lib/
You'll have to research how to do it, though, since I don't have experience on it.
Edit: take a look at this post: http://www.aton.com/android-native-libraries-for-java-applications/
欢迎您编写自己的固件。
否则,你无法改变此类事情的发生。
You are welcome to write your own firmware.
Otherwise, you cannot change what happens with this sort of thing.