You can now enable the Quick Boot option for Android Emulator. That will save the emulator state, and it will start the emulator quickly on the next boot.
Click on the Emulator edit button, then click Show Advanced Setting. Then enable Quick Boot like the below screenshot.
(or later) has a feature that allows you to save the state of the AVD (emulator), and you can start your emulator instantly. You have to enable this feature while creating a new AVD or you can just create it later by editing the AVD.
Also, I have increased the
Device RAM Size to
1024 which results in a very fast emulator.
Refer to the given below screenshots for more information.
Creating a new AVD with the save snapshot feature.
Launching the emulator from the snapshot.
Using an SSD hard drive has too much impact and I recommend using a more suitable ram (8 or higher).
IMPORTANT NOTE: Please first refer to the Intel list about VT to make sure your CPU supports Intel VT.
HAXM Speeds Up the Slow Android Emulator
HAXM stands for – “Intel Hardware Accelerated Execution Manager”
Currently, it supports only Intel® VT (Intel Virtualization Technology).
The Android emulator is based on QEMU. The interface between QEMU and the HAXM driver on the host system is designed to be vendor-agnostic.
Steps for Configuring Your Android Development Environment for HAXM
- Update Eclipse: Make sure your Eclipse installation and the ADT plug-in are fully up-to-date.
- Update your Android Tools: After each Eclipse plug-in update, it is important to update your Android SDK Tools. To do this, launch the Android SDK Manager and update all the Android SDK components. To take advantage of HAXM, you must be on at least release version 17.
- Download the x86 Atom System Images and the Intel Hardware Accelerated Execution Manager Driver. Follow the image below:
- Install the HAXM Driver by running “IntelHaxm.exe”. It will be located in one of the following locations:
C:\Users\<user>\adt-bundle-windows-x86_64\sdk\extras\intel\Hardware_Accelerated_Execution_ManagerIf the installer fails with the message that Intel VT must be turned on, you need to enable this in the BIOS. See the description for how to do this in Enabling Intel VT (Virtualization Technology) .
- Create a new x86 AVD: Follow the image below:
- Or as for new SDK,
How to supercharge the slow Android emulator?- Answer #3:
Try Android x86. It’s much faster than the Google Android emulator. Follow these steps:
- Install VirtualBox.
- Download the ISO file that you need.
- Create a virtual machine as Linux 2.6/Other Linux, 512 MB RAM, HD 2 GB. Network: PCnet-Fast III, attached to NAT. You can also use a bridged adapter, but you need a DHCP server in your environment.
- Install Android x86 on the emulator, run it.
- Press Alt+F1, type
netcfg, remember the IP address, press Alt+F7.
- Run cmd on your Windows XP system, change the directory to your Android tools directory, type
adb connect <virtual_machine_IP>.
- Start Eclipse, open the ADT plugin, find the device, and enjoy!
Method to make android emulator faster- Answer #4:
GPU emulation (sometimes referred to as GPU acceleration) is where the emulator utilizes the host machine’s GPU to accelerate drawing options. This can make the emulator run much faster.
GPU Emulation is turned off by default, so you need to enable it whenever you launch an AVD. Although ‘Use Host GPU’ used to appear in the AVD Manager, this option isn’t currently available in Android Studio, but the good news is you can still enable GPU emulation if you launch an AVD from the command line.
To launch your AVD with GPU emulation enabled, create the AVD you want to use as normal. In this example, I’m going to create an imaginatively-named
Open your Mac’s Terminal (or Command Prompt, if you’re a Windows user) and then ‘change directory’ so the Terminal is pointing at Android SDK’s ‘Tools’ folder. My command looks like this:
Next, launch the emulator you created (myemulator) with the
-gpu on flag, for example:
./emulator @myemulator -gpu on
The AVD will launch with graphics acceleration enabled. Spend some time interacting with the AVD, and you should notice a speed improvement.
- Install “Intel x86 Emulator Accelerator (HAXM)” => SDK-Manager/Extras
- Install “Intel x86 Atom System Images” => SDK-Manager/Android 2.3.3
- Go to the Android SDK root folder and navigate to extras\intel\Hardware_Accelerated_Execution_Manager. Execute file IntelHaxm.exe to install. (in Android Studio you can navigate to: Settings -> Android SDK -> SDK Tools -> Intel x86 Emulator Accelerator (HAXM installer))
- Create AVD with “Intel atom x86” CPU/ABI
- Run emulator and check in console that HAXM running (open a Command Prompt window and execute the command: sc query intelhaxm)
Also, don’t forget to install this one
P.S. during AVD creation add emulation memory: Hardware/New/Device ram size/set up value 512 or more
- Install KVM: open GOOGLE, write “kvm installation “
- Create AVD with “Intel atom x86” CPU/ABI
- Run from command line: emulator -avd avd_name -qemu -m 512 -enable-kvm
- Or run from Eclipse: Run/Run Configurations/Tab “Target” – > check Intel x86 AVD and in “Additional Emulator Command Line Options” window add: -qemu -m 512 -enable-kvm (click Run)
- In Android SDK Manager, install Intel x86 Atom System Image
- In Android SDK Manager, install Intel x86 Emulator Accelerator (HAXM)
- In finder, go to the install location of the Intel Emulator Accelerator and install IntelHAXM (open the dmg and run the installation). You can find the location by placing your mouse over the Emulator Accelerator entry in the SDK Manager.
- Create or update an AVD and specify Intel Atom x86 as the CPU.
Another explanation and solution is here:
The emulator is slow because it emulates an ARM CPU, which requires translation to Intel opcodes. This virtualization chews up the CPU.
To make the emulator faster, you have to give it more CPU. Start with a fast CPU or upgrade if you can.
Then, give the emulator more of the CPU you have:
- Disable Hyperthreading – Since the emulator doesn’t appear to utilize more than one core, hyperthreading actually reduces the amount of overall CPU time the emulator will get. Disabling HT will slow down apps that take advantage of multiple CPUs. Hyperthreading must be disabled in your BIOS.
- Make the emulator run on a CPU other than CPU 0 – This has a much smaller impact than turning off HT, but it helps some. On Windows, you can specify which CPU a process will run on. Many apps will chew up CPU 0, and by default the emulator runs on CPU 0. I change the emulator to run on the last one. Note that on OS X you cannot set affinity.
I’m seeing somewhere around a 50% improvement with these two changes in place.
To set processor affinity on Windows 7:
- Open Task Manager
- Click View All Processes (to run as administrator, otherwise you can’t set processor affinity)
- Right click on emulator.exe and choose Set Affinity…
- On the Set Affinity dialog, select just the last CPU
Note: When you change affinity in this way, it’s only changed for the lifetime of the process. Next start, you have to do it again.
Hope you learned something from this post.
Follow Programming Articles for more!