JY2*_*Y2k 5 android opengl-es android-runtime android-shell
从终端运行以下命令时:
adb shell dumpsys | adb shell dumpsys | adb shell dumpsys | adb shell dumpsys | adb shell dumpsys 查询 GLES
输出是:
GLES:高通、Adreno (TM) 330、OpenGL ES 3.0 V@53.0 AU@ (CL@)
但是,以编程方式运行时我无法获得输出。
String GPUModel = "";
String command = "adb shell dumpsys | grep GLES";
try {
InputStream inputStream = Runtime.getRuntime()
.exec(command)
.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
GPUModel = bufferedReader.readLine();
} catch (IOException e) {
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
GPUModel 为空。
| 归档时间: |
|
| 查看次数: |
5903 次 |
| 最近记录: |