In order to identify the platform of an Android device, it seems that the java system property \"os.arch\" will suffice:
Log.i(\"mytag\", \"os.arch: \" + Sys
This may be help
More Info Android Build Class
These values come from a Linux structure. They can be displayed from a shell by cat /proc/cpuinfo
. The ARM defines them in the arch/arm/mm
directory. From this directory,
grep cpu_arch_name * | grep string | cut -d \, -f2 | sort | uniq
The arm7l indicates "little endian" mode, but this is selectable and depends on the kernel. I would think most ARM kernels will be "little endian", unless it is a network centric product (like an Android router). This is the same as uname -m
. On the x86, it returns "i686" on a PowerPC, it returns "ppc". I don't have a MIPS system, but my guess is "mips", but it could be the assortment found in cpu-probe.c
There are over 20 architectures in Linux all with different CPU versions. The answer is far less for current Android ports. However, it is possible that any of them can be used in the future. I think that the ARM is the only one sending a sub-architechure.
See also: uname() man page, Wikipedia's Uname, Server faults's uname machines, OpenJdk mailing list
According to what I can find in the Android source tree the ro.product.cpu.abi
property (which you can access as CPU_ABI
through the Build class) should have the following architecture-to-value mapping:
ARM: "armeabi-v7a" (or possibly "armeabi" if it's a really old / low-end device)
x86: "x86"
MIPS: "mips"
ARM: "arm64-v8a"
x86: "x86_64"
MIPS: "mips64"