适用于 ARM、MIPS、x86 的 Android os.arch 输出? [英] Android os.arch output for ARM, MIPS, x86?

查看:39
本文介绍了适用于 ARM、MIPS、x86 的 Android os.arch 输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了识别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

most ARM devices respond: os.arch: armv7l

x86 模拟器响应:os.arch: i686

真实 Intel 和 MIPS 设备的输出是什么?

What are the outputs of this for real Intel and MIPS devices?

x86 Android 设备:??????

x86 Android device: ??????

mips Android 设备:??????

mips Android device: ??????

还有其他平台和变体吗?

Any other platforms and variants?

针对 Google TV 进行

EDIT for Google TV:

Google TV 似乎对 Build 代码使用了none".

It looks like Google TV uses 'none' for Build code.

Vizio Co-Star: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 代码的预期输出很有趣,但设备制造商(如上面的旧 Google TV 设备)可能会偏离提供 AOSP 代码的预期输出.

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 通过构建类)应该具有以下架构到价值的映射:

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)

x86:x86"

MIPS:mips"

ARM:arm64-v8a"

ARM: "arm64-v8a"

x86:x86_64"

MIPS:mips64"

这篇关于适用于 ARM、MIPS、x86 的 Android os.arch 输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆