gpt4 book ai didi

Android NDK 原生权限

转载 作者:太空宇宙 更新时间:2023-11-03 10:53:58 43 4
gpt4 key购买 nike

Android 操作系统如何处理在 NDK 编译的 .apk 中运行的 native 代码的权限?在我看来,因为 JNI 只是调用 native 函数,所以代码的实际 NATIVE 部分不应受到 Android 权限的影响。例如,我希望开发一个 Android 应用程序 (.apk),它在数据/系统下写入一个文件。 AOS 已经将数据/系统挂载为 RW,所以我已经能够开发一个可以轻松执行写入的 native 程序。我的想法是,当我使用 NDK 实现它时,由于 native 实现,我不必设置写入目录的权限。这个假设是否正确?

谢谢,大卫

最佳答案

My thinking is that when I implement this using the NDK, I will not have to set permissions to write to the directory because of the native implemenation. Is this assumption correct?

绝对不是。权限会影响流程中的一切,无论您选择使用何种编程语言编写。

关于Android NDK 原生权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8674104/

43 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com