Android 英特尔的 HAXM 等效于 Windows 操作系统上的 AMD
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25263360/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Intel's HAXM equivalent for AMD on Windows OS
提问by Raj Chaudhary
Is there any equivalent of Intel's HAXM for AMD (Windows OS) or has anybody been able to hack HAXM to make it work on AMD processors (Windows OS)?
是否有任何相当于英特尔的 HAXM 用于 AMD(Windows 操作系统),或者是否有人能够破解 HAXM 使其在 AMD 处理器(Windows 操作系统)上运行?
Also, would Genymotion (http://www.genymotion.com) be significantly faster compared to the default Google APIs ARM / x86 system images provided by Google?
此外,与 Google 提供的默认 Google API ARM / x86 系统映像相比,Genymotion ( http://www.genymotion.com) 会明显更快吗?
My exact dev machine specs:
我的确切开发机器规格:
- OS: Windows 7 Ultimate
- Processor: AMD FX 8120 8 Core 2.81 GHz
- 操作系统:Windows 7 Ultimate
- 处理器:AMD FX 8120 8 核 2.81 GHz
Thanks in advance!
提前致谢!
采纳答案by Rickard
From the Android docs(March 2016):
来自Android 文档(2016 年 3 月):
Before attempting to use this type of acceleration, you should first determine if your development system's CPU supports one of the following virtualization extensions technologies:
- Intel Virtualization Technology (VT, VT-x, vmx) extensions
- AMD Virtualization (AMD-V, SVM) extensions (only supported for Linux)
The specifications from the manufacturer of your CPU should indicate if it supports virtualization extensions. If your CPU does not support one of these virtualization technologies, then you cannot use virtual machine acceleration.
Note: Virtualization extensions are typically enabled through your computer's BIOS and are frequently turned off by default. Check the documentation for your system's motherboard to find out how to enable virtualization extensions.
在尝试使用这种类型的加速之前,您应该首先确定您的开发系统的 CPU 是否支持以下虚拟化扩展技术之一:
- Intel 虚拟化技术(VT、VT-x、vmx)扩展
- AMD 虚拟化(AMD-V、SVM)扩展(仅支持 Linux)
CPU 制造商的规格应指明它是否支持虚拟化扩展。如果您的 CPU 不支持这些虚拟化技术之一,那么您将无法使用虚拟机加速。
注意:虚拟化扩展通常通过计算机的 BIOS 启用,默认情况下经常关闭。查看系统主板的文档以了解如何启用虚拟化扩展。
Most people talk about Genymotion being faster, and I have never heard anyone say it's slower. I definitely think it's faster, and it will be worth the ~20 minutes it will take to set up just to try it.
大多数人都说 Genymotion 更快,但我从未听过有人说它更慢。我绝对认为它更快,并且值得花大约 20 分钟的时间进行设置来尝试它。
回答by WinningAddicted
Posting a new answer since it is 2019.
自 2019 年以来发布新答案。
TLDR: AMD is now supported on both Windows and Linux via WHPX and yes, Genymotion is faster as it is using x86 architecture virtualization.
TLDR:AMD 现在通过 WHPX 支持 Windows 和 Linux,是的,Genymotion 速度更快,因为它使用 x86 架构虚拟化。
From the Android docs(January 2019):
来自 Android文档(2019 年 1 月):
Though we recommend using HAXM on Windows, it is possible to use Windows Hypervisor Platform (WHPX) with the emulator. You should use WHPX with the emulator if you are using an AMD CPUor if you need to use Hyper-V at the same time.
To use WHPX acceleration on Windows, you must enable the Windows Hypervisor Platform option in the Turn Windows features on or off dialog box. For changes to this option to take effect, restart your computer.
Additionally, the following changes must be made in the BIOS settings:
Intel CPU: VT-x must be enabled. AMD CPU: Virtualization or SVM must be enabled.
尽管我们建议在 Windows 上使用 HAXM,但也可以将 Windows 管理程序平台 (WHPX) 与模拟器一起使用。如果您使用的是 AMD CPU或需要同时使用 Hyper-V,则应将 WHPX 与模拟器一起使用。
要在 Windows 上使用 WHPX 加速,您必须在打开或关闭 Windows 功能对话框中启用 Windows 管理程序平台选项。要使对此选项的更改生效,请重新启动计算机。
此外,必须在 BIOS 设置中进行以下更改:
Intel CPU:必须启用 VT-x。AMD CPU:必须启用虚拟化或 SVM。
Diff from 2016:
与 2016 年的差异:
Virtualization extension requirements
Before attempting to use acceleration, you should first determine if your CPU supports one of the following virtualization extensions technologies:
- Intel Virtualization Technology (VT, VT-x, vmx) extensions
- AMD Virtualization (AMD-V, SVM) extensions
(only supported for Linux)Most modern computers do. If you use an older computer and you're not sure, consult the specifications from the manufacturer of your CPU to determine if it supports virtualization extensions. If your CPU doesn't support one of these virtualization technologies, then you can't use VM acceleration.
Virtualization extensions are typically enabled through your computer BIOS and are frequently turned off by default. Check the documentation for your motherboard to find out how to enable virtualization extensions.
虚拟化扩展要求
在尝试使用加速之前,您应该首先确定您的 CPU 是否支持以下虚拟化扩展技术之一:
- Intel 虚拟化技术(VT、VT-x、vmx)扩展
- AMD 虚拟化(AMD-V、SVM)扩展
(仅支持 Linux)大多数现代计算机都可以。如果您使用的是较旧的计算机并且不确定,请咨询 CPU 制造商的规格,以确定它是否支持虚拟化扩展。如果您的 CPU 不支持这些虚拟化技术之一,那么您就不能使用 VM 加速。
虚拟化扩展通常通过您的计算机 BIOS 启用,并且在默认情况下经常关闭。查看主板的文档以了解如何启用虚拟化扩展。
回答by Lino de la Cruz
You will need to create a virtual device that runs on ARM. Virtual devices running on X86 require an Intel processor. AMD support as specified by Android is only available for Linux systems. If you want a better experience when creating your Virtual Device, use "Store a snapshot for faster startup" instead of the default "Use Host GPU".
您将需要创建一个在 ARM 上运行的虚拟设备。在 X86 上运行的虚拟设备需要 Intel 处理器。Android 指定的 AMD 支持仅适用于 Linux 系统。如果您想在创建虚拟设备时获得更好的体验,请使用“存储快照以加快启动速度”而不是默认的“使用主机 GPU”。
回答by Armando
https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html
https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html
Important
重要的
If you have an AMD processor in your computer you need the following setup requirements to be in place: AMD Processor - Recommended: AMD? Ryzen? processors Android Studio 3.2 Beta or higher - download via Android Studio Preview page Android Emulator v27.3.8+ - download via Android Studio SDK Manager x86 Android Virtual Device (AVD) - Create AVD Windows 10 with April 2018 Update Enable via Windows Features: "Windows Hypervisor Platform"
如果您的计算机中有 AMD 处理器,则需要满足以下设置要求: AMD 处理器 - 推荐:AMD?锐龙?处理器 Android Studio 3.2 Beta 或更高版本 - 通过 Android Studio Preview 页面下载 Android Emulator v27.3.8+ - 通过 Android Studio SDK Manager 下载 x86 Android Virtual Device (AVD) - 使用 2018 年 4 月更新创建 AVD Windows 10 功能:“Windows管理程序平台”
回答by ThatOneGuy
Buying a new processor is one solution, but for some of us that means buying other components as well. Alternatively you could just buy an Android phone that supports your lowest target API level and run your apps off the phone. You can find some of those phones on Amazon, Ebay, craigslist for pennies (sometimes). Plus this grants you the benefit of actually running on the minimum hardware you intend to support. While this may be a bit slower than installing your app on an emulated system, it will probably save you money.
购买新处理器是一种解决方案,但对于我们中的一些人来说,这意味着还要购买其他组件。或者,您可以购买支持最低目标 API 级别的 Android 手机,然后在手机上运行您的应用程序。您可以在亚马逊、Ebay、craigslist 上找到其中一些手机(有时)。此外,这使您能够在您打算支持的最低硬件上实际运行。虽然这可能比在模拟系统上安装您的应用程序慢一点,但它可能会为您省钱。
Android, device testing/debugging link: http://developer.android.com/tools/device.html
Android,设备测试/调试链接:http: //developer.android.com/tools/device.html
回答by many
hello to run the avd manager on AMD processor you need update your SDK MANAGER in Android Studio: https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html
您好,在 AMD 处理器上运行 avd 管理器,您需要在 Android Studio 中更新您的 SDK MANAGER:https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html
You go to tools->SDK MANAGER->SDK Tools
你去工具->SDK MANAGER->SDK 工具
then look for Android Emulator and Android Emulator Hypervisor Driver for AMD Processors
然后寻找适用于 AMD 处理器的 Android Emulator 和 Android Emulator Hypervisor Driver
check the boxes and click apply or OK
选中复选框并单击应用或确定
回答by James Nelson
This limitation (of Windows) should be publicly announced!The issue for me is the combination of the following: Windows 10 + AMD CPU (with AMD-V/SMV) +/- Hyper Visor
这个(Windows 的)限制应该公开宣布!我的问题是以下组合:Windows 10 + AMD CPU(带有 AMD-V/SMV)+/- Hyper Visor
I have no issues running: Intel (with VT-x) + Linux or AMD (with AMD-V) + Linux
我在运行时没有问题:Intel(使用 VT-x)+ Linux 或 AMD(使用 AMD-V)+ Linux
Link to Android studio issue here:
此处链接到 Android Studio 问题:
https://developer.android.com/studio/run/emulator.html#accel-vm
https://developer.android.com/studio/run/emulator.html#accel-vm
Xamarin/Visual Studio seems to have a workaround, but I haven't tested it yet:
Xamarin/Visual Studio 似乎有一个解决方法,但我还没有测试过:
If you need to use Hyper-V for other emulators then I'd recommend using the Microsoft Android Emulator instead, which uses Hyper-V and can also be used with Xamarin Studio/Visual Studio. You can download it for free from here.
如果您需要将 Hyper-V 用于其他模拟器,那么我建议您改用 Microsoft Android 模拟器,它使用 Hyper-V,也可以与 Xamarin Studio/Visual Studio 一起使用。您可以从这里免费下载。
I will update this after I confirm it works. Wish I would have known this before purchasing a new machine.
我会在确认它有效后更新它。希望我在购买新机器之前就知道这一点。
UPDATE!! It does not work "Requires Intel ..." error message is shown
更新!!它不起作用 "Requires Intel ..." 显示错误消息
Final note:
最后说明:
*Must be revision F3 or grater or must be F2 with BIOS support. Presence or absence of SVM Disable or other virtualization options in the bios does not ensure presence of BIOS support. You should contact the OEM to ensure support of Hyper-V.
*Some AMD BIOS's have options to enable/disable SVM (virtualization assistance)
*Some BIOS's list this as SVM Disable and it's a double negative, i.e. you want to disable SVM disable to enable SVM.
*Some BIOS's list this as Secure Virtualization, thus enabling Secure Virtualization will enable SVM
*Must have No-Execute enabled in the BIOS, sometime this is referred to as NX or Execute Disable
*If you want to find CPU's that are F3 see AMD's guide http://products.amd.com/en-us/DesktopCPUFilter.aspxor http://products.amd.com/en-us/OpteronCPUFilter.aspx?f1=Second-Generation+AMD+Opteron%e2%84%a2
*必须是修订版 F3 或更高版本,或者必须是具有 BIOS 支持的 F2。bios 中是否存在 SVM 禁用或其他虚拟化选项并不能确保存在 BIOS 支持。您应该联系 OEM 以确保支持 Hyper-V。
*某些 AMD BIOS 具有启用/禁用 SVM(虚拟化辅助)的选项
*某些 BIOS 将此列为 SVM 禁用,这是双重否定,即您要禁用 SVM 禁用以启用 SVM。
*某些 BIOS 将此列为安全虚拟化,因此启用安全虚拟化将启用 SVM
*必须在 BIOS 中启用 No-Execute,有时这被称为 NX 或 Execute Disable
*如果您想找到 F3 的 CPU,请参阅 AMD 的指南http://products.amd.com/en-us/DesktopCPUFilter.aspx或 http://products.amd.com/en-us/OpteronCPUFilter.aspx?f1 =第二代+AMD+皓龙%e2%84%a2
回答by Hedron Dantas
On my Mobo (ASRock A320M-HD with Ryzen 3 2200G) I have to:
在我的主板(华擎 A320M-HD 和 Ryzen 3 2200G)上,我必须:
SR-IOV support: enabled
IOMMU: enabled
SVM: enabled
On the OS enable Hyper V.
在操作系统上启用 Hyper V。
回答by mirh
Posting a new answer since it is (almost) 2020.
发布一个新答案,因为它(几乎)是 2020 年。
The Android Emulator still only supports HAXM or WHPX on windows. And you may even call it a day already with the latter.
Android 模拟器仍然只支持 Windows上的HAXM 或 WHPX 。你甚至可以称它为后者的一天。
But if you don't like it, there is now work in progress AMD-V support for the former by one of the PS4 emulator developers: https://github.com/jarveson/haxm/tree/svm
但是,如果您不喜欢它,那么 PS4 模拟器开发人员之一现在正在为前者提供 AMD-V 支持:https: //github.com/jarveson/haxm/tree/svm