简体   繁体   English

安卓。 系统应用程序的本机库

[英]Android. Native libraries for system app

I developed application with native libraries.我使用本机库开发了应用程序。 In regular case it working correctly, but when I move it in /system/app after reloading I seen what missed /data/app-lib/com.my.app folder with *.so files.在正常情况下,它可以正常工作,但是当我在重新加载后将它移动到 /system/app 中时,我看到了 /data/app-lib/com.my.app 文件夹中包含 *.so 文件的内容。 However, symlink lib in /data/data/com.my.app exist.然而,符号链接lib中/data/data/com.my.app存在。

Device Nexus 4设备 Nexus 4

Please help me to resolve this situation.请帮我解决这种情况。 Any help will be appreciated任何帮助将不胜感激

I'd be surprised if the OP has been searching for the answer for half a decade, and I don't think this fix existed back then, but for other people searching their way here today:如果 OP 已经寻找了五年的答案,我会感到惊讶,而且我认为当时不存在此修复程序,但对于今天在这里搜索的其他人来说:

For some reason, Android doesn't extract native libraries from apps in /system/priv-app.出于某种原因,Android 不会从 /system/priv-app 中的应用程序中提取本机库。 It just symlinks /data/data/app/lib -> /system/priv-app/app/lib.它只是符号链接 /data/data/app/lib -> /system/priv-app/app/lib。 This means you need to also copy all libraries into /system/priv-app/app/lib.这意味着您还需要将所有库复制到 /system/priv-app/app/lib。 If you're building in Windows, make sure to also chmod the library to 0755 after copying it in.如果您在 Windows 中构建,请确保在将库复制到 0755 后也将其修改为 0755。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM