Reputation: 737
I'm trying to develop an android application in which I'm trying to change the scaling_governor to userspace so that I can set the cpu frequency, but I don't know how to gain root user permission programatically in order to change the scaling_governor. Is there any way to change the scaling_governor and to set user specified cpu frequency?
Upvotes: 2
Views: 1691
Reputation: 4541
To gain super-user privileges, you have to use Unix commands in a shell, something like this:
Process process = Runtime.getRuntime().exec("su");
Then use the process input/output to send commands, read output.
Upvotes: 1