Hi all, I want to get the processor number on android. can I do that like as follow:
int processporNum =  sysconf(_SC_NPROCESSORS_CONF);
but everytime the return value is 1 on some of my phones, so i not sure this methold is right .is there anyother api can get this info
Settings -> About Phone should tell you most of what you want to know. Failing that, it will at least tell you a model name which you can then search google for more info. My 'About Phone' lists Model, CPU info (i.e. what CPU) and Memory info among other things.
Press Ctrl + Shift + Esc to open Task Manager. Select the Performance tab to see how many cores and logical processors your PC has.
you can run
Runtime.getRuntime().availableProcessors()
                        I see you're using native code.
So read file /proc/cpuinfo and interpret is accordingly. It looks something like this:
Processor   : ARMv7 Processor rev 2 (v7l)
BogoMIPS    : 162.83
Features    : swp half thumb fastmult vfp edsp thumbee neon 
CPU implementer : 0x51
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0x00f
CPU revision    : 2
Hardware    : htcleo
Revision    : 0000
Serial      : 0000000000000000 
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With