Ashok Jeev
Ashok Jeev

Reputation: 737

gaining root user permission on an android device programatically in java in order to change scaling_governor

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

Answers (1)

3c71
3c71

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

Related Questions