Unlike iPhone, Android devices come with different hardware from different manufacturers. One important difference is the CPU architecture. Although almost all Android devices use ARM CPU, it comes with different versions, including armv5, armv5te, armv6, armv6 with VFP, armv7, armv7 with VFP, armv7 with neon etc.
Most of the time there’s no need for a developer to care about CPU types, but if you are developing CPU intensive apps, e.g. video player, video converter etc, you may want to optimize your code based on CPU types.
Retrieving CPU types on Android devices is actually quite simple. Android is based on Linux, and Linux /proc file system has provided an interface for users to get CPU information — /proc/cpuinfo. So to get the CPU information, you simply read this file. And read this file doesn’t require super user privilege.
To get the CPU info from command line, simple enter the command below,
adb shell (connect to your Android device shell)
cat /proc/cpuinfo (read the CPU info)
If you want to get the CPU info programmatically, use the code below,
It gives the process type, and features that are supported by it.