Hello Friends, Today i am going to talk about how to speed up your emulator using Hardware Accelerator.
Up till now i always simply runs the application in emulator and it always takes 4-5 mints to run any application and i did not think why its taking too much time.
This document will guide you through installing the Intel® Hardware Accelerated Execution Manager (Intel® HAXM), a hardware-assisted virtualization engine (hypervisor) that uses Intel® Virtualization Technology (VT) to speed up Android* development.
Intel HAXM requires the Android* SDK to be installed (version 17 or higher). For more information, refer to the Android* developer website (http://developer.android.com/sdk/).
Up till now i always simply runs the application in emulator and it always takes 4-5 mints to run any application and i did not think why its taking too much time.
So for every one that develops for Android and going nuts for waiting a couple of second
for every action you make on the emulator I am totally recommending to spend 15 minutes, and go through this article.
First, find out if your machine support Hardware Acceleration and install the manager in order
to the get rid of this annoying problem.
But now i have became really interested to know is there really a big difference between
an accelerated machine and one that is not, because every single person who develops for
Android know how slow is the emulator. So ,here i am going to show you.
Prerequisites
System Requirements
Hardware Requirements:
- Intel® processor with support for VT-x, EM64T, and Execute Disable (XD) Bit functionality
- At least 1 GB of available RAM
Supported Operating Systems:
- Microsoft Windows* 8 (32/64-bit)
- Microsoft Windows* 7 (32/64-bit)
- Microsoft Windows Vista* (32/64-bit)
- Microsoft Windows* XP SP2 (32-bit only)
Note: Intel HAXM cannot be used on systems without an Intel processor, or with an Intel processor that lacks the hardware features described in the "Hardware Requirements" section above.
To determine the capabilities of your Intel processor, visit http://ark.intel.com/
Additionally, Intel HAXM can be used only with Android* x86 emulator images provided by Intel.
Intel HAXM cannot be used with ARM* Android* emulator images or non-Intel x86 Android* emulator images.
Downloading Intel® HAXM
Overview
Intel HAXM can be installed either through the Android* SDK Manager (recommended), or manually, by downloading the installer from Intel’s website.
Note: Intel HAXM does not currently check for updates automatically. To get the latest version, download the Intel HAXM package using the Android* SDK Manager (recommended) or from the Intel® Developer Zone Android* developer site.
Downloading through Android* SDK Manager
- Start the Android* SDK Manager.
- Under Extras, check the box next to "Intel x86 Emulator Accelerator (HAXM)."
3. Click the "Install package…" button.
4. Review the Intel Corporation license agreement. If you accept the terms, select Accept and click Install.
5. The SDK Manager will download the installer to the "extras" directory, under the main SDK directory. Even though the SDK manager says "Installed" it actually means that the Intel HAXM executable was downloaded. You will still need to run the installer from the "extras" directory to get it installed.
6. Extract the installer inside the "extras" directory and follow the installation instructions for your platform.
Installing Intel® HAXM on Windows*
Warning: Intel HAXM installation will fail if your system does not meet the system requirements, including support for Intel processor features, such as Intel Virtualization Technology (VT).
- Download the installer package from http://software.intel.com/en-us/android or using the SDK manager.
- Run the installer (and accept the UAC prompt, if applicable).
- If an older version Intel HAXM is already installed, you will see a notification dialog:
Click "Yes" to upgrade Intel HAXM, or click "No" to exit the installation and keep the currently installed version of Intel HAXM. And follow each steps of installation.
After successfull installation to verify that Intel HAXM is running, open a Command Prompt window and execute the following command:
sc query intelhaxm
If Intel HAXM is working, the command will show a status message indicating that the state is: "4 RUNNING".
To stop or start Intel HAXM, use these commands:
Stop: sc stop intelhaxm
Stop: sc stop intelhaxm
Start: sc start intelhaxm
Tips and Tricks
Below are some recommendations to get the best experience out of the Android* emulator using the Intel HAXM driver.
- Enable the GPU acceleration in the AVD Manager for your image. The HAXM driver executes most CPU instructions natively through Intel Virtualization Technology in the processor and the GPU acceleration offloads the OpenGL* calls to the host GPU.
- Launch the emulator from the command line to get more verbose output.
- Use the following command to launch the emulator:
emulator-x86 –avd <avd name> -partition-size 1024 –gpu on -verbose
- A partition-size of 1024 allows 1 GB of apps to be installed. This is different from the SDCard size option in the AVD manager, which specifies how much storage for storing Media files is allotted inside of the emulator. Setting the GPU to on will provide better graphics performance.
- Use the following command to launch the emulator:
- Make sure the "Path" environment variable to the GPU emulation libraries is set either in Control Panel > System > Advanced System Settings > Environment Variables or set it manually each time a new command prompt is launched. Setting it manually is recommended if you are using multiple SDK installs. The <sdk install location> below typically refers to "c:\Users\<your username>\android-sdk"
set PATH=%PATH%;<sdk install location>\tools\lib
- When installing Intel HAXM, set the driver to use half of the available RAM in the system. For example, if your system has 6 gigs of installed memory then use 3 gigs for the Intel HAXM driver. This allows a good balance of memory for the HAXM driver as compared to the system memory.
- When creating the image it is not recommended to set the “Device ram size” larger than 1024MB.
- Sometimes, when booting an image for the first time, it will appear to be hung at the boot screen. The boot process is completed but the home screen is not being shown. Click on the home button on the emulator to show the home screen.
- If performance issues are seen on Windows 8 it is recommended to disable Hyper-V.
- More command line options for booting the emulator are located at the Android* developer website.
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing download android emulator for windows 10
ReplyDelete