oshi: getProcessor() doesn't return processor name

oshi doesn’t return processror name such as cortexA55 . i am looking for something that can give the output of lscpu command (which includes model name) on android. running lscpu is not possible without rooting i think.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

You have failed to provide your code, ARM cpu’s are known in OSHI, see eg. https://github.com/oshi/oshi/blob/fd8e0b5f558fbf0df5a2d9b16b2a4e523837ab33/oshi-core/src/main/resources/oshi.architecture.properties#L253

code like below should get you the processor identifier which can the provide the name, vendor etc.

SystemInfo si = new SystemInfo();
HardwareAbstractionLayer hal = si.getHardware();
CentralProcessor cpu = hal.getProcessor();
ProcessorIdentifier processorIdentifier = cpu.getProcessorIdentifier();