I was looking to determine(or count) the number of cores in the embedded processor of android device.
I tried using /proc/cpuinfo
, but it is not return
Try this:
Runtime.getRuntime().availableProcessors();
This returns the number of CPU's available for THIS specific virtual machine, as I experienced. That may not be what you want, still, for a few purposes this is very handy. You can test this really easily: Kill all apps, run the above code. Open 10 very intensive apps, and then run the test again. Sure, this will only work on a multi cpu device, I guess.