Issue
I need to read sysfs nodes in android directly and I have a rooted Nexus 6 (Anroid 7.1.1) phone and I need some help about possible ways of doing it.
well I can't read them directly from a user app and I got this error
denied { read } for name="" dev="sysfs" scontext=u:r:untrusted_app`
I have seen some approaches like this that copy target file to an available directory but I need more efficient ways:
Runtime.getRuntime().exec("su cp -r /source/ /target/");
but what about better ways? can I grant permission to my app? or can I read them through a system app? actually my main question is that can I read them directly using Android NDK ?
Solution
You have to take root permission first of all to access root directory. For accessing system as root refer to this
Getting 'root" permission for Android App
Answered By - Rishabh Dhiman
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.