Search code examples
androidandroid-emulatorhaxm

Emulator awfully slow on Windows 7


This is not a rant, and also not a duplicate of the forever "why is Android emulator so slow" problem. So, until a few weeks (maybe months) ago, emulating Android devices on my Win7 64-bit system was at the very least acceptable (x86 emulation was decently fast to be usable). However, trying to create any ("fast" "new" "2.0") emulator instances using the latest version of the SDK, platform tools, etc., is only a source of frustration and pain for several days now. I'm trying to understand if it's an issue on my side or people can actually use the latest version of the Android emulator included in the latest SDK, on Windows 7.

My PC config: Win7 x64 / Intel Core 2 Quad @3.8 GHz / 6 GB RAM / plenty of HDD space / dedicated GPU

What happens when trying to start an emulator with any API level, with either x86 or x86_64:

  • version 1) emulator starts, Android logo appears, glows for a bit, and that's it. It never reaches the Home screen. Emulator log shows absolutely no errors. Trying to connect using adb freezes Android Studio until I kill the emulator process.

  • version 2) Same like version 1, but in this case I can't even kill the qemu-system-i386 process (yes, not even with full admin rights). I have to actually restart Windows. Process remains a zombie, using 1 GB of RAM.

  • version 3) If I'm lucky, sometimes it reaches the Home screen, but becomes completely unusable. Sometimes I can click on things (maybe 2-3 clicks), and then becomes completely unresponsive. Occasional "Launcher has stopped" / "System has stopped" messages appear randomly in the emulator's home screen...

I've installed the latest Intel HAXM 6.0.3 version (the one downloaded by the Android SDK manager). Virtualization is enabled in BIOS.

I've tried all kinds of emulator options (more or less RAM, hardware vs software GPU, x86 / x86_64). Almost same result every time.

I've completely deleted and reinstalled the entire Android SDK and Android Studio.

CPU is not the issue - it's not under load while emulator runs.

Free RAM is not the issue - it's not fully used while emulator runs,

HDD is not the issue - I even defragmented it, and it's not looking like it's under any sort of load while emulator is running.

So, my question is very simple: is anyone out there using Windows 7, who can actually start up, let's say, a Marshmallow x86 emulator just by a simple 2-3 clicks process, and actually have it reach the home screen? Or does the "new, faster" emulator actually need some sort of super-powerful machine which I don't seem to possess anymore? The only thing that apparently changed was the HAXM driver. But it's stating that it has initialized just fine, so I don't know. Oh, and VirtualBox runs just fine. GenyMotion, by contrast, just flies. But I'd like to have the official Android emulator in a working state, or am I asking for too much?


Solution

  • Adrian, in my sad opinion: yes, you would need a powerfull processor, even a litle bit more of ram. The almost-aceptable scenario for you to run api 24 emulation in xxxhdpi resolution is an i7 with 8 of ram.

    But this is what hard and software manufacturers want you for: upgrade, upgrade, upgrade. And it's not necessairilly true for you, or not obligatory for today. Maybe tomorrow...

    It's my case too. I have a second generation i5 with 6 of ram and plenty of disk. Have a good geforce gpu too. And what I do to have my emulators running, or, how do I emulate in my win7? First of all: unninstalled all the last (about 30) non-security system updates from windows (! yes..., they make your system very heavy, the same with the various distributed c++ packages microsoft want us to carry on with our systems even if we use it once a year, or less - go to control panel and ripp'em off! Keep only the most recent c++ package - if you need it later, update again). Actually I'm even investigating what else "updates" I can delete from my system to have it usable again, mine again. Microsoft...

    Second: enabling "power save mode" on your android studio (menu file), only in testing times, seems to make things faster.

    Third: do heavy tests on emulators with "low" apis, like android 4 or 5 at max. And emulate devices with small screens or resolution, 5 pol. with 720 points (hor.), at max. If possible use _x86 64 emulation.

    With this you can make it happen. The emulator is slow to load and open, but when running it works in a fairly good speed. First thing to do there: enter developer options and "force gpu" on both places. This will instruct your pc to take advantage of your dedicated gpu system.

    Do not try to open two or more emulators at the same time, sorry.

    When 90% of your debug is done (i do it in an emulator running android version lower than 5, normally 4.0 or 4.1 - 480x800 screen), then you pay the price to load a big screen, big dpi android 5, 6 or N). While it loads, make a coffee and use the bath.

    When the beauty (beast?) is loaded, then do the final tests with all your apps that stayed waiting for this special moment. I maintain all my apps waiting for it. When I load the "big" emu I use this oportunity to do all tests I was needing - because it's not a simple task open this everytime I want.

    In the future, as said: i7, 8ram, powerfull gpu and, very important: a good SSD drive (until 10x faster) to throw up damn nasty harddisk to the garbage. :) Best.

    EDIT: when you create an AVD image with the latests APIs, Android Studio defines the ram and disk space values for the emulation and, in my opinions, these values are too big and too hard for the hostage computer to deal with. First point: your testing app never will demand all those resources. Two: your pc suffers hard to deal with a very fragmented Gb data from here to there, and there to here. Three: the virtual image created on your hard disk gets bigger with the use. So: 1 - lower the default values from your avd images, ram and disk sizes; 2 - on the avd launching window dialog, edit the options of each image and rip information everytime before start the emulation OR/AND 3 - uninstall your apps from the emu when not needed.