问题描述
我知道我们正在使用jni作为与驱动程序的接口,该接口允许android应用程序框架与设备驱动程序进行通信.
I know that we are using jni as an interface with driver which allows android application framework to communicate with device driver.
但是我不知道为什么我们不能直接在应用程序中直接访问那些sysfs条目的确切原因?
But i don't know exact reason that why we can't access those sysfs entries in our application directly?
请详细说明.
谢谢.
推荐答案
无法从应用程序层访问sysfs.我试图在sysfs文件上执行写入操作,但是失败了.
Cannot access sysfs from application layer. I was trying to perform write on a sysfs file but failed.
必须通过android中间件框架和/或HAL层.可以为selinux特权提供这些服务,从而允许他们访问sysfs.
Have to necessarily go through android middleware framework and/or HAL layer. These services could be provided selinux privileges allowing access to sysfs.
这篇关于我们可以访问"sysfs条目"吗?直接在我们的android应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!