1
我想读取文件“cpuinfo_cur_freq”retreiving当前我的根源银河SII的工作频率。我已经使用了一些这样的代码阅读cpuinfo_cur_freq与根权限
final Runtime runtime = Runtime.getRuntime();
try {
runtime.exec("su"); //or whatever command.
}
catch (IOException e) {
e.printStackTrace();
}
向我的应用添加超级用户权限,但仍然无法访问该文件。这是错误
W/System.err的(5295):java.io.FileNotFoundException:/系统/设备/系统/ CPU/CPU0/CPU频率/ cpuinfo_cur_freq:打开失败:EACCES(拒绝)
你可以帮帮我吗 ?