Android:运行 armeabi 仅限 Intel 设备上的应用程序
Android: running armeabi only apps on Intel devices
我正在测试包含一些本机库的应用程序。
到目前为止,这些库仅针对 armeabi arch 提供。
用于测试目的的设备是 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:
Is it because of some kind of ARM emulation?
是的。它被称为libhoudini
。引用 myself:
libhoudini
is a proprietary ARM translation layer for x86-powered Android devices. It allows an app that has NDK binaries for ARM, but not x86, to still run on x86 hardware, albeit not as quickly as it would with native x86 binaries.
请注意,libhoudini
仅适用于 NDK。纯粹基于 Java 的应用程序应该可以在任何受支持的 CPU 架构上正常运行。
Is this emulation the case for all Intel Android devices?
"All" 是一个强词。我会对冲并说 "most Intel-powered Android devices from major manufacturers".
我正在测试包含一些本机库的应用程序。 到目前为止,这些库仅针对 armeabi arch 提供。 用于测试目的的设备是 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:
Is it because of some kind of ARM emulation?
是的。它被称为libhoudini
。引用 myself:
libhoudini
is a proprietary ARM translation layer for x86-powered Android devices. It allows an app that has NDK binaries for ARM, but not x86, to still run on x86 hardware, albeit not as quickly as it would with native x86 binaries.
请注意,libhoudini
仅适用于 NDK。纯粹基于 Java 的应用程序应该可以在任何受支持的 CPU 架构上正常运行。
Is this emulation the case for all Intel Android devices?
"All" 是一个强词。我会对冲并说 "most Intel-powered Android devices from major manufacturers".