can we access “sysfs entry” in our android application directly?

情到浓时终转凉″ 提交于 2020-01-05 06:54:09

问题


I know that we are using jni as an interface with driver which allows android application framework to communicate with device driver.

But i don't know exact reason that why we can't access those sysfs entries in our application directly?

Please explain in detail.

Thank you in advance.


回答1:


Cannot access sysfs from application layer. I was trying to perform write on a sysfs file but failed.

Have to necessarily go through android middleware framework and/or HAL layer. These services could be provided selinux privileges allowing access to sysfs.



来源:https://stackoverflow.com/questions/15653453/can-we-access-sysfs-entry-in-our-android-application-directly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!