Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I tweak my android emulator to make it fast?

I am using the android emulator to run my programs. But its really slow. It takes around 90 seconds to startup and show the home screen. Can I tweak it so that I can reduce this time considerably? Thanks

like image 227
Bohemian Avatar asked Dec 28 '09 06:12

Bohemian


People also ask

Can you speed up Android emulator?

The Android emulator supports system images that emulate two different CPUs: ARM and Intel x86. Using an x86 system image can speed up the emulator considerably, so this is the option you'll typically want to opt for. If your IDE and SDK are up to date, then creating an x86 AVD is generally pretty straightforward.

Why is my Android emulator so slow?

The Android Emulator is very slow. The main reason is because it is emulating the ARM CPU & GPU, unlike the iOS Simulator, which runs x86 code instead of the ARM code that runs on the actual hardware.


2 Answers

I was having a similar problem (thread here). However, mine was taking 10-15 mins. 90 seconds is blazing fast considering a lot of threads in the Android discussion groups. The emulator is slow by nature and the only recommendation I read was to keep the emulator open instead of closing it and rerunning it. However, as mentioned in my thread, if you have a physical Android device, you can just run it on that. It's what I'm doing at the moment and it was top-notch advice. No long waiting time. If you don't have a physical device, then I can only suggest you don't close the emulator between code changes, as the system will recognise the change.

like image 104
keyboardP Avatar answered Sep 23 '22 01:09

keyboardP


use those 3 options.

emulator --cpu-delay 0 --no-boot-anim --cache ./cache --avd avd_name

the first two are obvious. the third one will make the memory of the emulator kind of persistent. you can point it to any file that does not get destroyed by boot (such happens with /tmp) it's like a always-on hibernating device.

like image 40
gcb Avatar answered Sep 24 '22 01:09

gcb