Android的os.arch输出ARM,MIPS,X86? [英] Android os.arch output for ARM, MIPS, x86?
问题描述
为了确定一个Android设备的平台,似乎Java系统属性os.arch就足够了:
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: " + System.getProperty("os.arch"));
大多数ARM器件响应: os.arch:armv7l
这是x86模拟器响应: os.arch:i686的
An x86 emulator responds: os.arch: i686
这有什么的产出的真正的Intel和MIPS的设备?
What are the outputs of this for real Intel and MIPS devices?
86的Android设备:??????
x86 Android device: ??????
MIPS的Android设备:??????
mips Android device: ??????
任何其他平台和变种?
编辑为谷歌电视:
它看起来像谷歌电视采用'无'的构建code。
It looks like Google TV uses 'none' for Build code.
Vizio公司合作的明星:os.arch:armv7l,Build.CPU_ABI / Build.CPU_ABI2:无/未知
Vizio Co-Star: os.arch: armv7l , Build.CPU_ABI/Build.CPU_ABI2: none/unknown
罗技歌剧团:os.arch:i686的,Build.CPU_ABI / Build.CPU_ABI2:无/未知
Logitech Revue: os.arch: i686 , Build.CPU_ABI/Build.CPU_ABI2: none/unknown
编辑澄清意图:
这里的目标是众包的的真正的设备及其输出清单的编制。从AOSP code的预期结果是有趣的,但设备制造商,像老谷歌电视台以上,可能会偏离提供从AOSP code期望的输出。
The goal here is to crowdsource the compilation of a list of real devices with their output. The expected output from AOSP code is interesting, but device manufacturers, like the old Google TV units above, may deviate from supplying the output expected from AOSP code.
推荐答案
据我可以在Android源代码树中的 ro.product.cpu.abi
属性发现(你可以为 CPU_ABI访问
通过的 build类)应具备以下架构到值的映射:
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(也可能是armeabi如果它是真的老了/低端设备)
ARM: "armeabi-v7a" (or possibly "armeabi" if it's a really old / low-end device)
86 :86
MIPS :MIPS
ARM :arm64-V8A
ARM: "arm64-v8a"
86 :x86_64的
MIPS :MIPS64
这篇关于Android的os.arch输出ARM,MIPS,X86?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!