我们可以访问"sysfs条目"吗?直接在我们的android应用程序中? [英] can we access "sysfs entry" in our android application directly?

查看:97
本文介绍了我们可以访问"sysfs条目"吗?直接在我们的android应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我们正在使用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应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆