How to get processor speed and RAM in android device

前端 未结 2 1525
情书的邮戳
情书的邮戳 2021-01-13 01:35

Could anyone help me how to get processor name, speed and RAM of Android device via code.

2条回答
  •  孤城傲影
    2021-01-13 02:21

    its only possible on a rooted device or your app is running as system application.

    For wanted informations you have to look in the running kernel, as i know this informations cant be obtained by the android system itself.

    To obtain informations about the CPU, you can read and parse this file: /proc/cpuinfo

    To obtain memory informations, you can read and parse this file: /proc/memory

提交回复
热议问题