【问题标题】:Android: running armeabi only apps on Intel devicesAndroid:在英特尔设备上仅运行 armeabi 应用程序
【发布时间】:2015-06-25 18:28:12
【问题描述】:

我正在测试包含一些本机库的应用程序。 到目前为止,这些库仅提供给 armeabi 架构。 用于测试的设备是Asus Zenfone 4。 它是基于 Intel 的设备,因此我预计运行该应用程序会出现问题,因为该库没有 x86 版本。

令人惊讶的是,该应用程序运行良好。问题是为什么? 是因为某种 ARM 仿真吗? 这种仿真是否适用于所有英特尔 Android 设备?

/proc/cpuinfo 包含以下内容:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 53
model name  : Intel(R) Atom(TM) CPU Z2520  @ 1.20GHz
stepping    : 1
microcode   : 0x110
cpu MHz     : 800.000
cache size  : 512 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 10
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts nonstop_tsc aperfmperf nonstop_tsc_s3 pni dtes64 monitor ds_cpl vmx est tm2 ssse3 xtpr pdcm movbe lahf_lm arat dtherm tpr_shadow vnmi flexpriority
bogomips    : 2396.16
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:

【问题讨论】:

    标签: android arm intel


    【解决方案1】:

    是因为某种 ARM 仿真吗?

    是的。它被称为libhoudini。引用myself:

    libhoudini 是用于 x86 驱动的 Android 设备的专有 ARM 转换层。它允许具有 ARM 的 NDK 二进制文件但没有 x86 的应用程序仍可在 x86 硬件上运行,尽管速度不如原生 x86 二进制文件。

    请注意,libhoudini 仅对 NDK 起作用。纯基于 Java 的应用程序应该可以在任何受支持的 CPU 架构上正常运行。

    这种模拟是否适用于所有英特尔 Android 设备?

    “全部”是一个强词。我会说“主要制造商的大多数采用英特尔技术的 Android 设备”。

    【讨论】:

    • 非常感谢。您知道任何不包含此仿真的英特尔设备吗?
    • @aguyngueran:真正的旧设备,例如第一代 Google TV 设备,不会。我的舰队中的每台现代 x86 设备都有它,AFAICT。我之所以对通用性进行避险是因为我不知道libhoudini 的许可条款是什么,因此可能有设备制造商选择跳过它以节省成本。
    猜你喜欢
    • 2013-06-30
    • 2013-09-01
    • 1970-01-01
    • 2023-03-14
    • 1970-01-01
    • 1970-01-01
    • 2015-07-27
    • 2020-11-27
    • 1970-01-01
    相关资源
    最近更新 更多