gpt4 book ai didi

华硕 Fonepad 7 上的 Android 报告为 armeabi-v7a,即使它是 X86

转载 作者:太空狗 更新时间:2023-10-29 14:10:20 25 4
gpt4 key购买 nike

在我的应用程序中,我从 Build.CPU_ABI 检查 CPU,如果 CPU 是 X86,则要求用户下载 bundle 了 X86 库的正确包。

但今天我得到了带有 Intel CPU 的华硕 Fonepad 7,但令人惊讶的是 Build.CPU_ABIarmeabi-v7a 而不是 X86 .我在某处读到,由于许多开发人员没有在他们的应用程序中 bundle X86 native 库,因此华硕使用了 ARM-X86 转换器,因此该应用程序认为是在 Arm 设备上运行.更令人惊讶的是,即使 bundle 了 X86 库,它仍会加载 Arm 库。

我相信代码翻译会显着降低性能。那么有什么办法可以确定真正的CPU arch呢?然后强制加载 X86 库而不是 Arm?

-------- 编辑--------

当我从包中删除 armeabi-v7a 文件夹时 **Build.CPU_ABI 变成 X86,现在它加载 X86 代码。**

我检查了/proc/cpuinfo,唯一清楚的是它包含一个 Intel CPU。那么,如果 cpuinfo 中出现 intel 字样,是否可以将 CPU 视为 X86?

唯一的选择是拥有两个不同的 APK,一个用于 arm,另一个用于 X86。因为如果所有二进制文件都在同一个 APK 文件中,那么无论如何都会加载 Arm 二进制文件!

这是/proc/cpuinfo 的内容:

processor   : 0
vendor_id : GenuineIntel
cpu family : 6
model : 90
model name : Genuine Intel(R) CPU 4000 @ 1.00GHz
stepping : 0
microcode : 0x27
cpu MHz : 1833.000
cache size : 1024 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch ida arat epb dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms
bogomips : 1996.80
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 90
model name : Genuine Intel(R) CPU 4000 @ 1.00GHz
stepping : 0
microcode : 0x27
cpu MHz : 1833.000
cache size : 1024 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch ida arat epb dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms
bogomips : 1996.80
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 90
model name : Genuine Intel(R) CPU 4000 @ 1.00GHz
stepping : 0
microcode : 0x27
cpu MHz : 1833.000
cache size : 1024 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch ida arat epb dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms
bogomips : 1996.80
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 90
model name : Genuine Intel(R) CPU 4000 @ 1.00GHz
stepping : 0
microcode : 0x27
cpu MHz : 1833.000
cache size : 1024 KB
physical id : 0
siblings : 4
core id : 3
cpu cores : 4
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch ida arat epb dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms
bogomips : 1996.80
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

最佳答案

你可以阅读/proc/cpuinfo

➜  ~  adb shell
shell@android:/ $ cat /proc/cpuinfo
Processor : ARMv7 Processor rev 10 (v7l)

关于华硕 Fonepad 7 上的 Android 报告为 armeabi-v7a,即使它是 X86,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29517347/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com