Reputation: 3140
I want to know how to read files placed in root folder. For instance let's take file /init.trace.rc
. When I'm trying to read it I get exception:
java.io.FileNotFoundException: /init.trace.rc: EACCES (Permission denied)
I thought that I need to get superuser access. I did it but that made no difference ((( I still can't read it. Could anybody help me? ...and also I wonder how file explorers like "RootExplorer" read that stuff?
Upvotes: 1
Views: 1142
Reputation: 3807
apparently this is all you need to run to get root access:
Process root = Runtime.getRuntime().exec("su");
taken from:
Upvotes: 1