问题
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