Android: Get Hardware Information Programmatically

前端 未结 6 1016
遥遥无期
遥遥无期 2020-11-29 01:00

I have a requirement for obtaining the hardware related information on an Android device that runs my application. I need information of the following sort.

  • CP
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 01:40

    You can also get real-time hardware info. Build.* parameters are set during compilation of Android before even deploying it on hardware itself.

    You can access Linux real-time hardware info by reading /proc/* "files".

    You can do that with https://stackoverflow.com/a/3528239/997381

    Simply as command put cat /proc/cpuinfo.

    You can test this with adb shell, and you don't need root permissions.

提交回复
热议问题