- Android Emulator Intel Haxm Mac Free
- Android Emulator Intel Haxm Mac Os
- Android Emulator Intel Haxm Mac Pro
- Android Emulator Intel Haxm Mac Download
The steps to accelerate the Android emulator for Linux are different than for Windows and Mac OS X as Intel HAXM is not compatible with Linux so you would need to use KVM (kernel-based virtual machine) instead. The steps below were carried out using Ubuntu. 12.04 and may differ slightly with other Linux distributions. If the Hypervisor Framework is not supported by your Mac, you can use HAXM to accelerate the Android emulator (described next). Accelerating with HAXM If your Mac does not support the Hypervisor framework (or you are using a version of macOS earlier than 10.10), you can use Intel's Hardware Accelerated Execution Manager ( HAXM ) to speed up the.
-->This article explains how to use your computer's hardware accelerationfeatures to maximize Android Emulator performance.
Visual Studio makes it easier for developers to test and debug theirXamarin.Android applications by using the Android emulator insituations where an Android device is unavailable or impractical.However, the Android emulator runs too slowly if hardware accelerationis not available on the computer that runs it. You can drasticallyimprove the performance of the Android emulator by using special x86virtual device images in conjunction with the virtualization featuresof your computer.
Scenario | HAXM | WHPX | Hypervisor.Framework |
---|---|---|---|
You have an Intel Processor | X | X | X |
You have an AMD Processor | X | ||
You want to support Hyper-V | X | ||
You want to support nested Virtualization | Limited | ||
You want to use technologies like Docker | X | X |
Accelerating Android emulators on Windows
The following virtualization technologies are available foraccelerating the Android emulator:
Microsoft's Hyper-V and the Windows Hypervisor Platform (WHPX).Hyper-Vis a virtualization feature of Windows that makes it possible to runvirtualized computer systems on a physical host computer.
Intel's Hardware Accelerated Execution Manager (HAXM).HAXM is a virtualization engine for computers running Intel CPUs.
For the best experience on Windows, it is recommended that you use WHPX toaccelerate the Android emulator. If WHPX is not available on yourcomputer, then HAXM can be used. The Android emulator willautomatically make use of hardware acceleration if the followingcriteria are met:
Hardware acceleration is available and enabled on your developmentcomputer.
The emulator is running a system image created foran x86-based virtual device.
Important
You can't run a VM-accelerated emulator inside another VM, such asa VM hosted by VirtualBox, VMware, or Docker. You must run the Androidemulator directly on your system hardware.
For information about launching and debugging with the Androidemulator, seeDebugging on the Android Emulator.
Accelerating with Hyper-V
Before enabling Hyper-V, read the following section to verifythat your computer supports Hyper-V.
Verifying support for Hyper-V
Hyper-V runs on the Windows Hypervisor Platform. To use the Androidemulator with Hyper-V, your computer must meet the following criteriato support the Windows Hypervisor Platform:
Your computer hardware must meet the following requirements:
- A 64-bit Intel or AMD Ryzen CPU with Second Level Address Translation (SLAT).
- CPU support for VM Monitor Mode Extension (VT-c on Intel CPUs).
- Minimum of 4-GB memory.
In your computer's BIOS, the following items must be enabled:
- Virtualization Technology (may have a different label depending on motherboard manufacturer).
- Hardware Enforced Data Execution Prevention.
Your computer must be updated to Windows 10 April 2018 update(build 1803) or later. You can verify that your Windows versionis up-to-date by using the following steps:
Enter About in the Windows search box.
Select About your PC in the search results.
Scroll down in the About dialog to the Windows specificationssection.
Verify that the Version is at least 1803:
To verify that your computer hardware and software is compatible withHyper-V, open a command prompt and type the following command:
If all listed Hyper-V requirements have a value of Yes, then yourcomputer can support Hyper-V. For example:
Enabling Hyper-V acceleration
If your computer meets the above criteria, use the following stepsto accelerate the Android emulator with Hyper-V:
Enter windows features in the Windows search box and selectTurn Windows features on or off in the search results. In theWindows Features dialog, enable both Hyper-V and WindowsHypervisor Platform:
After making these changes, reboot your computer.
Important
On Windows 10 October 2018 Update (RS5) and higher, youonly need to enable Hyper-V, as it will useWindows Hypervisor Platform (WHPX) automatically.
Install Visual Studio 15.8 or later(this version of Visual Studio provides IDE support forrunning the Android emulator with Hyper-V).
Install the Android Emulator package 27.2.7 or later. Toinstall this package, navigate to Tools > Android > Android SDKManager in Visual Studio. Select the Tools tab and ensure thatthe Android emulator version is at least 27.2.7. Also ensure thatthe Android SDK Tools version is 26.1.1 or later:
When you create a virtual device (seeManaging Virtual Devices with the Android Device Manager),be sure to select an x86-based system image. If you use an ARM-based system image,the virtual device will not be accelerated and will run slowly.
Hyper-V should now be enabled and you can run your accelerated Android emulator.
Accelerating with HAXM
If your computerdoes not support Hyper-V, you may use HAXM to accelerate the Android emulator. You mustdisable Device Guardif you want to use HAXM.
Verifying HAXM support
To determine if your hardware supports HAXM, follow the steps inDoes My Processor Support Intel Virtualization Technology?.If your hardware supports HAXM,you can check to see if HAXM is already installed by using thefollowing steps:
Open a command prompt window and enter the following command:
Examine the output to see if the HAXM process is running. if it is,you should see output listing the
intelhaxm
state asRUNNING
. Forexample:If
STATE
is not set toRUNNING
, then HAXM is not installed.
If your computer can support HAXM but HAXM is not installed, use thesteps in the next section to install HAXM.
Installing HAXM
HAXM install packages for Windows are available from theIntel Hardware Accelerated Execution Manager GitHub releasespage. Use the following steps to download and install HAXM:
From the Intel website, download the latestHAXM virtualization engineinstaller for Windows. The advantage of downloading the HAXMinstaller directly from the Intel website is that you can be assuredof using the latest version.
Run intelhaxm-android.exe to start the HAXM installer. Acceptthe default values in the installer dialogs:
When you create a virtual device (seeManaging Virtual Devices with the Android Device Manager),be sure to select an x86-based system image. If you use an ARM-based system image,the virtual device will not be accelerated and will run slowly.
Troubleshooting
For help with troubleshooting hardware acceleration issues, see theAndroid emulatorTroubleshootingguide.
Accelerating Android emulators on macOS
The following virtualization technologies are available foraccelerating the Android emulator:
Apple's Hypervisor Framework.Hypervisoris a feature of macOS 10.10 and later that makes it possible to runvirtual machines on a Mac.
Intel's Hardware Accelerated Execution Manager (HAXM).HAXMis a virtualization engine for computers running Intel CPUs.
It is recommended that you use the HypervisorFramework to accelerate the Android emulator. If the HypervisorFramework is not available on your Mac, then HAXM can be used. TheAndroid emulator will automatically make use of hardware accelerationif the following criteria are met:
Hardware acceleration is available and enabled on the developmentcomputer.
The emulator is running a system image created foran x86-based virtual device.
Important
You can't run a VM-accelerated emulator inside another VM,such as a VM hosted by VirtualBox, VMware, or Docker. Youmust run the Android emulatordirectly on your system hardware.
For information about launching and debugging with the Androidemulator, seeDebugging on the Android Emulator.
Accelerating with the Hypervisor Framework
To use the Android emulator with the Hypervisor Framework, your Mac mustmeet the following criteria:
Your Mac must be running macOS 10.10 or later.
Your Mac's CPU must be able to support the Hypervisor Framework.
If your Mac meets these criteria, the Android emulator willautomatically use the Hypervisor Framework for acceleration. If you are not sure if Hypervisor Frameworkis supported on your Mac, see theTroubleshootingguide for ways to verify that your Mac supports Hypervisor.
If the Hypervisor Framework is not supported by your Mac, you can useHAXM to accelerate the Android emulator (described next).
Accelerating with HAXM
If your Mac does not support the Hypervisor framework (or you are usinga version of macOS earlier than 10.10), you can use Intel's HardwareAccelerated Execution Manager(HAXM)to speed up the Android emulator.
Before using the Android emulator with HAXM for the first time, it's agood idea to verify that HAXM is installed and available for theAndroid emulator to use.
Verifying HAXM support
You can check to see if HAXM is already installed by usingthe following steps:
Open a Terminal and enter the following command:
This command assumes that the Android SDK is installed at thedefault location of ~/Library/Developer/Xamarin/android-sdk-macosx;if not, modify the above path forthe location of the Android SDK on your Mac.
If HAXM is installed, the above command willreturn a message similar to the following result:
If HAXM is not installed, a message similar tothe following output is returned:
If HAXM is not installed, use the steps in the next section toinstall HAXM.
Installing HAXM
HAXM installation packages for macOS are available from theIntel Hardware Accelerated Execution Managerpage. Use the following steps to download and install HAXM:
From the Intel website, download the latestHAXM virtualization engineinstaller for macOS.
Run the HAXM installer. Accept the default values in the installer dialogs:
Troubleshooting
For help with troubleshooting hardware acceleration issues, see theAndroid emulatorTroubleshootingguide.
Related Links
-->This article describes the most common warning messages and issuesthat occur while configuring and running the Android Emulator. Inaddition, it describes solutions for resolving these errors as well asvarious troubleshooting tips to help you diagnose emulator problems.
Deployment issues on Windows
Some error messages may be displayed by the emulator when you deployyour app. The most common errors and solutions are explained here.
Deployment errors
If you see an error about a failure to install the APK on the emulatoror a failure to run the Android Debug Bridge (adb), verify that theAndroid SDK can connect to your emulator. To verify emulatorconnectivity, use the following steps:
Launch the emulator from the Android Device Manager (selectyour virtual device and click Start).
Open a command prompt and go to the folder where adb isinstalled. If the Android SDK is installed at its default location,adb is located atC:Program Files (x86)Androidandroid-sdkplatform-toolsadb.exe;if not, modify this path for the location of the Android SDK on yourcomputer.
Type the following command:
If the emulator is accessible from the Android SDK, the emulatorshould appear in the list of attached devices. For example:
If the emulator does not appear in this list, start the AndroidSDK Manager, apply all updates, then try launching theemulator again.
MMIO access error
If the message An MMIO access error has occurred is displayed,restart the emulator.
Missing Google Play Services
If the virtual device you are running in the emulator does not haveGoogle Play Services or Google Play Store installed, this condition isoften caused by creating a virtual device without including thesepackages. When you create a virtual device (seeManaging Virtual Devices with the Android Device Manager),be sure to select one or both of the following options:
- Google APIs – includes Google Play Services in the virtual device.
- Google Play Store – includes Google Play Store in the virtual device.
For example, this virtual device will include Google Play Services and Google Play Store:
Note
Google Play Store images are available only for some base device types suchas Pixel, Pixel 2, Nexus 5, and Nexus 5X.
Performance issues
Performance issues are typically caused by one of the following problems:
The emulator is running without hardware acceleration.
The virtual device running in the emulator is not using an x86-based system image.
The following sections cover these scenarios in more detail.
Hardware acceleration is not enabled
If hardware acceleration is not enabled, starting a virtual device fromthe Device Manager will produce a dialog with an error messageindicating that the Windows Hypervisor Platform (WHPX) is notconfigured properly:
If this error message is displayed, seeHardware acceleration issues below for steps youcan take to verify and enable hardware acceleration.
Acceleration is enabled but the emulator runs too slowly
A common cause for this problem is not using an x86-based image in yourvirtual device (AVD). When you create a virtual device (seeManaging Virtual Devices with the Android Device Manager),be sure to select an x86-based system image:
Hardware acceleration issues
Whether you are using Hyper-V or HAXM for hardware acceleration, youmay run into configuration problems or conflicts with other software onyour computer. You can verify that hardware acceleration is enabled(and which acceleration method the emulator is using) by opening acommand prompt and entering the following command:
This command assumes that the Android SDK is installed at the defaultlocation of C:Program Files (x86)Androidandroid-sdk; if not,modify the above path for the location of the Android SDK on yourcomputer.
Hardware acceleration not available
If Hyper-V is available, a message like the following example will bereturned from the emulator-check.exe accel command:
If HAXM is available, a message like the following example will bereturned:
If hardware acceleration is not available, a message like the followingexample will be displayed (the emulator looks for HAXM if it is unableto find Hyper-V):
If hardware acceleration is not available, seeAccelerating with Hyper-Vto learn how to enable hardware acceleration on your computer.
Incorrect BIOS settings
If the BIOS has not been configured properly to support hardwareacceleration, a message similar to the following example will bedisplayed when you run the emulator-check.exe accel command:
To correct this problem, reboot into your computer's BIOS and enable thefollowing options:
- Virtualization Technology (may have a different label depending on motherboard manufacturer).
- Hardware Enforced Data Execution Prevention.
If hardware acceleration is enabled and the BIOS is configuredproperly, the emulator should run successfully with hardware acceleration.However, problems may still result due to issues that are specific toHyper-V and HAXM, as explained next.
Hyper-V issues
In some cases, enabling both Hyper-V and Windows HypervisorPlatform in the Turn Windows features on or off dialog may notproperly enable Hyper-V. To verify that Hyper-V is enabled, use thefollowing steps:
Enter powershell in the Windows search box.
Right-click Windows PowerShell in the search results and selectRun as administrator.
In the PowerShell console, enter the following command:
If Hyper-V is not enabled, a message similar to the following example will bedisplayed to indicate that the state of Hyper-V is Disabled:
In the PowerShell console, enter the following command:
If the Hypervisor is not enabled, a message similar to the following example will bedisplayed to indicate that the state of HypervisorPlatform is Disabled:
If Hyper-V and/or HypervisorPlatform are not enabled, use the followingPowerShell commands to enable them:
After these commands complete, reboot.
For more information about enabling Hyper-V (including techniques forenabling Hyper-V using the Deployment Image Servicing and Managementtool), seeInstall Hyper-V.
HAXM issues
HAXM issues are often the result of conflicts with other virtualizationtechnologies, incorrect settings, or an out-of-date HAXM driver.
HAXM process is not running
If HAXM is installed, you can verify that the HAXM process is runningby opening a command prompt and entering the following command:
If the HAXM process is running, you should see output similarto the following result:
If STATE
is not set to RUNNING
, seeHow to Use the Intel Hardware Accelerated Execution Manager to resolve the problem.
HAXM virtualization conflicts
HAXM can conflict with other technologies that use virtualization,such as Hyper-V, Windows Device Guard, and some antivirus software:
Hyper-V – If you are using a version of Windows before theWindows 10 April 2018 update (build 1803) and Hyper-V is enabled,follow the steps in Disabling Hyper-V so thatHAXM can be enabled.
Device Guard – Device Guard and Credential Guard canprevent Hyper-V from being disabled on Windows machines. To disableDevice Guard and Credential Guard, seeDisabling Device Guard.
Antivirus Software – If you are running antivirus softwarethat uses hardware-assisted virtualization (such as Avast), disableor uninstall this software, reboot, and retry the Androidemulator.
Incorrect BIOS settings
If you are using HAXM on a Windows PC, HAXM will not work unlessvirtualization technology (Intel VT-x) is enabled in the BIOS. If VT-xis disabled, you will get an error similar to the following when youattempt to start the Android Emulator:
This computer meets the requirements for HAXM, but IntelVirtualization Technology (VT-x) is not turned on.
Android Emulator Intel Haxm Mac Free
To correct this error, boot the computer into the BIOS, enable bothVT-x and SLAT (Second-Level Address Translation), then restart thecomputer back into Windows.
Disabling Hyper-V
If you are using a version of Windows before the Windows 10April 2018 Update (build 1803) and Hyper-V is enabled, you must disableHyper-V and reboot your computer to install and use HAXM. If youare using Windows 10 April 2018 Update (build 1803) or later, AndroidEmulator version 27.2.7 or later can use Hyper-V (instead of HAXM) forhardware acceleration, so it is not necessary to disable Hyper-V.
You can disable Hyper-V from the Control Panel by following thesesteps:
Android Emulator Intel Haxm Mac Os
Enter windows features in the Windowssearch box and select Turn Windows features on or off inthe search results.
Uncheck Hyper-V:
Restart the computer.
Alternately, you can use the following PowerShell command to disablethe Hyper-V Hypervisor:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
Intel HAXM and Microsoft Hyper-V cannot both be active at the sametime. Unfortunately, there is no way to switch between Hyper-Vand HAXM without restarting your computer.
In some cases, using the above steps will not succeed in disablingHyper-V if Device Guard and Credential Guard are enabled. If you areunable to disable Hyper-V (or it seems to be disabled but HAXMinstallation still fails), use the steps in the next section to disableDevice Guard and Credential Guard.
Disabling Device Guard
Device Guard and Credential Guard can prevent Hyper-V from beingdisabled on Windows machines. This situation is often a problem fordomain-joined machines that are configured and controlled by an owningorganization. On Windows 10, use the following steps to see if DeviceGuard is running:
Enter System info in the Windows search box and selectSystem Information in the search results.
In the System Summary, look to see if Device GuardVirtualization based security is present and is in the Runningstate:
If Device Guard is enabled, use the following steps to disable it:
Ensure that Hyper-V is disabled (under Turn Windows Featureson or off) as described in the previous section.
In the Windows Search Box, enter gpedit.msc and select the Editgroup policy search result. These steps launch the Local GroupPolicy Editor.
In the Local Group Policy Editor, navigate to ComputerConfiguration > Administrative Templates > System > Device Guard:
Change Turn On Virtualization Based Security to Disabled (asshown above) and exit the Local Group Policy Editor.
In the Windows Search Box, enter cmd. When Command Prompt appearsin the search results, right-click Command Prompt and selectRun as Administrator.
Copy and paste the following commands into the command prompt window(if drive Z: is in use, pick an unused drive letter to useinstead):
Restart your computer. On the boot screen, you should see a prompt similar tothe following message:
Do you want to disable Credential Guard?
Press the indicated key to disable Credential Guard as prompted.
After the computer reboots, check again to ensure that Hyper-V isdisabled (as described in the previous steps).
If Hyper-V is still not disabled, the policies of your domain-joinedcomputer may prevent you from disabling Device Guard or CredentialGuard. In this case, you can request an exemption from your domainadministrator to allow you to opt out of Credential Guard. Alternately,you can use a computer that is not domain-joined if you must use HAXM.
Additional troubleshooting tips
The following suggestions are often helpful in diagnosing Androidemulator issues.
Starting the emulator from the command line
If the emulator is not already running, you can start it from thecommand line (rather than from within Visual Studio) to view itsoutput. Typically, Android emulator AVD images are stored at thefollowing location (replace username with your Windows user name):
C:Usersusername.androidavd
You can launch the emulator with an AVD image from this location bypassing in the folder name of the AVD. For example, this command launchesan AVD named Pixel_API_27:
This example assumes that the Android SDK is installed at the defaultlocation of C:Program Files (x86)Androidandroid-sdk; if not,modify the above path for the location of the Android SDK on yourcomputer.
When you run this command, it will produce many lines of output whilethe emulator starts up. In particular, lines such as the followingexample will be printed if hardware acceleration is enabled and workingproperly (in this example, HAXM is used for hardware acceleration):
Viewing Device Manager logs
Often you can diagnose emulator problems by viewing the Device Managerlogs. These logs are written to the following location:
C:UsersusernameAppDataLocalXamarinLogs16.0
You can view each DeviceManager.log file by using a texteditor such as Notepad. The following example log entry indicates thatHAXM was not found on the computer:
Deployment issues on macOS
Some error messages may be displayed by the emulator when you deployyour app. The most common errors and solutions are explained below.
Deployment errors
If you see an error about a failure to install the APK on the emulatoror a failure to run the Android Debug Bridge (adb), verify that theAndroid SDK can connect to your emulator. To verify connectivity, usethe following steps:
Launch the emulator from the Android Device Manager (selectyour virtual device and click Start).
Open a command prompt and go to the folder where adb isinstalled. If the Android SDK is installed at its default location,adb is located at~/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/adb;if not, modify this path for the location of the Android SDK on yourcomputer.
Type the following command:
If the emulator is accessible from the Android SDK, the emulatorshould appear in the list of attached devices. For example:
If the emulator does not appear in this list, start the AndroidSDK Manager, apply all updates, then try launching theemulator again.
MMIO access error
If An MMIO access error has occurred is displayed,restart the emulator.
Missing Google Play Services
If the virtual device you are running in the emulator does not haveGoogle Play Services or Google Play Store installed, this condition isusually caused by creating a virtual device without including thesepackages. When you create a virtual device (seeManaging Virtual Devices with the Android Device Manager),be sure to select one or both of the following:
- Google APIs – includes Google Play Services in the virtual device.
- Google Play Store – includes Google Play Store in the virtual device.
For example, this virtual device will include Google Play Services and Google Play Store:
Note
Google Play Store images are available only for some base device types suchas Pixel, Pixel 2, Nexus 5, and Nexus 5X.
Performance issues
Performance issues are typically caused by one of the following problems:
Android Emulator Intel Haxm Mac Pro
The emulator is running without hardware acceleration.
The virtual device running in the emulator is not using an x86-based system image.
The following sections cover these scenarios in more detail.
Hardware acceleration is not enabled
If hardware acceleration is not enabled, a dialog may pop up with amessage such as device will run unaccelerated when you deploy yourapp to the Android emulator. If you are not certain whether hardwareacceleration is enabled on your computer (or you would like to knowwhich technology is providing the acceleration), seeHardware acceleration issues below for steps you cantake to verify and enable hardware acceleration.
Acceleration is enabled but the emulator runs too slowly
A common cause for this problem is not using an x86-based image in yourvirtual device. When you create virtual device (seeManaging Virtual Devices with the Android Device Manager),be sure to select an x86-based system image:
Hardware acceleration issues
Whether you are using the Hypervisor Framework or HAXM for hardwareacceleration of the emulator, you may run into problems caused byinstallation issues or an out-of-date version of macOS. The followingsections can help you resolve this issue.
Hypervisor Framework issues
Android Emulator Intel Haxm Mac Download
If you are using macOS 10.10 or later on a newer Mac, the Androidemulator will automatically use the Hypervisor Framework for hardwareacceleration. However, some older Macs or Macs running a version ofmacOS earlier than 10.10 may not provide Hypervisor Framework support.
To determine whether or not your Mac supports the Hypervisor Framework,open a Terminal and enter the following command:
If your Mac supports the Hypervisor Framework, the above command willreturn the following result:
If the Hypervisor Framework is not available on your Mac, you canfollow the steps in Accelerating with HAXMto use HAXM for acceleration instead.
HAXM issues
If the Android Emulator does not start properly, this problem is oftencaused by problems with HAXM. HAXM issues are often the result ofconflicts with other virtualization technologies, incorrect settings,or an out-of-date HAXM driver. Try reinstalling the HAXM driver, usingthe steps detailed inInstalling HAXM.
Additional troubleshooting tips
The following suggestions are often helpful in diagnosing Androidemulator issues.
Starting the emulator from the command line
If the emulator is not already running, you can start it from thecommand line (rather than from within Visual Studio for Mac) to viewits output. Typically, Android emulator AVD images are stored at thefollowing location:
~/.android/avd
You can launch the emulator with an AVD image from this location bypassing in the folder name of the AVD. For example, this commandlaunches an AVD named Pixel_2_API_28:
If the Android SDK is installed at its default location, the emulatoris located in the~/Library/Developer/Xamarin/android-sdk-macosx/emulator directory;if not, modify this path for the location of the Android SDK on yourMac.
When you run this command, it will produce many lines of output whilethe emulator starts up. In particular, lines such as the followingexample will be printed if hardware acceleration is enabled and workingproperly (in this example, Hypervisor Framework is used for hardwareacceleration):
Viewing Device Manager logs
Often you can diagnose emulator problems by viewing the Device Managerlogs. These logs are written to the following location:
~/Library/Logs/XamarinDeviceManager
You can view each Android Devices.log file by double-clicking it toopen it in the Console app. The following example log entry indicatesthat HAXM was not found: